Latest
finding the newest…
The List
New essays when they are finished. No schedule, no drip campaign, nothing sold.
A copy-paste trick for giving an AI agent a password or token without it ever reading it, plus the five most common ways people leak secrets instead.
Share this post:
Export:
AI agents now do real work for us: deploy apps, run servers, send email. Sooner or later one of them needs a password or an access token. The question is how you hand it over.
My agent and I worked out a little dance. It feels odd the first time and natural by the third.
The command reads the secret straight off my clipboard, delivers it to the machine that needs it, clears the clipboard, and reports one thing back: "Set (108 characters)." The agent learns that it worked. It never learns the secret. The secret never lands in the chat, on screen, or in a log someone could read later.
That's the whole trick: the AI writes the delivery truck but never opens the box.
1. Pasting it into the chat. "Here's my OpenAI key, go wild." Your key now sits in a conversation log on someone else's servers, in your chat history, and maybe in training or review pipelines, depending on your settings. You wouldn't read your bank password out to a call center that records every call. Same thing.
2. Saving it in the code. The AI helpfully puts your key in a settings file, the file gets saved to Git, and Git remembers it forever. Deleting it later doesn't help, because the history still has it. Then the project gets copied, shared and forked, and the key travels with every copy. Bots scan public code for exactly these keys, around the clock, and find them in minutes.
3. Email and Slack. I know the head of IT at a company I won't name who sends full admin passwords to anyone who asks, in a single email or Slack message. Email gets forwarded. Slack gets searched, exported and screenshotted, and gets new members every week. "It's private" means "it's private until it isn't." Use a password manager's share feature, or a link that self-destructs after one view.
4. Leaving it lying around in plain sight. On the screen during a demo, in a screenshot, on a sticky note, in a shared doc called "passwords (DO NOT SHARE)". Or my own slip this week: I pasted the token one time too many during the dance above, and it landed on the command line, where the AI's log picked it up. The trick only works if you follow the steps. When a secret leaks, don't debate it. Make a new one and switch it out.
5. Using someone else's secrets. This is the one that ends careers. It isn't your key you're pasting into a free AI tool; it's your company's database login, or your customer's. Now customer records (health data, financial data, personal details) have flowed somewhere they were never allowed to go. That's the stuff of HIPAA, GDPR and SOC 2 reports, and of very bad weeks. If the data isn't yours, the decision about where it goes isn't yours either.
For the engineers: the delivery script is about ten lines. It does pbpaste, pulls out the token with a regex, pipes it over ssh on stdin (so it never appears in the process list or shell history), writes it to a chmod 600 env file, prints only its length, then pbcopy </dev/null. Have your agent write one for each place a secret needs to go.
A Skill Is a Voice in Your Agent’s Ear: How to Safely Vet One Before You Run It
How to git clone and review an AI skill, and why you must sever its phone-home channel even when it looks completely benign.
Two Days, Two Codebases, Fourteen Findings
How an agentic security tool I built three days ago adapted to a brand-new target in under an hour, found 14 issues, and produced a clean fix branch i...
We ship a lot. No, I mean, like really we ship a lot.
We are a 34-person team with enterprise clients and our own products. We ship to production across many applications every day: Friday and weekends in...
Get notified when I publish new blog posts about game development, AI, entrepreneurship, and technology. No spam, unsubscribe anytime.
Loading comments...