The risk of an AI agent acting on a company’s systems is no longer a thought experiment. It now appears in post-mortems, security bulletins and breach notices.
The causes differ. Some reports describe an agent that made a mistake, some an agent that was manipulated, and some an attacker running agents of their own. Read together, they make a simple case. Once an agent can change a real system, security has to be part of the design from the first day, and it has to sit somewhere the agent cannot argue with.
What the last months showed
An agent found a key. In April, a coding agent working on an unrelated problem found an API token stored on a user’s machine and used it to delete a production database volume. Nobody had asked it to. The token had account-wide access, and the API carried out the deletion at once. The infrastructure provider later recovered the data and changed its API so that a deletion can be undone.
An agent read a hostile title. An open-source project used an AI bot to triage its public issues. A researcher showed that a crafted issue title could make the bot run commands, and that this route led to the project’s release credentials. After the disclosure in February the project rotated them, but the wrong token was deleted. Eight days later, someone used the surviving token to publish an unauthorised release.
A policy check misread a name. In November, a major cloud provider disclosed a flaw in its open-source MCP server. The server normalised operation names incorrectly before comparing them with the operator’s policy, so some operations never matched a correctly written rule to deny them or ask for confirmation. The control looked active while letting through what it existed to stop. A new release fixes it.
A connector became a key ring. Also in November, a European hosting provider reported that an attacker had exploited a flaw in the MCP server connecting customers’ AI assistants to its control panel. The attacker read customers’ session tokens, compromised dozens of projects and went unnoticed for eight days.
The attacker brought an agent. In July, an AI platform disclosed an intrusion that it described as driven end to end by an autonomous agent system. Starting from a malicious dataset, it harvested credentials and moved across internal clusters over a weekend.
Public guidance has moved in the same direction. In April, cybersecurity agencies of the United States, Australia, Canada, New Zealand and the United Kingdom published a joint guide on adopting agentic AI. The first recommendation in its announcement is to avoid granting broad or unrestricted access, especially to sensitive data or critical systems.
The pattern behind the incidents
Three lessons recur.
Standing credentials set the size of the damage. In the April deletion and the November breach, what turned one bad step into a serious incident was a token with far more reach than the task needed.
An instruction is not a control. A rule in a system prompt is one more input to the model that is about to decide. It can shape behaviour. It cannot enforce anything, because the same process that reads the rule is the one that may break it.
Speed removes the informal safety net. Much of everyday security relies on someone noticing that something looks wrong. An agent, or an attacker using one, can finish before anyone looks. The hosting provider’s logs showed seconds between steps that would take a person far longer.
There is a fourth lesson, less comfortable for anyone selling a control. The policy flaw and the connector breach both happened in the layer added to make agents safer or more useful. A security layer is software, and it deserves the same suspicion as everything else.
What first-class means in practice
Treating security as a first-class requirement means treating an agent as an untrusted caller, however capable it is and whoever built it. For an agent that writes to systems of record, we would require six things before it goes live:
- The agent holds no credential that can write to the target system.
- It can request only named operations with defined inputs.
- The decision is made outside the model, and anything not explicitly allowed is refused.
- High-impact actions wait for a person, who approves the exact action.
- Every write has a declared way back, or is known to have none before it runs.
- A record of what happened exists outside the agent’s reach and can be checked independently.
Where Sefra fits
Sefra is a governance gateway between AI agents and the systems of record they change. It adds a layer to the security you already run, at the point where an agent’s request becomes a real write.
- Keys stay out of the agent. Sefra holds the write credentials for the systems it fronts, and agent tokens are not forwarded. Once the agent’s own credentials are revoked, a required deployment step, it has nothing to go around the gate with.
- Only declared operations exist. The governed unit is a typed intent. Its manifest fixes the method, path template and base URL. An intent the agent has no grant for is missing from its tool list, and calling it by name is refused.
- Deny by default, and fail closed. Deterministic rules in Rego run on facts read from the system of record. No model takes part. If no rule allows an action, it is denied, and if a fact or the policy engine is unavailable, the request is refused.
- Approval binds to the exact action. A held action is tied to a hash of its plan, so it cannot change after a person has seen it. An agent cannot approve.
- A runaway agent can be stopped. Rate limits, a breaker that suspends a principal after repeated denials, and kill switches limit how far a loop or a hijacked agent gets.
- Failure has a planned path. Each write declares its compensation or is marked irreversible, and a plan that could not be unwound is refused before it runs. If an outcome is unknown, the execution stops for a person.
- The record can be verified. Each decision is written to a hash-chained trail before the call it permits, and a separate verifier checks the chain.
Take the April deletion. Behind Sefra, an agent could request only the operations declared for it, and a volume deletion it had no grant for would be refused. The token on that machine would still have worked, though, if nobody had revoked it. Sefra governs the path that runs through it, which is why removing every other path is a required step and not a recommendation.
What Sefra does not do
A security reader should hear this from us first.
Sefra does not detect prompt injection or scan content. It reduces what a manipulated agent can do. If policy allows an agent to pay an approved vendor, a manipulated agent can pay the wrong approved vendor.
It does not protect developer machines, build pipelines or data an agent reaches by other routes. Several of the incidents above began in exactly those places.
It is also a concentration of credentials, so the lesson of the November breach applies to it. Scope each connector credential to the operations it needs, keep secrets in a secret manager, restrict who can activate policy bundles, and run the gateway inside your own network. The status page lists the further controls that are planned.
Where to start
Pick the agent with the most write access in your company. List every credential reachable from where it runs, including files on disk and variables in its build pipeline. For each one, write down the most damaging single call it permits, and then what stops that call from outside the agent’s process.
Where the answer is “the prompt tells it not to”, you have found your first job.