You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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) #684
Found in the #594 security audit. Severity: medium. Status: plausible (code reading; the CLI paths are plain commands).
Affected code
Records that mean "the owner did this": created_by = cli / enabled_by = cli (crates/tole-cli/src/cron/trust.rs:77), plugin approvals (plugin_cmd.rsconsent: --hash approves without a terminal), skill approvals (tole skills approve), project-config trust (config_trust.rs), the delegation log (delegate.rs:74, "outside every workspace").
run_command / job_start only refuse the tole binary in child-agent mode (agents.rs:65check_child_agent_argv); a root session can run tole cron create --script ..., tole cron resume <id>, tole plugin approve X --hash H, tole config trust.
File tools (file_tools.rsjailed) only jail to the workspace. When the workspace contains $CODECORA_HOME (tole started in ~), write_file can edit ~/.codecora/tole/cron/*.jsonl, plugins.lock, skill-approvals.json, trusted-configs.json and the user config.toml. Only cron agent runs check this (ledger_in_workdir).
Problem
#581's rule "an agent job runs only after a human enabled it" and #599/#591's "only the owner approves" are enforced by WHO wrote a record, but any same-uid process the agent starts can write it through the official CLI, and the file tools can write it directly in the home-workspace case. One approved command turns a session into persistent unattended execution with owner authority.
Scenario
In a mission with --allow run_command (or after the owner approves a plausible tole cron resume job-...), an injected instruction runs tole cron create '@every 10m' --script 'sh -c ...': saved created_by = cli, a script job with owner authority, running long after the session. Or, with tole started in ~, write_file .codecora/tole/plugins.lock approves an arbitrary server.
Suggested fix
Refuse, in every session (not only child agents), a run_command/job_start argv whose program resolves to the running tole executable, and set a marker env (TOLE_AGENT_DEPTH already exists) that makes owner-only subcommands (cron create/resume/edit, plugin approve, skills approve, config trust) refuse to write when invoked under a session. This is defense in depth, not a boundary (a copied binary or Python can still write the files), so also:
Refuse a file-tool jail (and warn at startup) when the workspace contains the tole data dir, for every session kind, as ledger_in_workdir does for cron.
Activity
fix(security)!: owner-only records and tole binary refused under a se…
fix(security): build owner_only without the mcp feature (#684)
fix(security)!: owner-only records and tole binary refused under a se…
fix(security): build owner_only without the mcp feature (#684)
test(security): the discussion commands work under the session marker (…
fix(run_command): do not advise the bare name for the tole binary; ca…
fix(tools): name the real cause when a file path or program is refused (
fix(core): the session guard no longer refuses a quoted regex that me…
fix(core): the session guard refuses a quoted blank in a leading assi…
test(core): a differential test of the session guard against real she…
fix(session-guard): close the shell routes that still ran the tole bi…
fix(tools): accept an absolute path inside the workspace and a progra…
feat(sessions): tole sessions archive, an owner command that moves se…