Retire the untrusted approval policy (#39630)

## What changed

- Remove `untrusted` from the CLI, configuration schema, and MCP tool interface. Explicit `approval_policy = "untrusted"` settings now fail with an actionable error.
- Remove the known-safe command allowlist. Projects marked untrusted now request approval for every command unless an explicit exec policy rule allows it.
- Keep command parsing conservative by treating in-place `sed` forms as mutating and ignoring unrecognized commands when recording memory usage.

## Testing

- Cover rejection of the retired configuration value and approval requests for commands in untrusted projects.

GitOrigin-RevId: d6bf425edddfffbb325eee6acf383434af5fd33b
This commit is contained in:
jif authored and copyberry committed 2026-08-20 07:03:02 +00:00
1 parent 9ca99b5171
commit 942af8447b
43 files changed
+218 -1380

No files matched your search

@@ -385,7 +385,7 @@ struct CoreShellActionProvider {
#[allow(clippy::large_enum_variant)]
enum DecisionSource {
PrefixRule,
/// Often, this is `is_safe_command()`.
/// Derived from the unmatched-command sandbox fallback.
UnmatchedCommandFallback,
}