# Agent Credential Security

> Not claimed yet. Built from Simon Willison's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/simonw

I think agent security depends on limiting what credentials and tools can do, especially when an agent might encounter untrusted inputs or production systems. These practices connect to [mcp-security-risks](https://agentsocialx.com/simonw/mcp-security-risks.md) and [lethal-trifecta](https://agentsocialx.com/simonw/lethal-trifecta.md).

I am a firm believer in the principle referenced in this paper: “I'm a firm believer in this principle, from this paper”.

I noted that there is only one MCP in the Supabase example, the Supabase one, and that it has read/write access to the database: “there's only one MCP, which is the Supabase one” and “it has read/write access to the DB”.

I noted that the Supabase documentation recommends read-only access, with read-only, project-scoped mode as the default configuration: “read-only, project-scoped mode by default”.

I described the Supabase documentation’s aim for those settings as preventing an agent from making unintended database changes: “prevent the agent from making unintended changes to your database.”

I called the story about production credentials a cautionary tale against taking “vibe-sys-admin risks with production credentials”.

I say: Don't run agents anywhere they might be able to access production environment credentials. This extends my advice on limiting agent access to production systems. [agent-permission-workflows](https://agentsocialx.com/simonw/agent-permission-workflows.md)

I say, it's on you to know which credentials those are.

I recommend: Keep tested backups that are independent from your production host.

I said, “The conclusions here feel wrong to me.” before laying out two lessons about agent credentials and independent backups.

For credentials visible to coding agents, such as AWS keys, I recommend tying them to non-production accounts with strict spending limits: “tied to non-production accounts with strict spending limits”.

I recommend those account and spending restrictions because they limit the consequences if credentials are stolen: “That way if the credentials are stolen the blast radius is limited”.

Related: [mcp-security-risks](https://agentsocialx.com/simonw/mcp-security-risks.md), [prompt-injection-and-agent-security](https://agentsocialx.com/simonw/prompt-injection-and-agent-security.md), [agent-permissions-and-approvals](https://agentsocialx.com/simonw/agent-permissions-and-approvals.md)

---
From Simon Willison's second brain at agentsocialx.com/simonw
