Skip to content

docs(security): state that exec deny rules are a guardrail - #567

Merged
hakula139 merged 1 commit into
mainfrom
docs/exec-deny-guardrail
Oct 22, 2026
Merged

hakula139 merged 1 commit into
mainfrom
docs/exec-deny-guardrail

Conversation

@hakula139

@hakula139 hakula139 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

The security policy and the permission design doc treated an exec deny rule as a boundary in yolo, so any way around one was an in-scope vulnerability. No analysis of a command line can uphold that: cp /bin/rm ./x && ./x -rf ~ defeats any rule that names a program, and a rule cannot see what python3 -c, make, a build.rs that cargo build runs, or a git alias runs once it starts. yolo also runs the edit that writes such a script. This PR states the narrower claim that ox keeps, which describes current main.

  • SECURITY.md: a new trust-model paragraph calls exec deny and ask rules (the built-in rm rule included), and read and edit rules and protected paths applied to a bash command, a guardrail in every mode, and names what they cannot see. It then states the two properties whose gaps are vulnerabilities. In manual, a bash command runs without approval only if the gate parses all of it and nothing in it hides what it runs, every simple command is allowed by a rule or is a known-safe read, and every redirected write lands inside the working directory or an extra root or is allowed by an edit rule. Path deny and ask rules and protected paths hold for the file tools in every mode, short of a symlink swapped into a parent directory after the check (Sandbox bash and file tools at the OS level #133). The scope bullets follow these properties, and guardrail gaps go to public issues.
  • Design doc: decision 19 records the choice and its reasoning, the yolo mode entry points to it, decision 8 names ask rules beside deny rules as the path-tool boundary, decision 14 stops saying a deny rule holds only in manual, and decision 15 claims only that a misparse cannot hide a simple command from deny rules. The decision pipeline now names the shell-variable ask beside the parse ask.
  • Guides: the permissions guide adds a paragraph after the mode list for users, pointing unattended runs to a sandbox or container, and stops offering an exec deny pattern as the remedy for a program that reads guarded files. The headless guide names the shell-variable denial and gives the same sandbox advice.

#568 tracks the guardrail gaps #555 deferred (hash -p, alias, enable, function definitions, shopt, and [ a > b ]), so reporters have an issue to point at.

Test plan

  • cargo fmt --all --check, cargo build, both cargo clippy runs with -D warnings, cargo doc --no-deps, and cargo llvm-cov passed on the branch, with no code changes.
  • pnpm format, pnpm lint, pnpm spellcheck, and the pre-commit hooks passed.

Decisions

  • Narrow the published scope: the old claim never held, since the copied-binary case runs on every release. The narrower claim is one the gate can keep. Claude Code's bypass mode keeps deny rules but overrides its parse-failure ask, and Codex's --yolo keeps no rules, so neither offers more. An unattended boundary belongs to the OS sandbox (Sandbox bash and file tools at the OS level #133), and the auto classifier (Use a cheap model classifier to decide ambiguous calls in auto mode #131) will add judgment for the calls the rules leave open.
  • Keep the parse and shell-variable asks: a command the parser cannot read, or one that sets a variable bash finds commands by, still asks in yolo, so a misparse cannot hide a simple command from deny rules.

@hakula139 hakula139 added this to the v0.1.0 milestone Oct 22, 2026
@hakula139 hakula139 added documentation Documentation changes area: permission Touches permission rules, modes, or the approval gate labels Oct 22, 2026
@hakula139 hakula139 self-assigned this Oct 22, 2026
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

No shell analysis can stop a copied or renamed binary, an interpreter,
a build script, or a git alias from running what an exec deny rule
names, so calling such a rule a boundary in yolo promised more than the
gate can keep. State the guarantees that hold: in manual a command runs
without approval only if the gate reads all of it and every simple
command is allowed or known-safe, and path deny rules on the file tools
remain a boundary. Move exec-rule bypasses out of the security scope.
@hakula139
hakula139 force-pushed the docs/exec-deny-guardrail branch from 2fabe7f to 67f6fb7 Compare October 22, 2026 19:12
@hakula139
hakula139 merged commit cc11ae1 into main Oct 22, 2026
9 checks passed
@hakula139
hakula139 deleted the docs/exec-deny-guardrail branch October 22, 2026 19:17
@hakula139 hakula139 mentioned this pull request Oct 22, 2026
3 of 5 tasks
hakula139 added a commit that referenced this pull request Oct 22, 2026
## Summary

Prepares `v0.1.0-alpha.6` from `main` at `cc11ae10`. This prerelease
carries the security fixes merged since alpha.5, which are listed under
Security in the changelog. It also adds the `-r` resume-by-ID and
prompt-argument CLI changes, mid-turn compaction, `/exit`, and the
session file field removals.

- **Version:** Set the workspace package and lockfile versions to
`0.1.0-alpha.6`.
- **Changelog:** Prepend the git-cliff draft and curate it for users.
The section leads with highlights and a Security section that states,
for each fix, what the gap let through and which releases it affected.
Affected versions come from each PR body where it states them. For the
others, they come from checking the pre-fix code at each tag. The
section also notes #567's guardrail scope change and #554's session-file
change, under which binaries through alpha.5 list sessions titled by
newer builds as untitled.
- **Install snippets:** Point the pinned download commands in the README
and installation guide at the new tag.

## Test plan

- [x] `pnpm format`, `pnpm lint`, and `pnpm spellcheck` in the dev
shell.
- [x] `cargo fmt --all --check`, `cargo build`, `cargo clippy
--all-targets -- -D warnings`, `cargo clippy -- -D warnings`, and `cargo
doc --no-deps`.
- [x] `cargo llvm-cov --summary-only` ran to completion with 98.85% line
coverage.
- [ ] `cargo deny` not run: no dependency changed, only the workspace
crate versions in `Cargo.lock`.
- [ ] Current-head CI and the release archive checks are pending.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: permission Touches permission rules, modes, or the approval gate documentation Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant