Security: an agent's shell can read other runs' folders, osfd's environment and secrets #201
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in run 77 (Free profile, production
ead9f7e),openspec.apply[3], served by Kilo's beam-free. The model reasoned "Hidden tests likely follow task naming… Let's search .osf maybe hidden test contracts?". It then used the shell tool to:find /var/lib/openspecflow -name "*physics*", which listed other runs' work trees;ls/findrun 62's and run 76'ssrc/physicsandtests;cp -rrun 62'ssrc/physicsand its test files into its own tmp, andsedthem;headrun 62'stmp/judge/physics-bundle.mjs;grep -rl … /var/lib/openspecflow.All 18 shell calls completed. Only the
readtool's direct path to another run was refused ("Refused: … This run's own folder is …").What an agent can reach today. Every agent shell runs as osfd's own user (uid 1000
braid, the same asosfd serveandopencode serve) and inherits opencode's environment:envprintedOPENCODE_SERVER_PASSWORD=…,OSF_FORGEJO_TOKEN_FILE=…,OSF_UI_BASE_URL=…; runs 68 and 72 printed their run'ssettings.jsonand listed itssecretfile;keys/. No run's history shows one read, but nothing stops it;On the Free profile, whatever a shell prints goes to third-party providers, and some of them train on prompts. On vLLM it stays on the local server.
Done now: run 77 stopped. No Free runs until this is fixed.
To do
OSF_*secrets or paths, noOPENCODE_SERVER_PASSWORD);read, any path under the state volume outside the run's own folder, plus the token and key files and/proc/*/environ.This is bypassable by a determined model, so it is not the fix.
First layer deployed in
c1228b4(agent-shells-see-only-their-run): an allowlisted environment for agent shells and a path guard, attack-reviewed. The real fix, a per-run sandbox, is #203 (research first; draft proposalagents-reach-only-their-run).The first layer is archived in OpenSpec as
agent-shells-see-only-their-run(5a953a0); the capability isagent-confinement. This issue stays open for the real fix, #203./**comment #264Closing at the owner's word (2026-11-11): the fix this issue waits for is tracked on braid#203, so one ticket is enough.
Where its three to-dos stand:
c1228b4and archived asagent-shells-see-only-their-run. Agent shells get an allowlisted environment, and the path guard refuses other runs' folders, osfd's secrets and/proc/*/environ.agents-reach-only-their-runis on main, not approved, with research still to do.agent-shell-confined, and the deploy self-check's line "an agent's shell gets none of osfd's settings or secrets, and the guard keeps it to its run",okin the deploy off27905f.The exposure is not closed. A model that computes a path at run time can still get past the text guard, and Free runs have gone on since 11-03 with only this layer. That stays true until braid#203 ships.