From 31c8b232b768624d987a1188fefc141f1ebe4fa1 Mon Sep 17 00:00:00 2001 From: Gil Alon <47804748+galon1@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:43:10 -0500 Subject: [PATCH] SERVER-120254 Add Claude Code hook to only allow writes to authorized files (#48903) GitOrigin-RevId: 8d465bb8e3998cbf583310d2c0836fbf6cf4eafb --- buildscripts/sync_repo_with_copybara.py | 1 + buildscripts/tests/test_sync_repo_with_copybara.py | 2 ++ copy.bara.sky | 1 + 3 files changed, 4 insertions(+) diff --git a/buildscripts/sync_repo_with_copybara.py b/buildscripts/sync_repo_with_copybara.py index 81cd989feae..673196a4366 100644 --- a/buildscripts/sync_repo_with_copybara.py +++ b/buildscripts/sync_repo_with_copybara.py @@ -31,6 +31,7 @@ EXCLUDED_PATTERNS = [ "sbom.private.json", ".augment/", ".cursor/", + ".claude/", "AGENTS.md", ".github/CODEOWNERS", "monguard/", diff --git a/buildscripts/tests/test_sync_repo_with_copybara.py b/buildscripts/tests/test_sync_repo_with_copybara.py index ebf3b957f72..484ac784fe4 100644 --- a/buildscripts/tests/test_sync_repo_with_copybara.py +++ b/buildscripts/tests/test_sync_repo_with_copybara.py @@ -313,6 +313,7 @@ class TestSkyExclusionChecks(unittest.TestCase): "sbom.private.json", ".augment/**", ".cursor/**", + ".claude/**", "AGENTS.md", ".github/CODEOWNERS", "monguard/**", @@ -337,6 +338,7 @@ class TestSkyExclusionChecks(unittest.TestCase): "sbom.private.json", ".augment/**", ".cursor/**", + ".claude/**", "AGENTS.md", ".github/CODEOWNERS", "monguard/**", diff --git a/copy.bara.sky b/copy.bara.sky index 5ce8ce270a6..6e979be428c 100644 --- a/copy.bara.sky +++ b/copy.bara.sky @@ -29,6 +29,7 @@ def make_workflow(workflow_name, destination_url, source_ref, destination_ref): "sbom.private.json", ".augment/**", ".cursor/**", + ".claude/**", "AGENTS.md", ".github/CODEOWNERS", "monguard/**",