Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add hooks/sonomoshq/canary/stopgit clone --depth 1 https://github.com/sonomoshq/CanaryGrade A, and why
Stop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the commands this hook runs, not an audit. A hook is shell that executes on your machine at the event it names, which is why every command in it is printed with what was found.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 21 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/scan.sh\"",
"timeout": 30
}
]
},
{
"hooks": [
{
"type": "prompt",
"prompt": "A hook input JSON may appear above in context; if it does and contains a session_id field, remember that value as the session id.\n\nRead only the user's latest message. Find REAL PII in it: not examples, not placeholders, not documentation.\n\nSkip these categories — the regex layer already counts them: credit_card, email, iban, aba_routing, ipv4, ipv6, mac_address, bitcoin_address, ethereum_address, us_ssn, phone_number, us_drivers_license, aws_access_key, aws_secret_key, github/gitlab/slack/stripe/openai/anthropic/google/sendgrid/npm tokens, jwt, private key blocks, db connection URLs, url_credentials, vin, us_mbi, us_itin, nhs_number, sin_canadian, npi_number, dea_number, uk_nino, uk_postcode. The regex layer now also owns UK identifiers: a UK National Insurance number belongs to uk_nino (skip it — never report it as national_id), and a UK postcode belongs to uk_postcode (skip it — never report it as zip_code).\n\nReport only these categories: name, entity_name, street_address, zip_code, date_of_birth, us_passport, passport_non_us, national_id, license_plate, us_ein_fein, tin_non_us, us_bank_account, swift_bic, private_key, seed_phrase, wallet_key, exchange_api_key, gcp_key, azure_key, oauth_token, generic_secret, credentials_compound, medical_record_mrn, health_plan_id, diagnosis_code_icd10, case_number, contract_number, patent_number, customer_data, employee_data, trade_secret, internal_comms, financial_records, geolocation.\n\nCommon rationalizations that are WRONG: \"it looks like a placeholder\" (real keys look like placeholders), \"it's in a code block\" (code blocks leak too), \"the user shared it deliberately\" (deliberate exposure is still exposure). When genuinely uncertain whethWhat this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 21 lines scan A c0d5ef4454fe
Stop is a hook published in the GitHub repository sonomoshq/Canary (2 stars, last pushed 1mo ago), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other hooks, from other repositories
PreToolUse
Runs before the agent uses a tool, executing cc-safety-net.js via node with --coding-cli. From kenryu42/cc-safety-net.
Stop
Runs when the agent finishes a response, executing hook-stop-self-score.sh, hook-stop-verify-deploy.sh, hook-stop-pr-thread-check.sh, hook-stop-anti-claim.js and meta-agent-loop.js via bash (5 commands). From IgorGanapolsky/ThumbGate.
UserPromptSubmit
Runs when you submit a prompt, before the agent sees it, executing consent_gate_grant.mjs via node. From friedbotstudio/baseline.
PostToolUse
Runs after a tool call finishes for Skill tool calls, executing posttooluse_log_tool.sh. From synaptiai/agent-capability-standard.
Stop
Runs when the agent finishes a response, executing hallucination-audit-stop.cjs via node. From bitflight-devops/hallucination-detector.
SessionStart
Runs when a session starts on compact, resume and startup, executing session-restore.mjs via node. From Bogzx/seeks.