It is easy to read a system prompt full of restrictions and feel like something has been secured. The real question is what happens when the model does not follow them.
I spent a week in SANS SEC545, GenAI and LLM Application Security, and the point that kept coming back to me is how much of securing AI is work security teams already know how to do. Least privilege, access control, data governance, segmentation and logging all still apply. We need to be clear about where we enforce them.
If I configure an ACL to deny traffic between two VLANs, the device evaluates the traffic against that rule. Assuming the rule is correct and the traffic passes through that enforcement point, the deny applies. The device does not decide the request sounds reasonable enough to make an exception.
Telling an LLM not to disclose sensitive information is different. The instruction can influence its response, but it does not remove the model's access to the information or prevent the application from sending it somewhere. Those are permissions the surrounding system has to enforce.
System prompts have a purpose. We should write them carefully and test them. But I would not give a service account broad production access because its instructions say to be careful. An AI agent should get the same scrutiny.
Sometimes the model simply gets it wrong. It misinterprets an instruction, misses a condition or returns something it should not. There does not have to be an attacker for the system to fail.
Prompt injection adds an attacker to the picture. An agent reads an email, document or web page that contains instructions planted by someone else. Instead of treating those instructions as material to process, the model follows them. Models have mechanisms for prioritizing instructions, but those mechanisms do not provide the reliable separation between instructions and untrusted data that we need for a security boundary.
Anyone who has dealt with injection flaws will recognize the problem. We are allowing input from a less trusted source to influence what the system does. Parameterized queries give us a structural way to separate SQL code from data. We should not assume that putting retrieved text between delimiters gives an LLM an equivalent boundary.
Agents also create a more ordinary problem: they can complete the assigned task in a way we did not intend. An agent told to resolve a customer issue might offer a refund it was never authorized to approve. Whether that came from an injection, a misunderstood instruction or an overly broad goal, the refund service should reject an unauthorized transaction.
I would start by looking at the agent's identity, the data it can retrieve and the tools it can call. Then I would ask what prevents it from exceeding its authority if every instruction in its prompt fails.
These controls can still be misconfigured or have gaps. The point is to give the system enforceable limits that do not depend on the model agreeing to follow them.
Simon Willison calls out a useful combination of risks in his lethal trifecta: access to private data, exposure to untrusted content and the ability to communicate externally.
Put those together and an attacker may have a route from a planted instruction to data leaving the organization. That does not mean every attempt succeeds. It means we need to examine the path before deploying the agent.
Where possible, break that path with an architectural restriction. Separate processing of untrusted material from access to sensitive data, remove unnecessary access, or prevent external transmission. Restricting one path does not make the whole application safe, so check the other tools and channels too.
For each AI deployment, I want answers to three questions:
AI adds failure modes we need to understand and test. It also gives us another reason to do the fundamentals properly. Before I am comfortable with an agent, I want to see what its permissions and surrounding controls allow it to do when the model gets something wrong.
Simon Willison, The lethal trifecta for AI agents (June 16, 2025).
OWASP, LLM Prompt Injection Prevention Cheat Sheet.
Can a system prompt enforce a security control? No. A system prompt can influence what a model says, but it does not remove the model's access to data or stop the surrounding application from acting on its output. An access control list is evaluated by a device at an enforcement point; a prompt is an instruction the model may or may not follow. Permissions have to be enforced by the identity, tool and network controls around the model.
What is the lethal trifecta for AI agents? The lethal trifecta is Simon Willison's term for three capabilities that become dangerous in combination: access to private data, exposure to untrusted content, and the ability to communicate externally. An agent with all three may give an attacker a route from a planted instruction to data leaving the organization. Breaking any one of the three with an architectural restriction removes that specific path.
How is prompt injection different from the model making a mistake? A mistake has no attacker. The model misinterprets an instruction, misses a condition or returns something it should not, and the system fails on its own. Prompt injection means an attacker has planted instructions in content the agent reads, such as an email, document or web page, and the model follows them as instructions rather than processing them as material. Both need the same answer: controls that hold when the model's instructions fail.
What permissions should an AI agent have? Scope the agent's credentials to its job, using identities whose permissions you can review, audit and revoke. Access to a connector should not grant access to everything behind it, and read access should not imply permission to update, delete or share. Each tool call should be authorized by the receiving service against the requested operation, resource and user, rather than trusted because it came from the agent.
How should AI agent activity be logged? Log outside the agent. Capture tool calls, authorization decisions and relevant network activity independently of the model's own account of what it did, so the record does not depend on the component you are trying to hold to account. Apply the same data protection to those logs as to any other sensitive telemetry.