Development record
`abcd guard` only warns on a bash `function f { ...; }; f` whose body is a blocker, and the PreToolUse hook lets a warning run, so the function executes.
abcd guard only warns on a bash function f { ...; }; f whose body is a blocker, and the PreToolUse hook lets a warning run, so the function executes.
Private security advisory GHSA-6h89-gjcg-3h3h (draft, severity medium). Full text, evidence and reproduction: the security-drain-2026-10-09 run directory in the main checkout's local tier. This record stays uncommitted until its fix lands; the fix commit adds it directly to resolved/.
Evidence (lines at main 7549ca2d5): function is not in the reserved-word set the walk steps over before command position (internal/core/guard/match.go:158, reserved), so the keyword form falls to unrecognised-launcher while the POSIX form f() { ...; } has its body judged. The hook maps a warn to exit 1, which surfaces the message and lets the tool run; only a block (exit 2) stops it (internal/surface/cli/guard.go:455-466).
Reproduction: Defaults().Check("function f { git push --force origin main; }; f") is warn / unrecognised-launcher; Defaults().Check("f() { git push --force origin main; }; f") is block / git-push-force. On /bin/bash 3.2.57, /bin/bash -c "function f { touch $MARK; }; f" creates the mark.
Frontmatter
| id | iss-2610090821313095 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610090821313095-guard-function-keyword-body-only-warns.md
open on GitHub ↗ · commit history ↗