Add standard restricted shell defaults - #146
Merged
Merged
Conversation
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.
Problem
Restricted shell mode currently starts with no allowed commands, so even basic discovery work asks users to approve shell prefixes. That creates avoidable friction, especially for users who do not know Linux command semantics well enough to judge every prompt.
At the same time, making new agents full-access by default is not the right tradeoff.
What changed
pwd,cd,ls,rg,grep,head,tail,wc,file,stat,du,df,date,whoami,uname,whichgit status,git diff,git log,git show,git rev-parse,git ls-files,git grep,git blame,git branch --show-current,git remote -vallowedCommandPrefixeswhen a fresh agent/workspace default execution config is created.allowedCommandPrefixesis the actual allow list,blockedCommandPrefixesis the actual deny list, and the blocklist still wins at runtime.disabledDefaultCommandPrefixesoverride model.Allow alwaysappends to the allow list andDeny alwaysappends to the blocklist without rewriting the opposite list.Validation
cargo fmt --checkcargo test --manifest-path src-tauri/Cargo.toml --lib— 916 passednpm run typechecknpm run lintNotes
These defaults are inspection-oriented, not a formal guarantee that every flag combination is non-mutating. The filesystem sandbox and blocklist remain the hard safety boundary.