Distinguish “inspection passed” from “inspection never happened”
Use when
An
existing
synchronous
PreToolUse
guard
uses
external
helpers
to
read,
decode,
or
match
a
command.
Pocock’s
frozen
Git
guard
leaves
jq
unchecked:
missing
parser,
empty
command,
no
pattern
match,
exit
zero.
Action
In
a
separately
approved
hook
change,
check
parser
availability,
stdin
read
status,
JSON
decoding,
and
a
nonempty
string
tool_input.command
before
matching.
On
any
failure,
print
a
bounded,
nonsecret
diagnostic
to
stderr
and
exit
2.
Check
every
normalizer
and
matcher
status;
helper
errors
are
not
ordinary
no-match
results.
Retain
the
reviewed
command
policy
and
stronger
permissions.
Use
onFailure:"block"
for
harness-visible
failures,
but
do
not
expect
it
to
catch
empty
stdout
plus
exit
zero.
That
result
means
no
hook
decision,
not
approval;
normal
permission
checks
still
apply.
Acceptance check
In
separately
authorized
disposable
fixtures,
replace
real
Git
effects
with
an
inert
dispatch
counter.
Exercise
the
actual
hook
registration
and
launcher,
not
only
the
script.
Missing
jq,
failed
input
read,
malformed
JSON,
absent,
empty,
or
wrong-type
command,
and
injected
matcher
failure
must
each
produce
a
visible
block
with
zero
dispatches.
A healthy forbidden command must also block; a healthy, otherwise-permitted control must reach its harmless handler. The old unchecked-parser version must fail this oracle. Retain deployed versions, hook invocation, redacted payloads, statuses, diagnostics, and effect counts. Never run a real push, reset, or cleanup to test this.
Evidence
August and October reports identify the same unchecked assignment; retrieved upstream source confirms the fallthrough. The October fork adds dependency and parse-status checks. Official hook documentation confirms exit-two blocking and exit-zero no-decision semantics.
Caveat
This
is
not
a
shipped
upstream
repair.
The
skill
is
frozen
and
excluded
from
the
plugin.
The
fork’s
jq -er
does
not
fully
validate
command
type,
and
later
helper
failures
remain
unchecked.
Its
passing
cases
are
author-reported,
not
an
inspected
committed
suite.
Regex
normalization
is
not
shell
parsing
or
containment.
The
proposed
fixtures
remain
unexecuted;
no
skill,
hook,
dependency,
or
configuration
was
changed.