KR-HK-004: Kiro Tool Hook Missing toolTypes Filter
Summary
- Rule ID:
KR-HK-004 - Severity:
MEDIUM - Category:
Kiro Hooks - Normative Level:
SHOULD - Auto-Fix:
No - Verified On:
2026-10-17
Applicability
- Tool:
kiro - Version Range:
unspecified - Spec Revision:
IDE 0.x .kiro.hook
Evidence Sources
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
{
"when": {
"type": "preToolUse"
},
"then": {
"type": "askAgent",
"prompt": "Check every tool"
}
}
Valid
{
"when": {
"type": "preToolUse",
"patterns": [
"fs_write"
]
},
"then": {
"type": "askAgent",
"prompt": "Check the write"
}
}