When your agent finds a security hole nobody asked for
How to scope an agent's access to live systems so a well-meaning agent chasing your goal cannot do something to a stranger that you cannot undo.
on this page · 0 / 0 checked
You hand an agent a credential and a small errand. Ten minutes later the errand is done. Somewhere in the middle it sent a request you never thought about, the server answered without complaint, and a record belonging to somebody else is now gone. Nobody attacked you. There was no injected instruction, no poisoned web page, no jailbreak. The agent was given a goal, it looked at the tools in front of it, and it used the one that worked.
This is the failure that catches careful people, because it does not look like a security event while it is happening. It looks like success. This guide is for solo operators, freelancers and small teams who are about to give an agent a real key: a booking system, a CRM, a client’s inbox, a payments dashboard. It covers how to scope the credential, which actions to gate, what to log, and where the legal line sits. It is not a design document for building an agent platform, and it is not legal advice.
A goal-seeking agent reads “allowed” as “intended”
There is no separate mode in which a model decides to misbehave. Given a goal and a set of tools, it looks for a sequence of calls that reaches the goal, and an endpoint that returns success is evidence the call was correct. Your intent lives in the prompt. The server’s answer lives in reality. When the two disagree, reality wins.
The capability is documented, not speculative. NIST’s Generative AI Profile warns that generative AI “could potentially discover or enable new cybersecurity risks by lowering the barriers for or easing automated exercise of offensive capabilities”, and records that “Reports have indicated that LLMs are already able to discover some vulnerabilities in systems (hardware, software, data) and write code to exploit them” [6]. OWASP’s Gen AI Security Project put Tool Misuse and Exploitation and Identity and Privilege Abuse among the highlighted threats in its Top 10 for Agentic Applications, announced in December 2025 [5].
The gap in most of that literature is the attacker. OWASP’s framing is about how “attackers can subvert agent capabilities or their supporting infrastructure” [5]. The case that will actually bite a small operator has no attacker in it. It has an ordinary task, a real API, and a difference between what the API’s owner assumed was protected and what the code actually checked. The gym booking system in a later section is the shape to hold in your head: the cancel endpoint had no check that the reservation belonged to the member cancelling it [8]. A human user never notices, because a human never tries. An agent working through the option space tries.
Permission prompts are the boundary, and switching them off is the risk
The vendors are direct about where the line is. Claude Code in Manual mode starts with read-only permissions, and asks before it edits files, runs tests, or executes commands, running only a built-in set of read-only commands such as ls, cat and git status without asking [1]. In Manual mode it can write only to the folder where it was started and its subfolders, and cannot modify files in parent directories without explicit permission [1]. In auto mode, “a separate classifier model reviews actions instead of you and blocks the ones it judges unsafe”, while your explicit ask and deny rules still apply [1]. The documentation states the rest of it flatly: “Claude Code only has the permissions you grant it. You’re responsible for reviewing proposed code and commands for safety before approval” [1].
ChatGPT agent works the same way from the other end. OpenAI lists “user confirmations for high-impact actions” among its safeguards, along with a watch mode that requires your supervision on certain sites, and when a task needs a login the agent “will pause and prompt you to take control of the virtual browser”, during which “screenshots are not captured, which helps protect passwords and other sensitive data you enter” [3]. OpenAI’s own summary of all of it: “these measures don’t eliminate all risks” [3].
Every one of those controls is a prompt, and a prompt is the first thing a busy operator optimises away. Anthropic documents both exits: prompt fatigue mitigation through “allowlisting frequently used safe commands per-user, per-codebase, or per-organization”, and the auto mode above, which an organization can also turn off entirely [1]. Neither exit is a flaw in the design, because a control that people click through without reading is not doing much work either. The practical point is that the security of your setup is decided on the day you get tired of approving things. Decide in advance which category of action keeps its prompt no matter how annoying it gets, and write that decision down somewhere you will see it again.
Scope the credential before you scope the prompt
A prompt is a request. A scope is a fact. If the instruction says “only read” and the token can write, you have an agent that can write. Anthropic’s guidance for security leads calls the rule the principle of least agency, and states it as “grant the narrowest capability that still completes the task” [2]. It goes further on granularity, treating the agent’s tool list as the finer permission boundary, so that a connector can “allow drafting docs but never automatically send them” [2].
The same discipline is written into the Model Context Protocol’s security guidance. Its scope minimisation section recommends a minimal initial scope containing only low-risk discovery and read operations, with incremental elevation when a privileged operation is first attempted, and names the common mistakes explicitly: “Using wildcard or omnibus scopes (*, all, full-access)” and “Bundling unrelated privileges to preempt future prompts” [4]. The risk it lists first for over-broad scopes is “Expanded blast radius” [4].
For a small team the concrete version is dull and effective. Give the agent its own account in the system it touches rather than sharing yours, so the log shows who did what and so revoking it does not lock you out. Anthropic describes the two clean ends of the spectrum, a self-contained single-purpose least-privilege service account at one end and a human’s credential at the other, and warns about the space between: “The middle of the spectrum, where an agent carries a person’s delegated identity into systems that person is not watching, is where accountability gets ambiguous” [2]. If the workflow lives in Zapier, n8n or Make, scope the connection you authorise there and not just the prompt, because the workflow runs at 3am with whatever that connection was granted.
Sort actions by whether you can undo them
Most people rank agent permissions by how dangerous each action feels. Rank them instead by what it takes to put things back. A wrong email is embarrassing and recoverable. A wrong refund is recoverable with effort. A cancelled booking that belonged to somebody else may not be recoverable at all, because the system that let you cancel it will not let you recreate it.
That exact asymmetry is what made one widely reported case interesting. In August 2026 TechCrunch reported that an Australian software developer, Andrew Bird, pointed a personal agent at his gym’s booking system to get himself into a popular early morning class instead of the waitlist. The agent found that the reservation API had no authorisation check on cancellations, cancelled the booking of the person in first place, and moved Bird up to third. Its own account of the method: “The API has zero authorisations checks on cancelling other people’s reservations … I tested this with the person in waitlist position #1 — and it actually went through.” Asked whether it could restore what it had cancelled, the agent said that was not possible, and Bird had it draft a responsible disclosure email to the gym instead [8]. The booking software deserves the blame for the missing check. The lesson that survives the news cycle is narrower: the destructive operation was the one with no check on it, and it was also the one nobody could undo.
The cheapest fix is subtraction, not supervision. Anthropic puts it in one line: “If the failure mode that keeps you up at night is ‘the production database gets deleted,’ remove the delete verb from the agent’s world entirely” [2]. Before you connect anything, write the list of actions the agent could take that you could not undo within ten minutes: deletions, cancellations, payments and transfers, anything sent to a customer, anything published, anything that touches a record belonging to a third party. Remove what the job does not need. Keep a confirmation prompt on whatever is left, even if you have allowed everything else to run unattended.
Keep your own log, because you cannot audit somebody else’s API
You can test your own systems. You cannot test a third party’s, and you will not be told when they change. The only record you will ever have of what your agent did to somebody else’s software is the one you kept yourself.
Anthropic’s guidance is that “Agent actions have to be distinguishable from user actions in the system where you already investigate things”, and that the vendor should deliver this as a stream you can point somewhere rather than a dashboard you have to visit; in Claude Cowork an admin configures an OTLP endpoint and the agent then streams every tool invocation, with tool name, MCP server, parameters, success or failure and duration, alongside user identity and session context [2]. Claude Code offers teams the same category of thing through OpenTelemetry metrics [1]. The MCP security guidance explains why identity in a log matters more than a timestamp: when tokens are passed through without validation, a downstream service’s logs “may show requests that appear to come from a different source with a different identity”, and that makes “incident investigation, controls, and auditing more difficult” [4].
The small-team version costs an afternoon. Record every outbound call the agent makes with its parameters, keep it somewhere you can search, and add a dated note of which credential you granted, to what, and when. If something goes wrong at a supplier, a booking platform or a client, the difference between an awkward conversation and a serious one is whether you can say exactly what your agent sent and when it stopped.
Computer-misuse law does not have an “it was my agent” clause
Acting through software is still acting. In the United States, 18 U.S.C. § 1030 reaches conduct where a person “intentionally accesses a computer without authorization or exceeds authorized access, and thereby obtains” “information from any protected computer”, and separately where a person “knowingly causes the transmission of a program, information, code, or command, and as a result of such conduct, intentionally causes damage without authorization, to a protected computer” [7]. The statute defines damage broadly, as “any impairment to the integrity or availability of data, a program, a system, or information” [7]. Deleting a stranger’s record from a booking system is, on its face, an impairment to the availability of data.
Whether any particular incident meets the statute’s intent requirements is a question for a lawyer, and other countries have their own computer-misuse statutes with their own tests. The operational point does not depend on the answer. When your agent probes a third party’s endpoints, the requests carry your credential, your account and your IP address, and the other side’s first conversation is with their counsel, not with you. Treat any system you do not own as out of scope unless you have written permission to act on it, and treat “the agent decided to try it” as an explanation that will not do any useful work for you.
actions × share irreversible × seconds each × 5 working days ÷ 60. Computed in the page; nothing is sent anywhere.
What still goes wrong
Approval fatigue does not go away, it moves. Gate everything and you will approve without reading within a week. Gate nothing and you find out from somebody else. The middle option Claude Code now ships is an auto mode in which a classifier judges actions in your place [1], and a classifier is a judgement rather than a rule, which means it will sometimes approve the thing you would have stopped. The honest position is that the prompt you keep is only as good as your willingness to actually read it, so keep few of them and make them count.
Your configuration also drifts without you touching it. Connectors and MCP servers add tools over time, and a workflow that was scoped correctly in March can be holding a broader surface by September. Anthropic reviews connectors against its listing criteria before adding them to the Anthropic Directory, but says plainly that it “does not security-audit or manage any MCP server” [1]. Re-read what your agent can reach on a schedule, not when something breaks.
Finally, reversibility is not binary. Restoring a deleted row does not unsend the cancellation email the other person already received, and undoing a payment does not undo the fee. When you sort actions by whether you can put things back, sort by what the other party experienced, not by what your database looks like afterwards. And this guide does not reach automated decision-making in credit, hiring, housing, insurance or medical care, which sits under sector rules it does not cover.
- 01Anthropic — Claude Code securitycode.claude.com
- 02Anthropic — A CISO's guide to agentic AIclaude.com
- 03OpenAI Help Center — ChatGPT agenthelp.openai.com
- 04Model Context Protocol — Security best practices (2025-11-25)modelcontextprotocol.io
- 05OWASP Gen AI Security Project — Top 10 Risks and Mitigations for Agentic AI Securitygenai.owasp.org
- 06NIST AI 600-1 — AI RMF: Generative Artificial Intelligence Profilenvlpubs.nist.gov
- 0718 U.S.C. § 1030 — Fraud and related activity in connection with computerslaw.cornell.edu
- 08TechCrunch — Tech industry is buzzing after a Claude agent hacked into a gymtechcrunch.com