{
  "id": 9467385,
  "title": "Claude Code permission rules: Bash(git push:*) stopped 8 of 14 ways to push, and 5 reached the remote",
  "url": "https://urgent.news/2026/09/24/claude-code-permission-rules-bash-git-push-stopped-8-of-14-ways-to",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-24T02:17:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/rulestack/claude-code-permission-rules-bashgit-push-stopped-8-of-14-ways-to-push-and-5-reached-the-44kn"
  },
  "original_language": "en",
  "account": "Claude Code 2.1.278 was instructed to attempt 14 variations of pushing to a remote repository using the git push command. A deny rule, Bash(git push:*) was implemented in the settings.json file to prevent this action. The rule successfully blocked 8 out of the 14 attempts, while 5 attempts successfully pushed to the remote repository. One attempt passed the rule but failed in the shell for unrelated reasons. The blocked attempts included variations such as git push origin main, git push, git push with variables, and a shell script. The single attempt that succeeded used the command git -c user.name=x push origin main. The shell returned an exit code 127 with the error message (eval):1: command not found: git push, indicating the rule did not successfully halt this attempt.",
  "summary": "With a single deny rule, Bash(git push:*) , in a throwaway repo's .claude/settings.json , we asked Claude Code 2.1.278 to run 14 different spellings of \"push to origin\", one per claude -p run. The rule blocked 8 of them. 5 pushed to the remote ( git -c ... push , git 'push' , sh -c \"git push\" , eval on a variable, and a shell script), and 1 slipped past the rule but failed in the shell for…",
  "key_points": [
    "Claude Code 2.1.278 tested 14 git push variations",
    "Bash(git push:) rule blocked 8 attempts",
    "One attempt succeeded despite rule, failed in shell"
  ],
  "editors_take": "The deny rule Bash(git push:) in Claude Code 2.1.278 partially achieved its intended blocking effect, but some git push variations still bypassed or evaded it.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}