summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/security-guidance/hooks/hooks.json13
-rw-r--r--plugins/security-guidance/tests/test_repo_resolution.py8
2 files changed, 5 insertions, 16 deletions
diff --git a/plugins/security-guidance/hooks/hooks.json b/plugins/security-guidance/hooks/hooks.json
index 22734270..a4723026 100644
--- a/plugins/security-guidance/hooks/hooks.json
+++ b/plugins/security-guidance/hooks/hooks.json
@@ -106,19 +106,6 @@
}
]
}
- ],
- "SubagentStop": [
- {
- "hooks": [
- {
- "type": "command",
- "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/sg-python.sh\" \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\"",
- "asyncRewake": true,
- "rewakeMessage": "Background security review feedback — address or acknowledge the findings below, then continue with the user's original request or continue waiting for their reply. This is supplementary, not a replacement for your previous response:",
- "rewakeSummary": "Background security review found issues"
- }
- ]
- }
]
}
}
diff --git a/plugins/security-guidance/tests/test_repo_resolution.py b/plugins/security-guidance/tests/test_repo_resolution.py
index f6b8d352..8bcf24b9 100644
--- a/plugins/security-guidance/tests/test_repo_resolution.py
+++ b/plugins/security-guidance/tests/test_repo_resolution.py
@@ -222,9 +222,11 @@ class TestRegexes:
class TestHooksJson:
def test_matchers_and_events(self):
cfg = json.loads((HOOKS_DIR / "hooks.json").read_text())
- assert "SubagentStop" in cfg["hooks"]
- assert cfg["hooks"]["SubagentStop"][0]["hooks"][0]["command"] == \
- cfg["hooks"]["Stop"][0]["hooks"][0]["command"]
+ # Stop already reviews what subagents changed during the turn.
+ assert "SubagentStop" not in cfg["hooks"]
+ stop = cfg["hooks"]["Stop"][0]["hooks"][0]
+ assert stop["command"].endswith('security_reminder_hook.py"')
+ assert stop["asyncRewake"] is True
bash = [g for g in cfg["hooks"]["PostToolUse"] if g.get("matcher") == "Bash"][0]
ifs = {h.get("if") for h in bash["hooks"]}
assert {"Bash(git commit:*)", "Bash(git push:*)", "Bash(git -C * commit *)",