From 9ebbc53969a582a4e37f7d0e8cc9eb2cbe922816 Mon Sep 17 00:00:00 2001 From: Ofek Gabay <61761153+tupe12334@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:35:05 +0700 Subject: [PATCH 1/2] feat: add block-no-verify PreToolUse hook to .claude/settings.json Prevents Claude Code agents from bypassing git hooks via the hook-skip flag. Closes #3673 --- .claude/settings.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 00000000000..f9e760d2170 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,10 @@ +{ + "hooks": { + "PreToolUse": [ + { + "matcher": "Bash", + "hooks": [{ "type": "command", "command": "npx block-no-verify@1.1.2" }] + } + ] + } +} From 84767feb642b6a15de50a26bdfda92d07ab051fd Mon Sep 17 00:00:00 2001 From: Ofek Gabay <61761153+tupe12334@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:35:20 +0700 Subject: [PATCH 2/2] feat: add block-no-verify beforeShellExecution hook to .cursor/hooks.json Prevents Cursor agents from bypassing git hooks via the hook-skip flag. Closes #3673 --- .cursor/hooks.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .cursor/hooks.json diff --git a/.cursor/hooks.json b/.cursor/hooks.json new file mode 100644 index 00000000000..7cad1fa9d23 --- /dev/null +++ b/.cursor/hooks.json @@ -0,0 +1,7 @@ +{ + "hooks": { + "beforeShellExecution": [ + { "command": "npx block-no-verify@1.1.2", "event": "beforeShellExecution" } + ] + } +}