
What happened
The developer's settings.json deny list blocked commands starting with the literal text like git push, but official docs show forms such as git -C . push origin main, git -c push.default=current push origin main and git 'push' origin main slip through.
Why it matters
Anyone who trusts deny rules alone to keep an AI coding agent away from Git operations like push, reset, rebase or clean is exposed to that same bypass, since rules match command strings rather than the program's real behavior.
Summaries like this, in your inbox every morning.
The author's decision to stop AI involvement at commit and keep push and merge human reflects how he treats a codebase handling money and personal data. His first assumption — that writing the rule in CLAUDE.md and listing it in settings.json would be enough — did not hold, because instruction files only steer what Claude tries to do and do not change what Claude Code permits.
Moving the check to a PreToolUse hook addresses the specific weakness he identified: deny rules match command strings, whereas his Python script splits commands on separators, skips prefixes like env or timeout 10, ignores git options such as -C and -c, and re-reads the insides of bash -c and $( ). He tested 22 forms that should be blocked and 7 that should pass, then deliberately broke the -C and -c handling to confirm the tests caught the gap. He also notes that without "onFailure": "block", a mis-typed script path would let every command through.
Even so, he frames the hook as not a strong boundary. The larger fix, in his view, is separating privileges — running the AI under its own OS account, or protecting branches on GitHub's side, though he notes private repositories need a paid plan for branch protection. He chose the separate OS account, and says the credential-placement and SSH work that comes with it will be covered in a follow-up.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
OpenAI released documents revealing solutions to hundreds of math problems that top mathematicians had struggl…

R2-san's Mitate, a project for the 5th Agentic AI Hackathon with Google Cloud, reached about 2,990 commits and…

Since 2026-10-07, Max 5x, Max 20x and Team plans include monthly API credits — $100, $200 and up to $500 per s…

Appian CEO Matt Calkins told Fortune that AI is "stealing and blackmailing and deceiving and organizing agains…

Atomburstofficial published Geiger, a free read-only command, npx geiger-scan, listing AI agents like Claude C…

BotMan AI's Alejandro D’Andrea said its migration pipeline maps an app's dependencies, business logic and data…