Skip to main content
← All posts
5 min read

Your AI Agent Is a Privileged Insider

When you give an AI agent access to your tools, you've created a privileged insider. The threat model is different from a compromised service — because the agent acts non-deterministically, at scale, on your behalf.

Share

Last quarter I watched an AI agent, given broad file-system and shell access to "help with deployment tasks," silently overwrite a production config during a routine task. It wasn't hacked. Nobody prompted it to do it. The agent was following a reasonable interpretation of its instructions, and it had the permissions to act on that interpretation.

No breach. No malicious intent. Blast radius was small because we caught it in review. But it clarified something I'd been half-thinking for months: we had handed a privileged insider access to a system that doesn't reason about scope the way a human employee does.

What "privileged insider" actually means

In threat intelligence, an insider threat is an actor with legitimate access who can cause harm — intentionally or not — precisely because of that access. You can't block them at the perimeter. They're already inside.

The reason insider threats are hard isn't that insiders are malicious. It's that the access you grant for legitimate purposes is the same access they can misuse. The more capable the insider, the bigger the blast radius.

AI agents are privileged insiders. They have credentials, tool access, and the ability to take actions across your systems. They're also non-deterministic — the same prompt, in a slightly different context, can produce different tool call sequences. You cannot fully enumerate their behavior in advance. And unlike a human employee, they don't get tired and stop when something feels wrong. They complete the task.

The access pattern that's quietly becoming standard

A typical AI coding agent setup in 2026 looks like this: read/write access to the codebase, ability to run shell commands, access to environment variables (which often contain secrets), and sometimes direct API access to staging or production services for verification steps.

Each of these, individually, seems reasonable. Together, they describe a system with the access surface of a senior engineer with root.

The difference between that agent and your senior engineer: your senior engineer has 10 years of context about what they shouldn't touch. The agent has the instructions you gave it this session.

The blast radius you haven't calculated

Before giving an agent tool access, the question to ask is: if this agent's current task interpretation is completely wrong, what's the worst action it could take with the permissions I've given it?

A read-only agent with no shell access: wrong interpretation means a bad code suggestion you reject in review. Blast radius: minutes of your time.

An agent with shell access, write access to the repo, and production credentials: wrong interpretation means a pushed commit, a deployed config change, or a deleted resource. Blast radius: potentially hours of incident response.

The gap between these two is enormous. Most teams give agents the higher-access setup because it's more capable, without explicitly calculating what they've traded.

What least-privilege looks like for agents

Least-privilege for services means giving a process only the permissions it needs to perform its function. The same principle applies to agents, but the implementation is different because agents are task-specific rather than service-specific.

The pattern that works: scope permissions to the task at hand, not to the agent's general capability.

An agent helping with frontend refactoring doesn't need production database credentials. An agent helping write tests doesn't need deployment access. An agent doing code review doesn't need write access at all.

This means tooling that supports dynamic permission scoping — launching agents with a credential set appropriate to the task, not a single "agent user" with everything. Most teams default to the latter because it's easier to set up. You pay for it when something goes wrong.

Practical starting points:

  • Separate read-only and read-write tool configurations. Default agents to read-only; require explicit escalation.
  • Never put production credentials in the agent's environment for tasks that don't need them. Use scoped tokens with explicit expiry.
  • Run agents in a sandboxed environment for anything touching infrastructure. Require a human approval step before changes leave the sandbox.
  • Log every tool call an agent makes. Not just the final output — every action. You need this for incident reconstruction.

The audit log you're probably not keeping

If your agent had a bug in its instructions last Tuesday and made 40 tool calls across three systems, can you reconstruct exactly what it did?

Most teams cannot. They log inputs and outputs at the session level, not individual tool call traces. This is fine for debugging model quality. It's not fine for security.

Agents acting on production systems need the same audit trail you'd require from a human with that level of access: who authorized the session, what task they were given, every discrete action taken, and what changed as a result. Not because you expect malicious behavior — because non-deterministic systems operating at speed need the same forensic capability you'd want after any unexpected outcome.

The thing that changes everything

The question isn't whether to use agents with tool access. The capability is real and the productivity gains are real. The question is whether you've thought through the threat model before something forces you to.

An insider threat program doesn't assume your employees are malicious. It assumes that well-intentioned actors with broad access will occasionally do things that cause harm, and it designs the access model to limit that harm.

Your AI agents are well-intentioned. They'll also, given broad enough permissions, occasionally do something you didn't want. The blast radius is a function of the permissions you gave them.

Design accordingly.

Work with me

I consult with engineering teams on AI adoption, cloud architecture, and engineering effectiveness. If this post surfaced a challenge you're facing, let's talk.

Get in touch →

Explore more on these topics:

Subscribe to new posts

Get an email when I publish something new. No spam, unsubscribe any time.