My AI security doctrine, fewer doors, fewer keys
I don't promise to stop the break-in, I reduce what it can reach. Six rules for treating an AI agent like an employee, my own gaps included.
On November 3, 2026, Binance published its own account of the heist. Some $6.34 billion in assets were hit, about $2.85 billion of which was frozen or intercepted.
In June, an engineer searched for an AI coding tool on a search engine and installed a tampered Homebrew, the command-line package manager. It was caught and the machine replaced. Binance never names the operating system, but the paths it lists run through /opt/homebrew, where Homebrew lives on Apple Silicon Macs.
The real breach came from somewhere else. In September, another engineer sat through fake job interviews and downloaded a take-home “assignment” onto his work machine. The malicious code ran during setup, and endpoint protection missed it at the time.
In October, the attacker used an internal AI tool to take control of two colleagues’ machines, and found a deployment token on one of them. On October 29, the funds started flowing out.
Binance hasn’t said how that tool served as a bridge, and nothing says it was an agent in the sense I mean here. So I won’t serve you a theory. The lesson holds anyway. A tool with privileges is a bridge. I have a doctrine, and it fits in one sentence.
I don’t promise to stop the break-in, I reduce what it can reach.
Here are my six rules, followed by what they don’t cover, my own gaps included.
The agent is an employee
An AI agent isn’t one more piece of software. Software does what it was written to do. An agent reads whatever’s lying around, decides, chains actions together, and it acts with your privileges.
So think of it as an employee. A new hire, very fast, very helpful, who never sleeps and readily believes whatever gets slipped onto their desk. You don’t hand them the master key on the first morning. You don’t let them wave just anyone in, you don’t leave the safe open behind them, and you sign the checks yourself.
That’s the title in a nutshell. Fewer doors means every way someone can get in or talk to it. Fewer keys means everything it can reach once inside.
But this employee wears your name on their badge. As far as the machine is concerned, when they get fooled, you did it. It can’t tell the difference; it simply applies your session’s privileges.
Read next, Your AI agent has the keys to your house
Rule 1, nothing third-party
No third-party MCP, and a locked allowlist. It’s my simplest rule, and the one that ruffles the most feathers.
An MCP (short for Model Context Protocol) plugs your agent into an outside tool. A third-party MCP is a subcontractor your employee lets onto the premises with their own badge. A stranger’s code, running with your privileges, that can change without warning. Worse, a local MCP runs outside the Claude Code sandbox, the fence that limits what the agent can do.
On my machine, the allowlist is enforced machine-wide, and it’s empty. The connectors offered by the account are switched off too. Note the word third-party. The Claude app ships with its own tools, computer-use for example. Those come from the vendor, along with the app, and you can adjust the permissions of most of them. Do it.
Giving this up costs less than you’d think, since the agent already knows how to run a script. And a tool you write yourself does exactly what you need, nothing more, and you know what’s in it. You don’t need to know how to code in Python. You iterate with your LLM, the two of you refine a spec, then it turns that spec into a script. The procedure is coming soon, with a complete example to adapt.
Can’t do without one? It happens. A business tool may exist only as its vendor’s official MCP. Then you drop one notch down the trust ladder, and the answer is hardening. An inventory of what’s plugged in, least-privilege access, configuration read before it’s loaded. That’s the level below my rule, and it’s infinitely better than plugging things in on autopilot.
The same caution applies to anything that comes in through that door, extensions and mods, and to the tool’s own installer. The tampered Homebrew in the Binance case was waiting for precisely that, someone looking for an AI coding tool.
Read next, Google Ads and real cat Claude share your credentials
Read next, MCP servers, the backdoor into your AI
Coming soon, Your MCP, write it yourself with your AI
Rule 2, homegrown is still suspect
You can see the shortcut coming. No third parties, so everything in-house, so everything’s fine.
“Built in-house” is not a guarantee.
Remember, the tool that served as a bridge at Binance was internal. And it wasn’t what opened the door. A take-home “assignment”, downloaded by a human, did that. Two lessons, then, one for your code and one for what you download.
My code first. It has no special virtue because it’s mine. It’s no safer than anyone else’s, except that I think about security from the spec onward and I test it by putting myself in the attacker’s shoes. That doesn’t make it flawless.
Then there’s what I download. Here, the weak spot is the human, and it’s one we all share. So you need guardrails that act on their own, before you even look. The machine doesn’t get tired. Any open-source code I pull in goes through a filter, lands in a sandbox and undergoes a full security review, prompt injections included.
With proprietary software, I have to partly trust the vendor. I write my articles in Obsidian, whose code I can’t examine. I can, however, keep it on a leash. It only ran once I’d approved it in Santa, and my outbound firewall has never let it onto the network, not even for updates.
What you write yourself deserves the same leash. Its functions locked down in the code from the start, an outbound firewall as a circuit breaker that stops it from reaching any destination but its own, the one secret it needs, and no way to touch its own guardrails without your fingerprint.
My rule for anything homegrown comes down to five requirements. The last one is optional for you, but I recommend it if you run a network of a few machines or a VPS.
- Short code. If I can’t read it in one go, it’s too long for me to trust. If the script has to be long, split it into blocks of functions and comment it thoroughly; plenty of developers skip this. When you reread your code a year later, believe me, you’ll be glad you did.
- Reviewed. Line by line, especially when the agent wrote it. If something puzzles you, iterate with your main agent until it explains it in plain terms.
- Limited privileges. It does one thing, and it reaches only what it needs to do it.
- Logged actions. What it did has to be readable after the fact.
- Alerts. Your SIEM analyzes what it does and flags the rules it breaks. Not everything, only what you’d actually act on.
My guardrails don’t escape this. A hook, that small script that refuses a command before it runs, is still code, to be reviewed and maintained like the rest. A shaky guardrail is a door painted to look like a wall.
Read next, Little Snitch vs LuLu, which outgoing firewall for your Mac
Read next, Code signing, the shared anchor of Santa and Little Snitch
Read next, the Sovereign SIEM series in full.
Rule 3, no secrets within reach
Binance said it plainly. The attacker found a deployment token on an engineer’s machine. A token is an access right, most often stored in a file. The key under the doormat.
Whatever the agent can read, an attacker who controls the agent can read too. There are two ways to deal with that, and they don’t do the same job.
Block reading. Deny rules written into the agent’s settings, covering your keys, your .env files and your personal folders. The software enforces them, not the model’s goodwill. They have their limit. A command that rummages through a folder without naming the file can slip through, hence the sandbox as a second layer.
Make the file disappear. An SSH key stored in the Secure Enclave, the Mac’s security chip, never leaves it. There’s nothing left to steal, only a signature to obtain, and it requires your fingerprint.
The second way is the better one, but it doesn’t suit everything. Here’s the question that counts. If someone had my machine for an hour, what could they walk away with without a fingerprint? The answer isn’t “nothing”, and we’ll get to that below.
Coming soon, Your secrets have no business in your AI
Read next, Your SSH key behind Touch ID, step by step
Rule 4, nothing exposed
A door that doesn’t exist can’t be forced. My servers are administered through a private mesh network, Tailscale, an encrypted network between my own machines and nothing else. No public admin port, and no needless public port at all. A service that has to answer the whole world answers. The rest has no street address.
Two caveats.
A private network doesn’t stop someone already inside. A compromised machine is still a member of the network. At Binance, the attacker pivoted from an internal machine. Hence segmentation, since my servers have no business talking to each other without a reason, and hence the key that demands a fingerprint for the access that matters.
The network itself has had a flaw. In late October 2026, a public report flagged that an already compromised device could, under certain conditions, get root on another one through Tailscale SSH, the Tailscale feature that replaces classic SSH. Tailscale published bulletins and a fix. The setup I recommend escaped that particular flaw, though not every flaw in the report, and the details are in the update box of my article on the Touch ID lock.
I was already advising against that feature, because it bypasses your key, and with it, your fingerprint. I learned that the hard way, on a server I thought was locked down and where root connections were still getting through without a key.
And yes, Tailscale is a third party. I’m well aware. Rule 1 is about what I plug into the agent. I’m not rewriting my network or my operating system. I choose my dependencies, and I keep the key and the fingerprint for the day one of them fails.
Read next, Your sovereign SIEM’s foundation, a hardened VPS outside the CLOUD Act
Rule 5, anything irreversible goes through a human
Your employee can prepare the wire transfer. They don’t sign it.
An instruction won’t hold an agent back, even spelled out in black and white. You need a barrier that doesn’t depend on its goodwill. I stack two.
The guardrail that says no. A hook reads the command before it runs and refuses the moves you can’t take back, wiping a whole folder, overwriting a history, piping into the shell what another command just produced. Written properly, it fails closed, refusing even when it crashes, which Claude Code doesn’t do by default. And nobody modifies it without going through the next layer, not even me.
The finger on Touch ID. My most privileged access goes through a key locked inside the chip. No program can trigger it on its own, whatever its privileges. An agent has no fingers, that’s its only teething problem, and that’s why the riskiest move of my day is still a deliberate one.
The known limit is that Touch ID proves you’re there, not that you understood what you’re signing. A hijacked agent can slip its request in at the very moment you’re expecting one. Hence the companion rule, refuse any fingerprint prompt you didn’t trigger yourself. It has happened to me. It was another session of my agent, and refusing broke nothing.
And the hook only sees the command as typed, not the script launched behind it. Behind both layers sits the backup, the one you’ve actually tested.
Read next, Guardrails that say no to your AI agent
Read next, Your SSH key behind Touch ID, step by step
Rule 6, see what’s going on
A rule nobody checks ends up as wishful thinking. Two tools play that role, and neither works miracles.
Santa runs in Lockdown mode on my machine. It doesn’t ban a list of threats. It only authorizes a list of programs, and everything else simply won’t launch. Wazuh, my SIEM, the tool that centralizes my machines’ logs, collects what’s reported and, thanks to the rules I wrote, connects an isolated block to what follows it.
Their limits matter as much as their promises.
- Santa judges binaries, not scripts. A script runs through an authorized interpreter, and it’s the interpreter that gets judged. Santa doesn’t read the script’s contents.
- A file lock only protects what it names. Whatever the rule doesn’t mention stays modifiable, and you never think of everything.
- Wazuh shows, it doesn’t defend. It makes things visible but blocks nothing on its own, unless you deliberately turn that feature on. On Mac, its file monitoring relies on scheduled scans, so a change is only seen on the next pass.
- An alert only exists if someone reads it. A SIEM that cries wolf gets ignored. Monitoring everything is pointless. Choose what deserves an alert and let the rest sleep in the logs, available the day you need it.
The standard account plays this role too, in its own way. Where an administrator account lets an app be copied in silently, a standard account throws up a prompt. And seeing starts with that, a question where there wasn’t one.
Read next, Santa on your Macs, the uninvited binary stays at the door
Read next, Santa in Wazuh, from noise to an alert that speaks
Read next, Your sovereign SIEM, learn to read it properly then make it act
Read next, the Sovereign SIEM series, especially episode 7, alerting without drowning in noise.
What this doesn’t cover
A doctrine is also judged by what it leaves out. Here’s the list.
I don’t always follow my own rules on privileges. Out of laziness or convenience, I sometimes grant more privileges than necessary. That’s the best reason to think about security from the spec of your agent or your MCP onward. Bolted on after the fact, in a system where everything is intertwined, it tends to produce shaky features.
My locks don’t cover everything, and no lock can.
Not all my keys are in the chip. A scheduled task has no finger, so it can’t sign with that key. That’s the promised answer to the rule 3 question. It isn’t “nothing”. Whatever remains, I keep to the bare minimum.
That leaves the biggest issue, and it isn’t technical. My filters stop what I download knowingly, not what a human in a hurry runs without checking first. And never-before-seen malware, by definition, isn’t on any list of threats.
These six rules grant no immunity. It’s all of them together, plus your discipline, that limits the risk and helps you decide what you hand over to agents, and how you build them.
Three things to do tonight
You don’t need six rules to start. Three things, and none of them costs a thing.
- Install from the official address, typed by hand. Never from a search result or an ad. For Homebrew, it’s
brew.sh, and you check what’s in the address bar before pasting anything into Terminal. - Never run a technical test on your work machine. A recruiter, a client or a friendly stranger asks you to run their project? Use a virtual machine or an old Mac with no access to anything, or don’t run it at all if it doesn’t feel safe.
- Look at what your agent can reach. Which MCPs are plugged in, which folders it reads, which keys are lying within its reach. In Claude Code in the terminal,
/permissionsshows your deny rules and/hooksyour guardrails. If you want details, ask your main agent. It’ll give you a rundown.
The rest will come rule by rule, in whatever order costs you least. Start by shutting what you don’t use. It’s free, and it’s already one less door.
Technical terms? Check the glossary.
Sources
The primary report
- Binance, the incident report, published November 3, 2026, covering the timeline, file operations, amount affected and measures taken.
The independent analyses
- StepSecurity, a software supply chain security company, whose analysis of the report confirms that the AI tool’s mechanism hasn’t been disclosed.
- 9to5Mac, a site covering the Apple ecosystem, which reads the Homebrew path the same way.
The vendors
- Tailscale, the security bulletins, including those from late October 2026 on Tailscale SSH.
- Anthropic, Claude Code’s managed settings, including the MCP allowlist.