fix(settings): deny docker mounts of the host root in 7 spellings

The single legacy row matched no real spelling (bench M5). 28 rows (7 shapes x 4 prefixes, bench-proven with an echo analogue) now deny them; soft_deny covers create, container run and compose up; T41 locks the rows.
This commit is contained in:
bchanot committed 2026-11-15 15:22:34 +01:00
1 parent 1943e4a561
commit 0f73d7ee01
11 files changed
+471 -2

No files matched your search

+29 -1
View File
@@ -290,6 +290,34 @@
"Bash(docker * /var/run/docker.sock*)",
"Bash(docker run * -v /:/*)",
"Bash(docker run -v /:*)",
"Bash(docker * /:/*)",
"Bash(rtk docker * /:/*)",
"Bash(*/rtk docker * /:/*)",
"Bash(*/docker * /:/*)",
"Bash(docker *=/:/*)",
"Bash(rtk docker *=/:/*)",
"Bash(*/rtk docker *=/:/*)",
"Bash(*/docker *=/:/*)",
"Bash(docker * -v/:/*)",
"Bash(rtk docker * -v/:/*)",
"Bash(*/rtk docker * -v/:/*)",
"Bash(*/docker * -v/:/*)",
"Bash(docker *source=/,*)",
"Bash(rtk docker *source=/,*)",
"Bash(*/rtk docker *source=/,*)",
"Bash(*/docker *source=/,*)",
"Bash(docker *src=/,*)",
"Bash(rtk docker *src=/,*)",
"Bash(*/rtk docker *src=/,*)",
"Bash(*/docker *src=/,*)",
"Bash(docker *source=/ *)",
"Bash(rtk docker *source=/ *)",
"Bash(*/rtk docker *source=/ *)",
"Bash(*/docker *source=/ *)",
"Bash(docker *src=/ *)",
"Bash(rtk docker *src=/ *)",
"Bash(*/rtk docker *src=/ *)",
"Bash(*/docker *src=/ *)",
"Bash(git push --delete *)",
"Bash(git push * --delete *)",
"Bash(git push --mirror*)",
@@ -612,7 +640,7 @@
"Moving or renaming a directory inside the repo (`mv src/api src/api_old`, or any `mv` of a tree). It breaks imports and paths silently, and the breakage surfaces far from the command. Clear only when the user asked for that move.",
"Pushing in manual-push mode (`gitflow.autopush false`, set by the user): any git push by Claude — direct, scripted, aliased, inside a subshell, a Makefile target, a sub-agent, or after a HOME/GIT_CONFIG override that hides the key. The push-guard hook catches the direct forms; this rule covers the rest. A request to push in this turn does not clear it: the user types `! git push` in the terminal.",
"An inline interpreter or `xargs` that deletes, or that writes outside the current working directory: `python3 -c`, `python -c` or `node -e` calling `rmtree`, `remove`, `unlink` or `truncate`; `xargs` feeding `rm`, `mv` or `dd`. `find ... | xargs rm` is the case that matters, since it routes around the `find * -exec rm` deny rule. Reading, computing, and editing a file inside the working directory pass untouched.",
"Docker data destruction on this workstation: `docker rm -f` of a container, and `docker run` with a bind mount outside the current working directory or the session temp dir (volume drops, `system prune`, `compose down -v` and `--privileged` are static deny rules and cannot be cleared). Clear only when the user named the container or the mount in this turn.",
"Docker data destruction on this workstation: `docker rm -f` of a container, and `docker run`, `docker create`, `docker container run` or `docker compose up` with a bind mount outside the current working directory or the session temp dir (volume drops, `system prune`, `compose down -v` and `--privileged` are static deny rules and cannot be cleared). Clear only when the user named the container or the mount in this turn.",
"Discarding uncommitted work: `git checkout -- <path>` or `git checkout .`, `git restore` without `--staged`, `git stash pop` onto a dirty tree, or overwriting a modified tracked file with `cp` or `mv`. Git recovers a committed state, not this. Clear only when the user asked to discard those exact changes in this turn.",
"Undeclared node packages: `npx <pkg>`, `pnpm dlx` or `yarn dlx` of a package absent from the manifest and lockfile runs code fetched at call time; `npm install <name>` or `pnpm add <name>` adds a dependency the house rule requires naming first. Clear only when the user named the package in this turn.",
"Global npm installs: `npm install -g`, `npm i -g`, `npm add -g`, the `--global` spellings and a flag placed after the package name. A global package runs its install scripts with the user's rights on the whole machine. Before running one, state the package, its publisher, its age and download volume, whether it carries install scripts, and any known advisory. Clear only when the user named the package in this turn.",