[GH-ISSUE #2372] feat: Add block-no-verify to prevent Cursor from bypassing git hooks #664

Open
opened 2026-02-26 18:47:59 +03:00 by kerem · 1 comment
Owner

Originally created by @tupe12334 on GitHub (Jan 10, 2026).
Original GitHub issue: https://github.com/documenso/documenso/issues/2372

Summary

Add the block-no-verify package to prevent Cursor from bypassing git hooks using the --no-verify flag.

Problem

Cursor can bypass pre-commit hooks by running git commit --no-verify, which defeats the purpose of code quality checks enforced by git hooks.

Proposed Solution

Integrate block-no-verify (v1.1.1) which:

  • Monitors git commands (commit, push, merge, cherry-pick, rebase, am)
  • Blocks execution when --no-verify or -n flag is detected
  • Integrates with Cursor via beforeShellExecution hooks

Configuration Required

Create/update .cursor/hooks.json:

{
  "beforeShellExecution": {
    "command": "npx block-no-verify"
  }
}

Benefits

  • Enforces code quality checks even when using Cursor
  • MIT licensed, lightweight dependency
  • No changes needed to existing git hooks setup

References

Originally created by @tupe12334 on GitHub (Jan 10, 2026). Original GitHub issue: https://github.com/documenso/documenso/issues/2372 ## Summary Add the [`block-no-verify`](https://www.npmjs.com/package/block-no-verify) package to prevent Cursor from bypassing git hooks using the `--no-verify` flag. ## Problem Cursor can bypass pre-commit hooks by running `git commit --no-verify`, which defeats the purpose of code quality checks enforced by git hooks. ## Proposed Solution Integrate `block-no-verify` (v1.1.1) which: - Monitors git commands (`commit`, `push`, `merge`, `cherry-pick`, `rebase`, `am`) - Blocks execution when `--no-verify` or `-n` flag is detected - Integrates with Cursor via beforeShellExecution hooks ### Configuration Required Create/update `.cursor/hooks.json`: ```json { "beforeShellExecution": { "command": "npx block-no-verify" } } ``` ## Benefits - Enforces code quality checks even when using Cursor - MIT licensed, lightweight dependency - No changes needed to existing git hooks setup ## References - Package: https://www.npmjs.com/package/block-no-verify - Repository: https://github.com/tupe12334/block-no-verify
Author
Owner

@github-actions[bot] commented on GitHub (Jan 10, 2026):

Thank you for opening your first issue and for being a part of the open signing revolution!

One of our team members will review it and get back to you as soon as it possible 💚

Meanwhile, please feel free to hop into our community in Discord

<!-- gh-comment-id:3733235491 --> @github-actions[bot] commented on GitHub (Jan 10, 2026): Thank you for opening your first issue and for being a part of the open signing revolution! <br /> One of our team members will review it and get back to you as soon as it possible 💚 <br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#664
No description provided.