Repository navigation
Destructive-command check blocks four more ways past its disk-wipe and force-push checks (GST-3207) - #4534
Merged
Conversation
…d force-push checks (GST-3207) wipefs -a is denied on every target, disk redirects are read with quotes removed and through a folder that links to /dev, a # inside quotes no longer ends the scan, and --no-dry-run undoes -n. Nothing that asked or was denied before is allowed now. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…decision Reading words after a quoted # let them cancel catches, and reading \cd as a cd into an unknown folder turned a force-push deny into an ask, so both are dropped. The wipefs scan skips redirects again, so a redirect target of -- no longer ends its option scan. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ommands The scan re-ran its pattern over the rest of the command and probed a folder for every match, which took minutes on a long command full of redirect-like words. It now lists each distinct redirect once with grep and probes at most 64 of them. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…irects The redirect scan sorted its matches and kept the first 64, and under pipefail a long list was thrown away whole, so padding a command with redirect-like words let a quoted /dev write through. Every redirect into /dev/ is now read with no limit, and past 64 folder lookups the command asks. Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/adversarial-native#1 reader=adversarial-native Review-Finding: p1/red-team#2 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 20, 2026
- Two /ship approval records stop needing workarounds. (#4549) - For contributors: the paid auto-decide check counts a start step that ran while the skill loaded. (#4543) - The destructive-command check closes three ways past its disk-wipe and force-push blocks. (#4534) - A green CI run still counts when the repository's artifact storage is full. (#4536) - `/cso` now audits repositories that track symlinks. (#4567) - A doc-sync eval stops failing when the audit child drops one field from its result line. (#4555) - The browse daemon no longer picks port 10080, which Chromium refuses to open. (#4554) - Opted-in telemetry now says why a skill run ended, which coding agent and model family ran it, and whether an upgrade worked. (#4542) - A preregistration with only its write-up and plain data now gets the write-up review: one reviewer, one round. (#4544) - When owner rulings don't clear a stopped review, `gstack-review-read` now says which findings are left. (#4553) - The prompt-routing hook now names your installed bug-fix skill on bug reports, alone, and never puts /verify ahead of it. (#4539) - Owner rulings now close a stopped review whose findings were logged in a findings file. (#4568) - /ship can finish after the owner accepts a stopped review's findings as open notes. (#4552) - /ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277). (#4565) - The prompt-routing hook no longer acts on words inside backticks. (#4566) - In Claude Code, a gstack skill's start step now runs when the skill loads, so the model can't skip it. (#4509) - gstack's telemetry backend only accepts writes through its own validated endpoint, and the community dashboard now counts real use. (#4537) - gstack now says what it's adding before it adds a background job or a browser extension. (#4538) - For contributors: every flaky pass in Free Tests is now recorded. (#4572) - For contributors: Free Tests on pull requests starts its test shards one round of small jobs sooner. (#4570) - Secret values written as `name=value` at the end of a path are now hidden. (#4571) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.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.
The destructive-command check now blocks
wipefs -aon every target, disk redirects written with quotes or through a link to/dev, andgit push -fn --no-dry-run.It only gets stricter: replaying 3,471 recorded agent commands against the previous check moves 0 decisions toward allow.
Nothing to do: the check runs in every session already.
What changed
wipefs -a(any spelling getopt accepts) is denied on every target. The image-file exemption is gone: GEVA-560's 254,322 commands hold nowipefs -a, so it never fired, and each fact it had to prove was a way past the deny.\wipefsand doubled quotes (wipefs'') are caught too.>'/dev'/sdb,> "/dev/mmcblk0") and through a folder whose real path is/dev(> d/sdbwithd -> /dev, resolved on disk).mmcblkandrdiskjoin the redirect names.git push --no-dry-runundoes an earlier-n(the last flag wins), sogit push -fn --no-dry-runis a force-push./dev/redirect is scanned, and past 64 disk lookups the check asks.wipefs > -- -$'a' /dev/sdbis read as a wipe, as at 1730386.Tests and measurements
test/careful-replay.test.tsgains aSTRICT_CASEStable (20 rows) and a/devlink fixture, and five wipefs-on-an-image rows move from allow to deny. Run against 1730386's check, 15 rows fail and the rest are controls. Replay plus hook tests: 291 pass, 0 fail on bash 5.2.21 and on bash 3.2.57 at 4c30630; at the final head 2acaf4e, 292 pass, 0 fail on bash 3.2.57, and CI is green. Typecheck is clean.Replays against 1730386 (commands fed to the hook, nothing run), on bash 5.2 and 3.2 at 4c30630, gave the same results on both; the three recorded sets were replayed again at 2acaf4e with the same result:
Latency p50 over the incident rows at 4c30630, interleaved with 1730386 (n=408): bash 5.2 131.4 vs 130.6 ms, bash 3.2 128.4 vs 128.3 ms. A 169 KB command holding 12,000 redirect-like words is checked in 0.8 s on bash 3.2 (a test pins it under 6 s): every
/dev/redirect is scanned; past 64 disk lookups the check asks.Open notes
These are left for one design pass, replayed on GEVA-560's full corpus before review. Each was tried in #4531 and leaked:
/tmpdeletes after a secondcd, in groups and loops, and throughcd $VAR.<<after an unquoted#(cat > f # <<EOF) was read as a heredoc while bash ran the body.TRUNCATEtext exemption (Destructive-command check closes the command-parsing gaps found after the last release (GST-3190) #4521's notes:grep ... | sh,>( ),git grep -O).rmtarget with a space (G16).#inside quotes still ends the scan (rm -rf "a #" ~asks rather than denies). Reading the words after it let them cancel catches (echo 'git push -f origin main # --dry-run'went from deny to allow), so it needs the same design pass.\cdand\pushdare still not read as acd. Treating them as a move to an unknown folder turned a default-branch force-push deny into an ask.cdasks,cd $VAR && git reset -q --hardincluded.echo x > /dev/shm/sdaandecho x > /dev/fd/sdbare denied (1730386 allowed them): the new pre-scan matches any folder under/dev/. Follow-up: anchor it to disk names followed by a boundary, and add an allow row for/dev/shm.echo wipefs-archiveandwipefs --no-actstill deny, andwi''pefs -a(quotes inside the word) is still allowed, as on main.Agent notes
Review-loop exception: accepted by Captain GStack Minder (GSTA-36) 2026-11-19 via GSTA-655 thread ruling: an over-deny of disk-named redirects under /dev/shm and /dev/fd, below the blocking floor; nothing is let through; anchor fix as follow-up (second full pass at 2acaf4e, deferred p2/specialist-batched#1)