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

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Temporarily bulk-syncs all DLP discovery rules into test-rules for live-message testing.

Changes:

  • Adds bulk DLP synchronization with testing_pr: 0 metadata.
  • Preserves bulk-synced files during stale-rule cleanup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Summary
.github/workflows/clear-old-test-rules.yml Exempts bulk-synced rules from cleanup.
.github/scripts/sync_test_rules.py Bulk-syncs DLP rules; workflow handling for bulk_dlp_* filenames requires updating.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

entry['path'], 'main'
)

target_save_filename = f"bulk_dlp_{entry['name']}"
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.

2 participants