Skip to content

Temporarily bulk-sync all DLP discovery rules to test-rules - #5297

Open
aidenmitchell wants to merge 1 commit into
mainfrom
bulk-sync-dlp-rules-test-rules
Open

Temporarily bulk-sync all DLP discovery rules to test-rules#5297
aidenmitchell wants to merge 1 commit into
mainfrom
bulk-sync-dlp-rules-test-rules

Conversation

@aidenmitchell

Copy link
Copy Markdown
Member

Summary

  • Adds handle_dlp_bulk_sync() to sync_test_rules.py. This copies every rule in dlp-discovery-rules/ straight to the test-rules branch, outside the normal per-PR flow (which only watches detection-rules/ and caps at 10 rules per PR).
  • Marks each bulk file with testing_pr: 0.
  • Adds a matching exemption in clear-old-test-rules.yml so it does not delete files with testing_pr: 0.

Why

We need to test all DLP rules against live messages at once. The normal PR-based sync path does not fit this: DLP rules live outside detection-rules/, and there are far more than the 10-rule-per-PR cap.

Revert plan

This is temporary. Once DLP live testing is done, revert this PR. A follow-up cleanup pass on test-rules may be needed to remove the bulk_dlp_* files (the normal cleanup jobs will no longer exempt them once reverted).

Test plan

  • Confirm python3 -m py_compile .github/scripts/sync_test_rules.py passes (done locally)
  • After merge, confirm the scheduled Sync Test Rules workflow run adds bulk_dlp_*.yml files to the test-rules branch
  • Confirm Remove Stale from test-rules Branch does not delete the bulk_dlp_*.yml files on its next run

🤖 Generated with Claude Code

@aidenmitchell
aidenmitchell requested a review from a team as a code owner September 8, 2026 19:01
@github-actions
github-actions Bot requested a review from a team as a code owner September 8, 2026 19:03
@github-actions
github-actions Bot requested a review from a team September 8, 2026 19:03
Copies every rule in dlp-discovery-rules/ to the test-rules branch
directly, bypassing the normal per-PR sync flow (which only watches
detection-rules/ and caps at 10 rules per PR). Needed to test all DLP
rules against live messages at once. testing_pr: 0 marks these files
as bulk-synced so clear-old-test-rules.yml does not delete them.

This is temporary and will be reverted once DLP live testing is done.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aidenmitchell
aidenmitchell force-pushed the bulk-sync-dlp-rules-test-rules branch from 0e451d4 to b1db457 Compare September 8, 2026 19:22
@github-actions github-actions Bot removed test-rules:excluded:bulk_rules Bulk rule update, excluded from test rules shared-samples:excluded:bulk_rules labels Sep 8, 2026
@sublime-security sublime-security deleted a comment from github-actions Bot Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant