fix(core) disable command_might_be_dangerous when unsandboxed#15036
fix(core) disable command_might_be_dangerous when unsandboxed#15036dylan-hurd-oai wants to merge 3 commits intomainfrom
Conversation
| AskForApproval::Never => Decision::Forbidden, | ||
| AskForApproval::Never => { | ||
| if sandbox_is_explicitly_disabled { | ||
| // If the sandbox is explicitly disabled, we should allow the command to run |
There was a problem hiding this comment.
This could also be because no sandbox is available, like for Windows users who have not installed our sandbox?
There was a problem hiding this comment.
Ah I might be misunderstanding the intent of FileSystemSandboxKind. Should we instead use the following logic?
let sandbox_is_explicitly_disabled = matches!(
sandbox_policy,
SandboxPolicy::DangerFullAccess | SandboxPolicy::ExternalSandbox { .. },
)
I've updated to switch to this instead
|
Here's something that has been on my personal backlog:
Currently, because we cannot distinguish between Also, the point about |
|
re: prefix_rule(), I don't think this change supersedes any ExecPolicy decisions, since this change is in |
Summary
If we are in a mode that is already explicitly un-sandboxed, then
ApprovalPolicy::Nevershould not block dangerous commands.Testing