Skip to content

Add block-no-verify to prevent AI agents from skipping git hooks #42

@tupe12334

Description

@tupe12334

The repo already has PreToolUse hooks blocking rm -rf and force pushes, but Claude Code can still bypass local git hooks via the hook-bypass flag on git commit/push — silently defeating linters, secret scanners, and test gates.\n\nblock-no-verify@1.1.2 (https://github.com/tupe12334/block-no-verify) detects this and exits code 2 to block the command. Add it alongside the existing hooks in settings.json:\n\njson\n{\n "hooks": {\n "PreToolUse": [\n {\n "matcher": "Bash",\n "hooks": [\n { "type": "command", "command": "npx --yes block-no-verify@1.1.2" }\n ]\n }\n ]\n }\n}\n\n\nThis fits naturally with Trail of Bits' existing security posture — no structural changes needed, just one more entry in the hooks array.\n\n_Disclosure: I am the author and maintainer of block-no-verify._

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions