November 25, 2026 · Field Note 001 · ~9 min read
Your AI Agent Has Credentials. Now What?
Somewhere in the last eighteen months, your "chatbot" stopped being a chatbot. It now holds an OAuth token for your CRM, a database DSN with write access, and a Slack webhook that can message anyone in the company. Security review hasn't caught up. This note is the threat model we start every agent review with — sanitized, no client specifics, yours to reuse.
The shift everyone missed
A text generator has one dangerous output: text. It can mislead whoever reads it — a real risk, but a familiar one, and one your existing review programs already cover: content filters, output review, disclosure policies.
An agent is a different object. Give it tools — function calling, an MCP server, a code interpreter, a browser — and its outputs become actions with non-repudiable side effects. A query that returns customer records. An email that sends. A payment that clears. The model is now the decision-maker in front of credentials that used to require a human to exercise.
Most security programs still file this thing under "AI risk" and review the model: jailbreak resistance, prompt-injection filters, acceptable-use policy. That reviews the wrong layer. The model was never the asset. The credentials are.
The threat model, compressed
Treat the agent stack as three boxes and distrust the boundaries:
- The model is untrusted. Not metaphorically — operationally. Any input that passes through untrusted content (web pages, emails, PDFs, ticket descriptions, code) can carry instructions, and instructions in context are commands to a model. This is indirect prompt injection, and no amount of system-prompt pleading eliminates it. Assume the model will, occasionally, do what the attacker's text says.
- The tools are the blast radius. What the agent can actually touch — which systems, which scopes, which write paths — defines the worst day you can have. Model compromise without tool access is an embarrassment; model compromise with a privileged tool is an incident.
- The credential is the persistence. A hijacked agent session is bad for an hour. A token exfiltrated through an agent is bad until rotation catches up — which, for OAuth grants nobody remembers approving, can be never.
Wrong model: "How do we make the agent safe?"
Right model: "If the agent is fully compromised tomorrow morning, what is the ceiling on the damage?"
That reframing is the whole discipline. You will never fully trust the model — that's a property of the architecture, not a defect you can patch. You can, however, make credential compromise survivable.
The four controls that actually matter
We run agent reviews against a longer checklist, but these four do most of the work:
- Scope credentials per tool, not per agent. The single most common finding: one service account with a wide role, shared across every tool the agent can call. Instead, each tool gets its own narrowly-scoped credential — read-only where writes aren't needed, single-table grants where possible, short TTLs by default. Compromise of one tool's token should be boring.
- Constrain the network path. An exfiltrated token is only valuable if it can be used from somewhere else. Network policy that pins the agent's egress to its legitimate destinations — and nothing else — converts "stolen credentials" into "credentials that don't work outside the cage." This is also your best detection point: any token used from an unexpected source is an alert, not a puzzle.
- Gate irreversible actions behind a human. Classify every tool by reversibility. Read-only queries: automate freely. Side-effect actions (send, pay, delete, merge, deploy): require a confirmation step where the human sees the actual payload — the diff, the email body, the transfer amount — not a summary the model wrote. The model summarizes; the system shows the ground truth.
- Log the causal chain, not just the call. "Agent called
crm.update at 14:02" is half a log line. You need: which user request started the chain, which retrieved content was in context when the decision was made, what the model reasoned, and what the tool returned. When something goes wrong, that chain is the difference between a five-minute answer and a two-week forensics engagement.
What doesn't work (in practice, repeatedly)
Three things we keep finding in reviews that fail on contact:
- Guardrail prompts as a control. "Never exfiltrate credentials" written into the system prompt is asking the model nicely. It raises the bar for casual misuse and does nothing against a deliberate indirect-injection payload — the attacker's instruction is in the same context, often later in the conversation, and has exactly the same authority as yours.
- URL allow-lists enforced in prompts. The model is not a firewall. If the enforcement lives in the prompt, the bypass lives in the prompt too.
- Red-teaming the model and calling the agent secure. Model red-teaming finds jailbreaks. Agent security is about what happens after the model is jailbroken. Both are worth doing; only one is on fire.
Five questions for Monday
- List every credential your AI tooling can currently reach. If two people produce the same list, you're ahead of most teams. If they can't, that's the finding.
- For each: what's the worst action it permits, and how long does it live?
- Can the agent reach any network destination it doesn't need? (Not "is it supposed to" — can it.)
- Which agent actions are irreversible, and what does the human actually see before approving one?
- When the agent does something unexpected, can you reconstruct why — from logs alone, in under an hour?
Score honestly. A rough answer to all five is a stronger posture than a polished answer to two.
The expanded version of this review checklist — 28 items including MCP-specific failure modes — is open as a public repository: github.com/capybara-consulting/mcp-security-audit-checklist. Star it, fork it, bring it to your next review.
Why we frame it this way
The asymmetry is real: the attacker needs one injected instruction to land, and you carry the roadmap. It's tempting to answer that asymmetry with fear — bigger guardrail decks, more scanning, vendor logos. But the levers that actually move the odds here are unglamorous and old: least privilege, network segmentation, human gates on irreversible actions, real audit trails. Four things infrastructure engineering solved decades ago, applied to a new object.
Your AI agents will be compromised eventually — by injection, by a poisoned dependency, by a bug. The engineering question is not "how do we prevent that." It's "what does the system look like the morning after." Build for that morning, and the agent becomes just another service you operate — calmly.
Make it concrete
If the Monday questions produced uncomfortable answers, that's what our Agent & MCP Security Review is for: every tool, permission, and exfiltration path mapped — before someone else maps it. Fixed scope, fixed price, you own the report.
Agent & MCP Security Review →
Not ready for that conversation? Just reply: hello@capybaraconsulting.agency · XMPP: capybara-consulting@5222.de