ECC/.cursor/hooks
Gaurav Dubey d8a84b5f7b
fix(.cursor/hooks): route block-no-verify through local hook to fix message-body false positives (#2107) (#2177)
Cursor hooks still called `npx block-no-verify@1.1.2`, the broken external
package whose matcher over-matches: it blocks legitimate `git commit`
whenever `--no-verify` (or `no-verify`) appears anywhere in the command
string, including inside the commit message body. The Claude Code surface
already routes through the in-repo `scripts/hooks/block-no-verify.js`,
which performs flag-position-aware tokenisation and passes 25 regression
tests covering every false-positive case from #2107.

Add a thin Cursor wrapper (`before-shell-execution-block-no-verify.js`)
that reads Cursor stdin, transforms to the Claude Code `tool_input.command`
shape, delegates to the local hook's exported `run()`, and forwards exit
code and stderr. Update `.cursor/hooks.json` to call the wrapper instead
of the npx package. New 14-case test file pins the false-positive cases
from the issue plus the still-blocked real bypass attempts.

Fixes #2107
2026-06-07 13:01:36 +08:00
..
adapter.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
after-file-edit.js feat: add web frontend rules and design quality hook 2026-04-02 17:33:17 -07:00
after-mcp-execution.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00
after-shell-execution.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
after-tab-file-edit.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00
before-mcp-execution.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00
before-read-file.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00
before-shell-execution-block-no-verify.js fix(.cursor/hooks): route block-no-verify through local hook to fix message-body false positives (#2107) (#2177) 2026-06-07 13:01:36 +08:00
before-shell-execution.js fix(hooks): allow tmux-wrapped dev server commands (#321) 2026-03-07 14:47:49 -08:00
before-submit-prompt.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00
before-tab-file-read.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00
pre-compact.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00
session-end.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
session-start.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
stop.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
subagent-start.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00
subagent-stop.js feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool 2026-02-25 10:45:29 -08:00