Repository navigation
Guard waves 3-5: container, remote, Windows and wrapper passthrough; blind held-out-6 to 9 - #1993
Merged
Merged
Conversation
…blind held-out-6, 7 and 8 The destructive guard now checks the inner command of docker, podman, nerdctl, kubectl and oc exec/run/debug, sqlite3 dot-commands, watch, parallel, nohup and xargs -0, and blocks Windows and PowerShell drive deletes and formats, system-file writes, nested decode-exec, and secrets, cloud and VCS deletes. Held-out-8 (prereg/heldout8 e451111, pushed before scoring): wave-5 guard 48/60 blocked, 1/60 benign blocked; 49/60 after independent-review fixes that never saw the corpus; the guard at 7503ea3 41/60 (FP 2); hooks-mastery 14/60 (FP 7); safety-net 12/60 (FP 0, 2 unported). Held-out-6 and 7 were blind at 45/60 and 51/60, and are now in-sample with their blind rows pinned. The audit-skills triage covers four guard lines that quote the commands it blocks. Tests: 16/16 security gate scripts, test_audit_skills, test-destructive-guard 16/16, ci-tests.d pass (run-ledger, prepush-ci-parity and bench-check skipped locally: sandbox lsof, 200 s timeout, no origin/main in the clone), size-ratchet, bench_check, diff-check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
This was referenced Oct 25, 2026
remigiusz-antczak
added a commit
that referenced
this pull request
Oct 25, 2026
…-out-9 (#1994) 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 Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z Co-authored-by: Remigiusz Antczak <remigiusz@antczak.io> Co-authored-by: Claude Opus 5.5 <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.
This supersedes #1991, adding guard wave 5 and a third blind corpus. The destructive guard now sees commands hidden inside containers, remote shells, sqlite3,
watch,paralleland Windows shells. On a corpus frozen before any of these rules existed, it blocks 48 of 60 dangerous commands, against 14 for hooks-mastery and 12 for safety-net.Held-out-9, a fourth blind corpus, written after these rules were final. It was pushed before scoring (
prereg/heldout9, ffb22e7):The five misses are
aws kms schedule-key-deletion, a clickhouseDROP TABLE,gem uninstall -aIx,diskutil apfs deleteContainerandtmutil delete.Preregistered. Held-out-8 was pushed before scoring (
prereg/heldout8, e451111).Why 49 differs from 48. The fixes behind 49/60 came from an independent review that never saw the corpus. The extra block is a PowerShell
Get-ChildItem | Remove-Itempipeline.Remaining misses (11). These are the leads for wave 6:
tmutil delete,launchctl bootoutchained with rm, perlremove_tree,make clean ROOT=/, cdk, doctl, flyctl, heroku and clickhouse deletes,hg strip, and anIFSsplit. The one false positive isfind ./dist -name '*.map' -delete.Held-out-6 and 7 are now in-sample. The wave-5 rules were written against their misses. Their blind rows are pinned by
test_security_gates_heldout{6,7}_blind.py:Rule changes, waves 3 and 4 (as in #1991):
exec/run;kubectl exec|run|debug;oc exec|debug|rsh; sqlite3.shell,.systemand.read |.>>andteeonto system paths;/private/*aliases for rm;$VAR/..write targets.Rule changes, wave 5:
watchwith any flags and a quoted or unquoted command;parallelwith a quoted command string,:::or::::;nohup;xargs -0 rm.delandrdof drive roots and system directories;format, includingformat.com;diskpart;bcdedit /delete;reg deletewith the hive in any position;wmic ... deleteandcall format;Remove-Item -Recursewith flags in any order or fed by a pipeline.vaultdeletes;gh api -X DELETE;glabdeletes;deleteMany;cponto system files;openssl encpiped to a shell;kubectl exec ... bash -cwith a destructive inner command.Review history:
watchandparallelcommands, and Windows drive-root deletes.watch -dand--intervalbefore the command).format c:\ /qslipped past because of the trailing backslash.delof%SystemRoot%,%windir%and\Windowspaths is now blocked, and extension-scopeddel *.tmpin the current directory is allowed.kubectl run --overridesprivileged pods;ATTACHof non-system paths;ln -sfandrsynconto/etc;vault leaseandtoken revoke;git reflog delete;chroot -u;removeanddeleteOne;delwildcards that are still allowed:del *.*in the current directory,..\paths,%USERPROFILE%, non-system drives, and*.dllor*.sysunder System32. Main blocks none of these either;find . -prune | xargs -0 rm, oncpto/etc/*.bakand ondel /s /q *.log.#1991 failed CI on
test_audit_skillsbecause guard edits moved four finding fingerprints. All four are lines where the guard quotes the commands it blocks, and they are triaged with that reason.Local gates:
test_security_gates*.py: 16/16.test-destructive-guard.sh: 16/16.test_audit_skills: pass.ci-tests.d: pass, except three scripts that cannot run in the local sandbox:run-ledger(lsof),prepush-ci-parity(200 s timeout) andbench-check(needsorigin/main).bench_check: clean.git diff --check: clean. Privacy: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z