I learned computer science through security. In the Windows 2000 and XP days that meant rainbow tables, aircrack-ng and reading 2600. Today I build an AI agent platform and harden its production stack myself. The first question I ask about any agent is the one I used to ask about a password hash: if someone gets hold of this, what do they get?
For an AI agent the answer is usually more than the person who set it up thinks. An agent can reach everything its keys can reach. It also takes instructions from whatever it reads.
That is two questions. What can the keys do? And who gets to put text in front of the agent?
Sources below were checked on December 6, 2026.
Why an agent is different from a normal app
A normal app does what its code says. An agent decides what to do from text, and some of that text comes from strangers: an email in the inbox it sorts, a PDF a customer uploaded, a web page it was asked to summarize.
The OWASP Top 10 for LLM Applications (2025 edition) puts prompt injection at number one. It calls the damage side “excessive agency” and gives three causes: excessive functionality, excessive permissions and excessive autonomy. All three are settings someone chose.
Simon Willison put the dangerous combination in one line in a post on June 16, 2025. An agent with access to your private data, exposure to untrusted content, and the ability to communicate externally is what he calls the lethal trifecta. If one agent has all three, anyone who can get text in front of it may be able to get your data out.
You can’t patch that inside the model. You remove one of the three, or you put a person in front of the third.
Check 1: list what each agent can do
Make a table. One row per tool, grouped by agent. Count every AI tool that holds a credential: the chat assistant with connectors, the coding agent, the support bot, the automation that calls a model on new email.
For each tool, mark which of four things it can do: read, send, spend, delete.
Here is an example for a made-up inbox assistant:
| Tool | Read | Send | Spend | Delete |
|---|---|---|---|---|
| yes | yes | no | yes | |
| Calendar | yes | yes | no | yes |
| Shared drive | yes | yes (share links) | no | yes |
| CRM | yes | no | no | no |
| Company card (for bookings) | yes | no | yes | no |
| Web browsing | yes | yes (form posts) | no | no |
Six tools, four columns, 24 cells. Count the “yes” outside the Read column: 4 send, 1 spend, 3 delete. That is 8 things someone could try to make happen by getting the right text in front of this agent.
Now look for the trifecta. This agent reads private data (email, drive, CRM), reads untrusted content (every inbound email, every web page), and can send (email, share links, form posts). It has all three.
The gotcha: fill the table from the scope on each token, not from what the feature is meant to do. They are often different. A connector built to read a calendar may hold a token that can also write to it, because asking for broad access once was easier.
Check 2: where the keys live
List every key the agents use: model API keys, OAuth tokens, database connection strings, cloud keys. For each one, write down four things:
- Where it is stored.
- Who can read it.
- When it was last rotated.
- How long a rotation takes, including fixing whatever breaks.
Then look for strays. Search your repositories and their history, not just the current files. Model provider keys usually carry a recognizable prefix, and AWS access key IDs start with AKIA:
git log -p --all | grep -nE 'sk-[A-Za-z0-9_-]{20,}|AKIA[0-9A-Z]{16}|BEGIN [A-Z ]*PRIVATE KEY'
Also check .env files in shared drives, keys pasted into chat threads, and keys written into an agent’s own instructions. Anything in the prompt, the model can repeat.
The arithmetic for item 4 matters more than it looks. Say three agents hold four keys each. That is 12 keys. At 20 minutes each to rotate and test, that is 4 hours of focused work, which is fine on a Tuesday. On a Friday night, with no list, it takes much longer.
Check 3: what gets logged
Pick a time yesterday afternoon and try to answer, for one agent:
- What did it read?
- Which tools did it call, and with what arguments?
- Who approved the actions that needed approval?
Many setups record the chat and not the tool calls. Some keep logs only in a vendor console, for a fixed number of days. Write that number down for each tool. If the answer to “what did the agent do last month?” is “we can’t tell”, that is the finding.
One caution. Agent logs hold whatever the agent saw, which can include personal data and secrets. Treat the logs with the same care as the data.
Check 4: which actions need a human first
Go back to the table from Check 1. For every “yes” in Send, Spend and Delete, write who approves before it happens. Blank means nobody.
Approving everything does not work. People start clicking yes without reading. Gate the actions you can’t undo: sending outside the company, paying, deleting, and changing permissions.
The approver should see what will actually happen: the recipient, the amount, the exact text. The agent’s own summary is not enough, because the summary is the part an injected instruction would write.
Post-quantum: harvest now, decrypt later
Encrypted traffic recorded today can be decrypted later, once a large enough quantum computer exists. NIST released its first three post-quantum standards (FIPS 203, 204 and 205) on August 13, 2024. In October 2026 it published the final version of NIST IR 8547, which, as Help Net Security reported on October 28, 2026, deprecates quantum-vulnerable public-key crypto after 2030 and disallows it under NIST standards after 2035. Key exchange is moving ahead of certificates: Cloudflare reported on October 28, 2025 that over half of the human traffic it serves already uses post-quantum key agreement, while no public post-quantum certificates were in use yet.
Here is why this matters for AI traffic. Prompts carry whatever staff paste in: contracts, patient notes, source code. If something sent to a model API today must stay secret for 10 years, that is 2026 + 10 = 2036, a year past NIST’s 2035 cutoff. To be clear, 2035 is NIST’s planning deadline, not a forecast of when the crypto breaks. It still means your data outlives the date the standards body wants classical key exchange gone. If someone records that traffic today, nothing you change later protects it.
The check: for each link in your AI stack (app to model API, agent to tool, app to vector store), find out whether the TLS key exchange is hybrid post-quantum. With OpenSSL 3.5 or later, which added ML-KEM on April 8, 2025, you can test an endpoint:
openssl s_client -groups X25519MLKEM768 -connect api.example.com:443 </dev/null
Gotcha: older OpenSSL does not know the group name at all. On my machine OpenSSL 3.0.13 refused with “group ‘X25519MLKEM768’ cannot be set” before it reached the server. If you see that, the failure is your client.
What to do with the list
If the table shows an agent with private data, untrusted input and a way out, cut one of the three this week. Usually the easiest cut is putting a human approval in front of “send”.
If you want a second set of eyes on it, I do this as a fixed-fee AI security review.