Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
bump: patch
---

### Changed

- The babysit merge gate's high-path floor now also holds plugin git hooks (`plugins/*/git-hooks/**`), any `scripts/` directory at any depth under `plugins/`, and two skill-run scripts outside one (`net-probe.sh`, `preflight.mjs`) out of unattended merge.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ class RiskResult:
# Scripts skills run through `!` lines, and agents and workflows by path.
"plugins/*/scripts/**",
"plugins/*/skills/*/scripts/**",
"plugins/**/scripts/**", # any deeper scripts/ directory
"plugins/*/git-hooks/**", # installed as git hooks in consumer repos
# Run by a skill, not under a scripts/ directory.
"plugins/harness-ops/skills/observability/otel/net-probe.sh",
"plugins/knowledge/skills/video-digest/extraction/preflight.mjs",
# Hook-run scripts outside hooks/.
"plugins/disk-hygiene/skills/clean/scripts/destructive_guard.py",
"plugins/disk-hygiene/skills/clean/scripts/engine_context.py",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,24 @@ def test_plugin_and_skill_scripts_are_high(self):
"plugins/foo/skills/bar/scripts/run.py",
"high-path:plugins/*/skills/*/scripts/**",
),
(
"plugins/foo/skills/bar/reference/scripts/x.md",
"high-path:plugins/**/scripts/**",
),
("plugins/foo/docs/scripts/x.sh", "high-path:plugins/**/scripts/**"),
(
"plugins/source-control/git-hooks/pre-push",
"high-path:plugins/*/git-hooks/**",
),
(
"plugins/harness-ops/skills/observability/otel/net-probe.sh",
"high-path:plugins/harness-ops/skills/observability/otel/net-probe.sh",
),
(
"plugins/knowledge/skills/video-digest/extraction/preflight.mjs",
"high-path:plugins/knowledge/skills/video-digest/extraction/"
"preflight.mjs",
),
]
for path, code in cases:
with self.subTest(path):
Expand All @@ -354,8 +372,11 @@ def test_skill_prose_edit_stays_low(self):
def test_near_miss_script_directories_are_not_high(self):
for path in (
"plugins/foo/reference/scripts.md",
"plugins/foo/skills/bar/reference/scripts/x.md",
"plugins/foo/docs/scripts/x.sh",
"plugins/foo/skills/bar/scriptsx/run.sh",
"plugins/foo/docs/git-hooks.md",
"plugins/foo/skills/bar/git-hooks/x.md",
"plugins/harness-ops/skills/observability/otel/net-probe.md",
"plugins/knowledge/skills/video-digest/extraction/preflight.md",
):
with self.subTest(path):
self.assertEqual(score(_input(files=(_file(path),))).score, Risk.LOW)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
{
"type": "command",
"command": 'python3 "${CLAUDE_PLUGIN_ROOT}'
'/skills/clean/scripts/guard.py" --strict',
'/skills/clean/tools/guard.py" --strict',
}
],
}
Expand Down Expand Up @@ -171,7 +171,8 @@ def test_declared_executable_mcp_server_sibling_scores_high(self):
self.assertIs(result.score, Risk.HIGH)

def test_declared_executable_hook_command_script_scores_high(self):
result = _risk("plugins/example-hooks/skills/clean/scripts/guard.py")
# Outside every floor glob, so only the hooks.json declaration floors it.
result = _risk("plugins/example-hooks/skills/clean/tools/guard.py")
self.assertIs(result.score, Risk.HIGH)

def test_declared_executable_inline_plugin_json_server_scores_high(self):
Expand Down
Loading