Guard Drill: does the hook hold?
Guard Drill replays forbidden actions and fail-open probes against a small Kiro hook, as real hook payloads, once against the hook as it was and once against the hook after one fix.
P-RULES-DEL
the policy file of the guard is deleted.
LET THROUGH → HELD
Hook exit code 0 → 2
Holes still open
4 of 5
OPEN 1 closed, 0 regressed.
Comparison exit code
1
48 pairs compared. A hole is a fail-open probe that the hook LET THROUGH before the fix. The comparison exits non-zero while a hole is not closed.
Crack the Hook
Pick the probes you want to try. Each one shows exactly what the two records hold: the CLI word, the IDE word and the exit code of the hook, before and after the fix. Nothing here runs a hook.
Without a script every probe is shown in the table below.
Probes
No probe picked yet.
| Probe | Before the fix | After the fix | Comparison |
|---|---|---|---|
| Probe 1. P-EMPTY the hook gets an empty payload | Before the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | After the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | Comparison unchanged |
| Probe 2. P-MALFORMED the hook gets a payload that is not valid JSON | Before the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | After the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | Comparison unchanged |
| Probe 3. P-DEEP the hook gets a payload nested very deeply | Before the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | After the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | Comparison unchanged |
| Probe 4. P-RULES-DEL the policy file of the guard is deleted | Before the fix LET THROUGH IDE LET THROUGH (per documentation, not confirmed) Hook exit code 0 | After the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | Comparison closed |
| Probe 5. P-DELETED the hook file itself is deleted, so no hook can fire | Before the fix LET THROUGH IDE LET THROUGH (per documentation, not confirmed) Hook exit code none | After the fix LET THROUGH IDE LET THROUGH (per documentation, not confirmed) Hook exit code none | Comparison unchanged OPEN |
| Probe 6. S-cmd-D-LIT-SHELL-ok a forbidden command through cmd, with the hook intact | Before the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | After the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | Comparison unchanged |
| Probe 7. S-powershell-D-LIT-SHELL-ok a forbidden command through powershell, with the hook intact | Before the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | After the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | Comparison unchanged |
| Probe 8. S-sh-D-LIT-SHELL-ok a forbidden command through sh, with the hook intact | Before the fix LET THROUGH IDE LET THROUGH (per documentation, not confirmed) Hook exit code 0 | After the fix LET THROUGH IDE LET THROUGH (per documentation, not confirmed) Hook exit code 0 | Comparison unchanged OPEN |
| Probe 9. S-cmd-D-LIT-SHELL-nopy a forbidden command through cmd, with the interpreter missing | Before the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | After the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | Comparison unchanged |
| Probe 10. S-powershell-D-LIT-SHELL-nopy a forbidden command through powershell, with the interpreter missing | Before the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | After the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | Comparison unchanged |
| Probe 11. S-sh-D-LIT-SHELL-nopy a forbidden command through sh, with the interpreter missing | Before the fix LET THROUGH IDE HELD (per documentation, not confirmed) Hook exit code 127 | After the fix LET THROUGH IDE HELD (per documentation, not confirmed) Hook exit code 127 | Comparison unchanged OPEN |
| Probe 12. S-cmd-D-LIT-SHELL-noscript a forbidden command through cmd, with the guard script missing | Before the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | After the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | Comparison unchanged |
| Probe 13. S-powershell-D-LIT-SHELL-noscript a forbidden command through powershell, with the guard script missing | Before the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | After the fix DID NOT RUN IDE DID NOT RUN (per documentation, not confirmed) Hook exit code none | Comparison unchanged |
| Probe 14. S-sh-D-LIT-SHELL-noscript a forbidden command through sh, with the guard script missing | Before the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | After the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | Comparison unchanged |
| Probe 15. S-direct-D-LIT-SHELL-nopy a forbidden command with no shell, with the interpreter missing | Before the fix LET THROUGH IDE HELD (per documentation, not confirmed) Hook exit code 125 | After the fix LET THROUGH IDE HELD (per documentation, not confirmed) Hook exit code 125 | Comparison unchanged OPEN |
| Probe 16. S-direct-D-LIT-SHELL-noscript a forbidden command with no shell, with the guard script missing | Before the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | After the fix HELD IDE HELD (per documentation, not confirmed) Hook exit code 2 | Comparison unchanged |