Lines 135-175shell
135 pass "post-edit accumulator and stop formatter cooperate without blocking"
137 fail "stop formatter should fail open"
140 fail "post-edit accumulator should pass through"
143if node "$ROOT/scripts/hooks/quality-gate.js" >"$TMPDIR_EVAL/quality.out" 2>"$TMPDIR_EVAL/quality.err" <<JSON
144{"hook_event_name":"PostToolUse","tool_input":{"path":"$TMPDIR_EVAL/repo/example.ts"}}
147 pass "quality policy hook is non-blocking"
149 fail "quality policy hook should be non-blocking"
152audit_dir="$TMPDIR_EVAL/audit"
153mkdir -p "$audit_dir/sessions"
154printf '{"session_id":"session-1"}\n' > "$audit_dir/sessions/one.session"
155if printf '%s\n' '{"hook_event_name":"PreToolUse","tool_name":"Bash","tool_input":{"command":"echo AKIA1234567890ABCDEF && rm -rf /tmp/example"}}' \
CriticalCritical Secret
Package contains a critical-looking secret pattern.
evals/integration/test_hook_category_behaviors.shView on unpkg · L155 CriticalSecret Pattern
AWS access key ID in evals/integration/test_hook_category_behaviors.sh
evals/integration/test_hook_category_behaviors.shView on unpkg · L155 156 | TELEMETRY_GOVERNANCE=true TELEMETRY_DATA_DIR="$audit_dir" TELEMETRY_SESSION_DIR="$audit_dir/sessions" bash "$ROOT/scripts/hooks/governance-audit.sh" preToolUse dev >"$TMPDIR_EVAL/governance.out" 2>"$TMPDIR_EVAL/governance.err"; then
158 if [[ -s "$audit_dir/audit.jsonl" ]] \
159 && grep -q '"event_type":"governance.secret_detected"' "$audit_dir/audit.jsonl" \
160 && grep -q '"event_type":"governance.destructive_operation"' "$audit_dir/audit.jsonl"; then
161 pass "governance audit policy emits audit events through shared libraries"
163 fail "governance audit did not emit expected audit events"
166 fail "governance audit should fail open"
169if printf '%s\n' '{"hook_event_name":"Stop","last_assistant_message":"done"}' \
170 | TELEMETRY_NOTIFICATIONS=false bash "$ROOT/scripts/hooks/desktop-notify.sh" stop dev >"$TMPDIR_EVAL/notify.out" 2>"$TMPDIR_EVAL/notify.err"; then
171 grep -q '"last_assistant_message":"done"' "$TMPDIR_EVAL/notify.out" \
172 && pass "local notification helper passes hook input through when disabled" \
173 || fail "notification helper did not pass input through"
175 fail "notification helper should fail open when disabled"