hooks-prohibited¶
All hook commands are prohibited unless explicitly allowlisted; catches new or unexpected hooks added to a project
| Severity | error (disabled) |
| Autofix | - |
| Since | v0.12.0 |
| Category | Skills, Agents, Hooks |
Why¶
Hooks execute arbitrary shell commands with no human review on every
matching event. In high-security environments, any hook that was not
explicitly reviewed and allowlisted represents an uncontrolled
execution vector — even legitimate hooks should be inventoried. This
rule inventories hooks in plugin hooks/hooks.json, .claude/settings*.json,
and skill/agent frontmatter (hooks: key).
Examples¶
Bad (no allowlist configured):
{
"hooks": {
"PostToolUse": [
{"hooks": [{"type": "command", "command": "scripts/format.sh"}]}
]
}
}
Good (with allowlist):
How to fix¶
Review the flagged hook command and, if it is safe, add it to the
allowlist in your skillsaw config. Allowlist entries are exact-match,
so a modified version of the command will still be flagged. This rule
is disabled by default — enable it for supply-chain-sensitive
repositories.
Configuration¶
| Parameter | Description | Default |
|---|---|---|
allowlist |
Hook commands to permit (exact match) | [] |
Run skillsaw explain hooks-prohibited to see this documentation and the rule's effective configuration in your terminal.