mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-14 22:13:41 +08:00
fix: address PR review comments on block-no-verify hook
- Add `minimal` profile so the security hook runs in all profiles - Scope -n/--no-verify flag check to the detected subcommand region, preventing false positives on chained commands (e.g. `git log -n 10`) - Guard stdin listeners with `require.main === module` so require() from run-with-flags.js does not register unnecessary listeners - Verify subcommand token is preceded only by flags/flag-args after "git", preventing misclassification of argument values as subcommands - Add integration tests for block-no-verify hook Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" \"pre:bash:block-no-verify\" \"scripts/hooks/block-no-verify.js\" \"standard,strict\""
|
||||
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" \"pre:bash:block-no-verify\" \"scripts/hooks/block-no-verify.js\" \"minimal,standard,strict\""
|
||||
}
|
||||
],
|
||||
"description": "Block git hook-bypass flag to protect pre-commit, commit-msg, and pre-push hooks from being skipped",
|
||||
|
||||
Reference in New Issue
Block a user