Repository navigation
Guard wave 6: cloud, VCS, Windows and shell-split deletes; blind held-out-9 and 10 - #1994
Merged
Merged
Conversation
…-out-9 The destructive guard now blocks tmutil delete, cdk/cdktf/sst destroy, doctl/flyctl/heroku deletes, hg strip/purge, make clean with a root variable, `set -- rm ...; "$@"` (also IFS-split), aws kms schedule-key-deletion, gem uninstall of everything, diskutil apfs delete/erase, kubectl run with hostPID/privileged/hostPath, sqlite3 `.read |sh`, ln/rsync onto a system path, vault lease/token revoke and policy delete, git reflog delete, chroot -u, mongosh remove/deleteOne, clickhouse DROP, wmic call create/uninstall, reg add/copy/save on HKLM, rm -r under /Library and other system dirs, and Windows `del` of system files, `..` paths and a bare `*` or `*.*`. Allowed stay: find ./dist -name '*.map' -delete, cp to /etc/*.bak, git reflog expire with a non-now age, del /s /q *.log in the cwd. Held-out-9 (prereg/heldout9 ffb22e7, pushed before scoring): #1993 guard 55/60 blocked, 0/60 benign blocked; main before #1993 48/60, 0/60; hooks-mastery 8/60 (FP 2); safety-net 9/60 (FP 0, 1 unported). Held-out-8 and 9 are in-sample at 60/60, FP 0 after this wave; their blind rows are pinned in new *_blind tests. Tests: 20/20 security gate scripts, test-destructive-guard 16/16, test_audit_skills 11/11, ci-tests.d all pass (run-ledger, prepush-ci-parity, bench-check skipped), size-ratchet ok, test-ci-gates 162 PASS with 4+ dcr-gates opt-in FAIL from sandbox EPERM on port bind (surface_check selftest), git diff --check clean Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
This was referenced Oct 25, 2026
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.
Wave 6 closes the guard misses from held-out-8 and held-out-9 and the gaps the #1993 reviews folded forward. A fresh blind corpus (held-out-10, written after these rules) shows where the next wave has to go. Neither guard version moves on held-out-10, and both still block about three times as many dangerous commands as the ported rivals.
prereg/heldout10, 4a5cd20). The corpus is not part of this PR; it lands with wave 7.forget --prune;zfs destroy,zpool destroyandlvremove;f=-rf; rm $f ...);(cd /srv && rm -rf acme).find ./build -name '*.o' -delete;find . -name '*.pyc' -exec rm -f {} +;echo ./build | xargs -I{} rm -rf {};wipefs /dev/sdbwithout-a, which only lists signatures;shred -uof a file in/tmp;git reset --hard HEAD.test_security_gates_heldout9_blind.py. After this wave, held-out-8 and held-out-9 both score 60/60 with 0/60 benign blocked; those numbers are tuned and are not a generalization claim.Rule changes:
tmutil delete; cdk, cdktf and sst destroy, including through npx, pnpm dlx, yarn and bunx; doctl, flyctl and heroku deletes;hg stripandpurgewith global flags;make cleanwith a root variable in either position;set -- rm ...; "$@"and IFS-split commands;aws kms schedule-key-deletionbehind aws global flags;gem uninstall -aIx; diskutil apfs delete and erase in any case;kubectl runwith hostPID, privileged or hostPath overrides, behind kubectl global flags;.read |sh;lnandrsynconto system paths;git reflog delete; reflog expire tonowin the=, space and-c gc.reflogExpireforms;chroot -u; mongoshremoveanddeleteOne; clickhouseDROP;call createand uninstall;reg add,copyandsaveon HKLM;rm -runder/Libraryand other system directories;delof system files,..paths, and a bare*or*.*;xargs rmfed by a..source.find . -name '*.ext' -delete;cpto/etc/*.bak;now;del /s /q *.login the current directory.set --scan is linear. A 100 KB adversarial input now takes 0.1 s, down from 1.04 s.Review: 0 🔴 and 6 🟡, every one confirmed by a probe. Fixed in this PR:
run;DIR=/ make clean;..sources feedingxargs rm;set --scan.Folded into wave 7:
cpexemptions for any.bak,.origor.oldsuffix on a system path;ln -sfonto files in the home directory;rsyncto a remote/etc;vault operator seal;reg add HKU|HKCU;wmic /node: ... reboot;ALTER ... DELETEand SQL fed through stdin;make nuke|uninstall DESTDIR=/;bulkWrite.Also folded: the blind pin only checks the text in RESULTS.md and does not re-score.
Local gates:
test_security_gates*.py: 20/20.test-destructive-guard.sh: 16/16.test_audit_skills: 11/11.ci-tests.d: pass. As in Guard waves 3-5: container, remote, Windows and wrapper passthrough; blind held-out-6 to 9 #1993,run-ledger,prepush-ci-parityandbench-checkcannot run in the local sandbox.test-ci-gates.sh: the dcr-gates opt-in tests fail locally because the sandbox blocks port binding. CI covers them.git diff --check: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z