Repository navigation
Close the bypasses in the bash guard, and check the .claude toolkit in CI - #171
Open
blakebauman wants to merge 1 commit into
Open
blakebauman wants to merge 1 commit into
blakebauman wants to merge 1 commit into
Conversation
…n CI Probing guard-bash.sh with 17 commands found it allowed podman and docker-compose teardown with volumes, volume rm/prune, rm of the data roots with a trailing slash or glob, cp/mv/perl onto an applied migration, and the argv-pattern kill inside sh -c or behind xargs. Each is now denied, with a selftest case, alongside allow cases for the everyday commands next to them. validate.py now fails when a brief names a repository path that does not exist or the README's counts drift; fiber-devops named three files that were gone. make toolkit runs the validator, the selftest and shellcheck, and the check job runs it. Reviewers inherit the session model instead of pinning an older one. The allowlist no longer covers git branch -D. AGENTS.md carries the nine invariants and points at CLAUDE.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audit findings AIE-1 to AIE-4, AIE-6 and AIE-7 (11 Nov). Tooling only: no product code.
Guard hook
I probed
.claude/hooks/guard-bash.shwith 17 commands and it allowed 13. The table covers those and the close variants I tested while fixing them:podman compose … down -v,docker-compose down -v,podman-compose down --volumesdocker composedocker volume rm <fiber volume>,volume prune,system prune --volumesrm -rf data/workspaces/(trailing slash),rm -rf ./data/artifacts/*,rm -rf datacp/mv/perl -pionto an applied migration,rmof onebash -c "pkill -f fiber-agent",… | xargs pkill -f fiber-agent,pkill -f target/debug/fiberLeft allowed on purpose:
git checkout <rev> -- <migration>(restoring to HEAD is legitimate and the two are hard to tell apart), and everyday neighbours — copying a migration elsewhere,compose downwithout volumes,compose up -d,docker volume ls, removing one run's workspace,pkill -f vite. Each has a selftest case; the selftest goes from 26 to 53 cases.It is still a pattern guard, not a sandbox: a determined command (a script file,
python -c) gets through. It exists to stop the accidents.Toolkit checked in CI
validate.pynow fails when an agent or skill brief names a repository path that does not exist, and when.claude/README.md's counts drift. It immediately foundfiber-devopsnamingdeploy/Dockerfile.api,deploy/Dockerfile.uianddeploy/nginx.conf; that brief also described a two-job CI withRUSTFLAGS. Both corrected.make toolkitruns the validator, the hook selftest and shellcheck on the hooks; thecheckjob runs it.Smaller
fiber-reviewerandfiber-security-reviewerwere pinned toopus, so on a newer session model the reviewers were weaker than the implementer. Nowinherit.settings.jsonallowlistedgit branch:*as read-only, which coversgit branch -D. Narrowed to--listand--show-current.AGENTS.mdwas six lines; it now carries the nine invariants and points atCLAUDE.md, so a non-Claude agent gets them too.CLAUDE.md:http_requestadded to the durable built-ins, andmake smoke's description matches the target.ci.ymlnotes thatdenyis now a required check.Verified
make toolkit: validator 0 errors, selftest 53 passed / 0 failed, shellcheck clean at warning level.actionlintclean.Not verified
ubuntu-24.04runner and falls back toapt-get install python3-yaml; this PR'scheckjob is the first run of it.🤖 Generated with Claude Code