Skip to content

feat: add block-no-verify PreToolUse hook to prevent agents from bypassing git hooks#8461

Open
tupe12334 wants to merge 1 commit intowindmill-labs:mainfrom
tupe12334:add-block-no-verify
Open

feat: add block-no-verify PreToolUse hook to prevent agents from bypassing git hooks#8461
tupe12334 wants to merge 1 commit intowindmill-labs: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, alongside the existing permissions config.

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. The existing permissions are preserved unchanged.

Closes #8460


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

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


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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.

Add block-no-verify hook to prevent agents from bypassing git hooks

1 participant