Skip to content

Add native git hooksPath review-receipt pre-commit - #116

Merged
KangaKode merged 4 commits into
mainfrom
feat/native-pre-commit-hooks
Aug 16, 2026
Merged

Add native git hooksPath review-receipt pre-commit#116
KangaKode merged 4 commits into
mainfrom
feat/native-pre-commit-hooks

Conversation

@KangaKode

Copy link
Copy Markdown
Owner

Summary

  • Adds .githooks/pre-commit calling record_review_receipt.py --check, enabled per clone via make hooks-install (core.hooksPath=.githooks)
  • Chains Python pre-commit hook-impl (PATH / .venv / python3 -m) so framework checks are not silently dropped; missing CLI fails closed with a warning
  • Updates threat model + process docs: Cursor gate remains defense-in-depth; native hook is the commit-time check when installed

Stacking

Depends on #115 (feat/pre-commit-review-gate) for the receipt script and Cursor gate.

Risk-tier

High — git hooks / process enforcement. Design delta: docs/designs/pre-commit-review-gate/NATIVE_HOOKS.md (+ updated THREAT_MODEL.md).

Test plan

  • python3 -m unittest tests.test_pre_commit_review_gate -v
  • make hooks-install on a clone, then commit without receipt (expect block)
  • With receipt OK and pre-commit installed, framework hooks still run
  • Bugbot + Security Review recorded

@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@KangaKode
KangaKode force-pushed the feat/pre-commit-review-gate branch from 984b9a3 to ec042a4 Compare August 16, 2026 19:48
KangaKode and others added 3 commits August 16, 2026 16:11
Require Bugbot + Security receipt before git commit in Cursor, with
staging-stable fingerprints and honest residual documentation pending
native git hooks.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mask quoted and heredoc text so commit-message substitution stays allowed while unquoted git command-substitution and multiline forms stay fail-closed.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ship .githooks/pre-commit and make hooks-install so commit-time receipt checks apply outside Cursor, chaining the Python pre-commit framework when available.

Co-authored-by: Cursor <cursoragent@cursor.com>
@KangaKode
KangaKode force-pushed the feat/native-pre-commit-hooks branch from f12fbea to ea03f7a Compare August 16, 2026 20:11
@KangaKode
KangaKode changed the base branch from feat/pre-commit-review-gate to main August 16, 2026 20:11
@KangaKode
KangaKode merged commit 9ef6ffc into main Aug 16, 2026
6 checks passed
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.

1 participant