Repository navigation
test: pin the shell-string guard refusals and capture the kill default gap - #931
Merged
Merged
Conversation
Pairing a shell string's word on its written text also lets the home's own
entry read `sh -c "rm -rf ${X:-\${HOME}}/"` and `${X:+\${HOME}}`, which main
allows; nothing pinned that, so a later narrowing of the pairing could
reopen it silently. A brace the default leaves as text
(`${X:-\$HOME}}/`, which hands the string `$HOME}/`) stays allowed.
Refs: iss-2610110025455728
Assisted-by: Claude:claude-opus-5-5
Refs: iss-2610110946486757 Assisted-by: Claude:claude-opus-5-5
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.
What
This follows #927 with the notes from its Fable review. It is stacked on #927's branch and retargets to main when #927 merges.
sh -c "rm -rf ${X:-\${HOME}}/"andsh -c "rm -rf ${X:+\${HOME}}", which main allows. Nothing pinned that, so a later narrowing of the pairing could reopen it unnoticed. Both rows fail on main.sh -c "rm -rf ${X:-\$HOME}}/"hands the string$HOME}/, a directory under the working one, and stays allowed.sh -c "kill ${X:-\$(pgrep make)}"is allowed, on main too, although with X unset the string's shell kills by search. The string's re-read takes spellings from a written string but never the output of a substitution it holds. The fix belongs in how a string's input is fed, so it is recorded rather than folded in here.Refs: iss-2610110025455728
Refs: iss-2610110946486757
Assisted-by: Claude:claude-opus-5-5