Skip to content

feat: add block-no-verify PreToolUse hook to .claude/settings.json#2043

Closed
tupe12334 wants to merge 1 commit intoSBoudrias:mainfrom
tupe12334:add-block-no-verify
Closed

feat: add block-no-verify PreToolUse hook to .claude/settings.json#2043
tupe12334 wants to merge 1 commit intoSBoudrias:mainfrom
tupe12334:add-block-no-verify

Conversation

@tupe12334
Copy link

Summary

Adds block-no-verify@1.1.2 as a PreToolUse Bash hook in .claude/settings.json, preserving existing configuration (PostToolUse yarn oxfmt hook).

Details

When an agent runs git commit or git push with the hook-bypass flag, it silently disables pre-commit, commit-msg, and pre-push hooks. block-no-verify reads tool_input.command from the Claude Code hook stdin payload, detects the hook-bypass flag across all git subcommands, and exits 2 to block. All existing configuration is preserved unchanged.

Closes #2042


Disclosure: I am the author and maintainer of block-no-verify.

Prevents agents from bypassing git hooks via the hook-skip flag.
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@827295d). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2043   +/-   ##
=======================================
  Coverage        ?   89.61%           
=======================================
  Files           ?       48           
  Lines           ?     1993           
  Branches        ?      534           
=======================================
  Hits            ?     1786           
  Misses          ?      201           
  Partials        ?        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SBoudrias
Copy link
Owner

Sorry, I won't be merging a npx script I don't control to this repo. Too big of a security risk.

@SBoudrias SBoudrias closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add block-no-verify PreToolUse hook to .claude/settings.json

2 participants