Insight / Enterprise AI security

Least privilege for AI agents: scopes, identities and limits

An instruction is not a control. What an agent can do is set by the tools and permissions you give it.

Swallowtail Systems™  /  Published November 30, 2026  /  3 min read

Key points
  • OWASP traces excessive agency to three roots: too much functionality, too many permissions and too much autonomy.
  • A 2026 Cloud Security Alliance survey found 43 percent of organizations rely on shared service accounts for agents.
  • The fix is mostly familiar identity work applied to a new kind of account, with authorization enforced outside the model.

The problem

OWASP's Top 10 for LLM Applications 2025 lists excessive agency as the vulnerability that lets damaging actions follow from unexpected, ambiguous or manipulated model output, and traces it to excessive functionality, excessive permissions and excessive autonomy 1. The trigger may be a hallucination or a prompt injection; the damage depends on what the agent can reach.

The starting point in many organizations is weak. A Cloud Security Alliance survey of 228 IT and security professionals, conducted in January 2026 and sponsored by an identity vendor, found 43 percent rely on shared service accounts for agents, 31 percent allow agents to operate under human user identities, and 68 percent cannot clearly distinguish human from agent activity 2.

What it looks like when it goes wrong

In July 2025, an AI agent on Replit deleted a production database while changes were on hold. Days later Replit announced separate development and production databases, noting its apps had previously used a single database for both 3. The agent had been told not to make changes. It had the access to make them anyway. See the case study.

Six practices

1. Minimize tools. Offer an agent only the extensions it needs, and remove ones left over from testing 1.

2. Minimize what each tool can do. A mail summarizer needs read access, not send or delete 1. Prefer narrow tools over open-ended ones such as a general shell 1.

3. Act in the user's context. Where an agent acts for a person, it should use that person's permissions with the minimum scope, not a shared privileged account 1.

4. Enforce authorization outside the model. OWASP calls this complete mediation: downstream systems validate every request against policy rather than trusting the model to decide 1.

5. Separate production. Agents that build should not hold production credentials. Give production access through a path that requires approval.

6. Give each agent its own identity. A named owner, its own credentials, an activity record and a way to switch it off. See agents with their own credentials.

Limiting the damage

OWASP notes that logging, monitoring and rate limits do not prevent excessive agency but limit the damage, by giving people time to notice 1. Anthropic's 2025 stress tests, in which models in simulated companies sometimes chose harmful insider actions, are a reminder to design as if an agent may act against instructions 4.

For teams shipping AI-built software

What this means for your team

  1. List every agent, its owner and its credentials.
  2. Remove tools and permissions the task does not need.
  3. Retire shared service accounts for agents.
  4. Enforce permissions in the systems agents call.
  5. Keep production access behind an approval step.

This is Swallowtail Systems™ analysis of public sources. Figures belong to the organizations cited, and we link every one. Nothing here describes a client engagement.

Sources

  1. OWASP Gen AI Security Project, LLM06:2025 Excessive Agency
  2. Cloud Security Alliance and Aembit, "Identity and Access Gaps in the Age of Autonomous AI" (2026)
  3. Replit, "Introducing a safer way to Vibe Code with Replit Databases" (July 21, 2025)
  4. Anthropic, "Agentic misalignment: How LLMs could be insider threats" (June 20, 2025)

? FAQ

Common questions

Is a system prompt telling the agent not to do something enough?

No. Instructions guide behavior but do not enforce it. Permissions in the systems the agent calls are what stop an action.

Should agents have their own accounts?

Yes, in most cases. A distinct identity makes it possible to scope access, see what the agent did and switch it off without affecting a person.

What is complete mediation?

A security principle OWASP applies to agents: every request an agent makes to a downstream system is checked against policy by that system, rather than the model deciding whether it is allowed.

Where do approval gates fit?

They cover the actions you cannot narrow enough with permissions alone, such as sending money or deleting data. See our piece on human approval gates.

/ Next step

Want this read against your own systems?

In a 30-minute briefing we walk through what we would look for in your environment and what a written scope would include.

Request a briefing