Repository navigation
Replies: 2 comments 1 reply
|
Opened the implementation as #18089, for reference while the direction is discussed. I understand it isn't eligible for review until a maintainer approves the scope here, and I'm happy to reshape or close it. |
0 replies
|
I also thought of this so I came to see if anyone else thought of it. I think there should be three tiers of secret storage: application level, project level, and thread level. I currently just have an ~/agents.env that agents use. It's a hell of a lot easier to just paste it into the chat, which is not ideal for security. I think a secret store is the perfect balance and anyone giving agents access to their secrets would use. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
When an agent needs an API key (deploy to Cloudflare, call the GitHub API, run a script against Stripe), today I either paste the key into the chat or write a file by hand and tell the agent where it is. Pasting puts the key in the transcript, the provider's context and T3 Code's event store. Writing a file works, but every user invents their own place and wording, and agents don't know to look there.
Provider environment variables (marked sensitive) cover keys the provider CLI itself needs. They are set per provider instance in settings, and the agent sees the value in its environment, so a stray
envprints it.Proposal
Secrets in the thread details panel: add, replace and delete named secrets for the environment. Agents find them with one read-only T3 tool and use them inside shell commands.
In scope:
CLOUDFLARE_API_TOKEN, masked value).t3_secret_list, returning names and file paths, never values, only to agents T3 Code launched on that machine. The agent instructions say to use a secret as"$(cat <path>)"inside a command and never print it.Out of scope: per-project or per-thread scoping, viewing a saved value, encryption or a password-manager backend, the mobile app, and injecting secrets into provider environments.
Security model
The value goes from the client to the server once and never comes back: clients get names, agents get paths. It is not a sandbox. Agents run as the same OS user as T3 Code, so an agent can read the file, and one that misbehaves could print it. The doc says so and recommends saving only keys you would let an agent use. It keeps keys out of chat and logs by default; it does not protect them from a hostile agent.
Related
request_secret) to save a value into the project's.env. That fits apps that read.env; this is for keys the agent itself uses in commands, saved once rather than per request.I have a working branch with tests and a browser and live-agent check, and can open a PR if the direction and scope look right.
All reactions