Skip to content

fix(security)!: owner-only records and tole binary refused under a session - #700

Merged
ajianaz merged 3 commits into
developfrom
security/owner-only-records
Nov 14, 2026
Merged

ajianaz merged 3 commits into
developfrom
security/owner-only-records

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

A session (root, child or cron agent run) can no longer run the tole binary through run_command or job_start, and the owner-only subcommands refuse to write when running under a session.

  • run_command and job_start refuse an argv whose program is the tole binary (by name, by resolving to the running executable, behind env/nohup/sh -c) and any argument naming TOLE_UNDER_SESSION.
  • Every process they start carries TOLE_UNDER_SESSION=1.
  • tole cron create|resume|edit, plugin approve, skills approve, skills drafts promote and config trust refuse when that marker or TOLE_AGENT_DEPTH >= 1 is set.
  • No write_file, edit_file or delete_file when the workspace holds the tole data dir.

BREAKING: see the CHANGELOG entries under Behavior change.

Why

A session could run tole cron create, tole plugin approve or tole config trust and have it saved as the owner's decision, bypassing the owner-only approval boundary.

Testing

  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace pass.
  • cargo check, clippy and test for tole-cli with --no-default-features (with and without shell-tools) pass.
  • New owner_only_e2e tests cover each refused subcommand under a session.

Closes #684

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

security(trust): owner-only trust records can be written by the agent (tole CLI from run_command, file tools when the workspace holds the data dir)

2 participants