Repository navigation
fix(gateguard): look past sudo/doas/env when classifying destructive commands #2832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
haelyra
merged 8 commits into
affaan-m:main
from
ntdat812:fix/wrapper-prefixed-destructive-commands
Nov 17, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
eaf23b3
fix(gateguard): look past sudo/doas/env when classifying destructive …
ntdat812 1e2aa07
fix(gateguard): normalize wrappers per option arity, in find -exec, a…
ntdat812 89c1bf4
fix(gateguard): run env's split string through classification, not pa…
ntdat812 f48abf7
fix(gateguard): read env's option cluster and the split string's own …
ntdat812 d29d8a3
fix(gateguard): classify the command a find -exec shell wrapper runs
ntdat812 788bb6a
fix(gateguard): resume the option scan past a value, and stop capping…
ntdat812 989bae8
Merge remote-tracking branch 'origin/main' into fix/wrapper-prefixed-…
haelyra 7a57c82
fix(gateguard): resolve wrappers and nested shells in find -exec actions
haelyra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nestedShellCommandLines()scans past the shell's script name. For example,find . -exec bash /dev/null -c 'rm -rf /important/data' \;runs the empty script/dev/null; the remaining words are only script arguments. The new find-action scan instead treats that argument as shell code and raises an unnecessary destructive-command denial.Stop looking for
-cafter a script name or--, and add a passive regression case.Prompt To Fix With AI