Full Byte Developer.

3 yes/no questions before you give an AI agent a new tool

If your agent can do all 3 of these, one web page can make it send your files out.

Published here · 4 sources

Before you give your AI agent another tool, answer 3 yes or no questions. Simon Willison calls 3 yeses the lethal trifecta [1].

The 3 questions

  1. Can it read private data? (repo, .env files, email, database)
  2. Does it read content strangers wrote? (web pages, GitHub issues and PRs, emails, downloaded files)
  3. Can it send anything out? (web requests, posting comments, opening PRs, sending email)

All 3 yes: text a stranger wrote can tell the agent to read your data and send it to them. Break one yes.

How to break one

Remove outbound. Cut its ability to post or fetch. This is the cleanest break.

Avoid untrusted content. Do not point the agent at web pages, issues or files strangers wrote.

Deny your secrets. This narrows what can leak, though your code is still private. In Claude Code, add to .claude/settings.json:

json
{
  "permissions": {
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)"
    ]
  }
}

A Read deny does not cover grep -r or scripts. Turn on /sandbox so shell commands obey it too [3]. Run /permissions in Claude Code to see every rule and the file it comes from [4].

Research demo

Invariant Labs (May 2025) showed a malicious public GitHub issue could hijack a user's agent, which pulled private repo data and leaked it into a public pull request [2]. This was a research demo, not a breach.

The rule

Private, untrusted, outbound: pick two.

Send this to the friend about to give their AI agent email access and a web browser.

Keep this guide

By Full Byte Developer

Filed under AI agents, Security

Questions about this guide

Does a Read deny cover grep and scripts?

No. Turn on /sandbox so shell commands obey the deny too.

Why would a server send 404 instead of 403?

To hide that the resource exists. If you return 403, an attacker knows the record is real.

Sources

Next in this stack