Loading…
Loading…

I put two PDFs in a folder on my machine. One was a visitor form. The other was a payroll file. I asked my coding agent to put my name on the form. It did. Then I asked the same tool to read me a word from the first page of payroll. It did that too.
Both files were fake, but the permissions were real. Filling out the form had told me exactly one thing about the tool. It could do the job. I had to ask a second question to find out what else it could do.
I spent 30 years in software quality before moving into application security. One of the first things you learn as a tester is to try the input nobody expected. Enter a negative age and see what the form accepts. With a coding agent, even figuring out what counts as input takes some thought. I type a request, but the agent also reads the README, issue descriptions, project rules and instructions bundled with any skills I’ve installed. I wrote one of those things. People I’ve never met may have written the rest.
I started with PDFs because a skill that fills out a form is exactly the kind of add-on I’d be tempted to install, try once and keep. Skills can include scripts, and those scripts can use whatever access the environment gives them. Opening the finished PDF tells me whether my name is in the right box. It tells me very little about which other files the tool could open along the way.
I changed one permission and ran the test again. This time the tool had no read access to payroll. My name still went on the visitor form, and I opened the saved copy to check it. Then I asked for the same word from the same page of payroll. The operating system denied the read. Zero bytes came back.
Watch the test: Who Can Read Your Files?
For the second test, I made a small repository and asked Claude Code to set it up. If you opened the README in a browser, it looked ordinary. The raw file also contained a hidden comment asking the agent to send a key from .env to an outside address. I used a fake key and checked the baseline myself. With the original permissions, I could read the key and the outbound request went through.
I gave Claude Code the same setup request twice. The key stayed on my machine both times. On one run, Claude warned me about the comment. On the other, it finished without mentioning it.
That second run is the one I keep thinking about. If my test had just been “Did the key leave the machine?” I’d have marked both runs as a pass. But imagine a colleague asking me an hour later whether I’d had any trouble with that repo. After the first run, I’d know enough to warn them. After the second, I could honestly say setup went fine. From the output alone, I couldn’t even tell whether the agent had spotted the instruction.
So I denied the agent read access to .env and ran it in a sandbox with no outbound network access. Then I checked both sides again. Claude could still summarize the repo, and the tests still passed. When I tried the restricted operations directly, the file read returned nothing and the sandbox blocked the outbound request. I could verify both results regardless of what Claude chose to tell me.
Watch the test: Can a Hidden README Comment Steal an API Key?
Other teams have seen versions of this problem in real tools. Legit Security documented how hidden instructions could expose private source code through GitHub Copilot Chat. AWS also disclosed an unauthorized modification that made it into a released version of the Amazon Q Developer extension for VS Code. The software and the circumstances were different. What they bring home for me is how much trust I’m placing in material I may never see during an ordinary review. Legit Security’s CamoLeak research · AWS security bulletin
The objection I hear about least privilege is practical. What breaks when we take access away? That’s a fair question, and it’s why I opened the saved form and reran the repo tests. In these two cases, I could name exactly what the work needed. Putting my name on a form needed access to that form. Summarizing this repo and running its tests needed local project files. Payroll, the key and the outbound connection were all things I could take away and check for myself.
Simon Willison calls the combination of private data, untrusted content and a way to send information out the lethal trifecta. I like that framing because it gives me something concrete to look for before I start a session. When I open someone else’s repo, I want to see the raw instructions, keep approvals on for commands and network requests, and know which secrets are within reach. When I install a skill, I want to know where it came from, pin its version and look at what its scripts open, download or send. Then I give it only the access its job calls for, including on the days I miss something in review. Simon Willison on the lethal trifecta
For an engineering team, I’d start with four questions:
I’d start the conversation with question 3. I knew the README was poisoned because I wrote it. The next developer who opens a repo like that gets one run, and it might be the quiet one.