CC-HK-030: Unquoted Path Placeholder in Shell-Form Hook
Summary
- Rule ID:
CC-HK-030 - Severity:
MEDIUM - Category:
Claude Hooks - Normative Level:
SHOULD - Auto-Fix:
No - Verified On:
2026-10-17
Applicability
- Tool:
claude-code - Version Range:
unspecified - Spec Revision:
unspecified
Evidence Sources
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/plugins/manifest-reference
- https://code.claude.com/docs/en/hooks-guide
Test Coverage Metadata
- Unit tests:
true - Fixture tests:
true - E2E tests:
false
Examples
The following examples demonstrate what triggers this rule and how to fix it.
Invalid
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/format.sh"
}
]
}
]
}
}
Valid
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}\"/scripts/format.sh"
}
]
}
]
}
}