Part 4 recap · Agents
Agents: the short version
An agent copies what it can reach. Give it access, not the key.
Take the full lesson Part 5 recap: Coverage
Where the copies are
Issued by the payment service, kept in the vault, then 6 copies:
- Agent settings file
- Agent chat history on the laptop
- Web AI chat
- Code server
- Team chat
- Attacker’s public repository
The day, step by step
- Meet the key · 9:00 AM Meet the key.
- Agent settings · 9:20 AM Pasted into the agent’s settings file.
- Agent chat · 10:05 AM The agent read the key back.
- Web AI chat · 10:40 AM Pasted into a web AI chat.
- Agent commit · 11:15 AM The agent committed the settings file.
- Team chat · 1:30 PM Posted in the team channel.
- Bad package · 2:15 PM A bad package turned her agent into a searcher.
- Detect · 2:40 PM TruffleHog finds the copies.
- Verify · 2:42 PM Is it still live?
- Analyze and notify · 2:55 PM The right owner gets the alert.
- Rotate · 3:30 PM Swap in a new key.
- Confirm · 3:45 PM Confirmed: the old key is dead.
How it ended
Swap in a new key. Every copy, including the public one and the web chat, stops working at once.
Confirmed: the old key is dead. The agent can repeat the old key all it likes. It no longer opens anything.
Try it with TruffleHog open source
Install TruffleHog first; its README lists the options. Run these only on folders, images and buckets you’re allowed to scan.
-
Settings. Scans the files you name, such as an agent’s settings file, before anyone shares them.
trufflehog filesystem .mcp.json -
Commit. Runs as a pre-commit hook, so a commit an agent makes is checked like anyone else’s.
trufflehog git file://. --since-commit HEAD --fail
Keep going
- Try TruffleHog open source Scan a repository or a folder on your laptop.
- See TruffleHog Enterprise Continuous scanning, routing to owners, and re-checks.
- Talk to the team Ask how this would work in your environment.