Prompt injection is the problem of an agent following instructions hidden in the content it reads. A support ticket, an invoice, a web page or a record in a database can carry text addressed to the model. The model has no reliable way to separate the data it was given from the instructions it should obey.
Filters and better prompts reduce the risk. They do not remove it. So a security review of an agent that takes real actions should begin with a blunt assumption: at some point, this agent will be manipulated.
The useful question then becomes what a manipulated agent can actually do.
The blast radius is set by access
Take two versions of the same accounts-payable agent, both successfully injected by a malicious invoice.
The first holds an API key for the payment system. The attacker’s instruction reaches a process that can call any endpoint the key allows. It can pay a new beneficiary, change bank details or export records. Checks written inside the agent’s code run in the same process that has been misled, and a sufficiently odd path can avoid them.
The second holds no key for the payment system. It can only submit typed requests to a gateway, and the gateway holds the credential. The attacker has the same control of the model and far less to work with.
This is the point of keeping keys out of the agent. It does not make injection less likely. It changes what a successful injection is worth.
What the attacker can still do
We should be plain about this, because a security reader will ask.
A manipulated agent behind Sefra can still:
- Submit any intent it has been granted, with inputs chosen by the attacker, as long as they pass the schema.
- Cause a wrong action that policy allows. If the rules let this agent pay an approved vendor up to a threshold, an injected agent can do that too. Sefra judges the typed request, not the text that led to it.
- Write a misleading rationale to influence an approver.
- Waste attention by generating requests that people have to review or that consume rate limits.
- Read what its read intents return, and misuse that information through any other channel the agent has.
Sefra is not a prompt-injection filter, and it does not scan content. It reduces the consequences of injection. Prevention is a separate job.
What the attacker cannot do
Assuming the agent’s own credentials for those systems have been revoked, a required deployment step, the attacker cannot:
- Call the system of record directly, because the agent has no credential for it.
- Extract the write credential from the agent, because the agent never held it. Agent tokens are not forwarded either.
- Use an intent the agent was not granted. It does not appear in the agent’s tool list, and calling it by name is refused.
- Send an arbitrary API call. The agent can fill in the fields of a declared operation. The manifest fixes the method, path template and base URL. A value placed in a path stays one encoded segment, though it can select a different record.
- Exceed what the rules allow. A payment above the budget is denied where a rule checks it against live facts, whatever the prompt said. Sefra does not lock those facts, so the system of record remains the final check.
- Approve its own request. An agent cannot approve. Where the rule requires a distinct approver, neither can the user it acts for.
- Alter a held action after approval, because the decision is bound to a hash of the exact plan.
- Talk the policy engine round. No model takes part in a decision, so there is nothing to persuade.
- Rewrite the record through its own access. Its submissions are recorded, but no interface open to it can read, change or delete audit events.
Why typed requests matter here
A free-form tool that accepts “an API request” passes the attacker’s intent straight through. A typed intent narrows it.
An injected agent cannot add a field that the schema does not define, or send a string where an amount is expected. The values it can supply still matter, which is why the schema should restrict them where possible and why rules should check them against live facts.
The same thinking applies in the other direction. Content returned from a system of record could carry text meant to steer the agent on its next turn. Sefra returns only the output fields that a manifest names, with declared types. That limits this channel. It does not close it, because a text field can still hold text.
Protect the human as well
If an attacker cannot get past the rules, the next target is the person who can release a held action.
An agent’s own description of a request is the obvious vector: “routine correction, already agreed with finance”. Sefra builds the approval summary from typed fields, shows the rationale as unverified, and keeps it outside the approval hash. This reduces manipulation and does not eliminate it. A plausible-looking payment can still get a careless yes, and that is an argument for sending people fewer, more meaningful approvals.
The gateway becomes the target
Concentrating credentials has a cost. A service holding write access to several systems is valuable to an attacker, so it has to be treated as a high-value asset.
In practice that means scoping each connector credential to exactly the operations it needs, keeping secrets in a secret manager, restricting who can activate policy bundles, and running the gateway inside your own network. A person who can activate bundles can allow anything, so that role deserves the same care as a production administrator. The status page lists the further controls on activation that are planned.
A review you can run
For any agent with write access, write two lists. List what it can do if its model is fully controlled by an attacker. Then list what stops each item, and mark whether that control runs inside or outside the agent’s process.
Anything guarded only from inside is unguarded under this assumption. Anything with no entry at all is your exposure today. You may accept some of it, and it is better to accept it knowingly.