Skip to content
Secure Smarter — Solutions for Modern Threats

From AI-driven SecOps to cloud security automation, Foresite delivers fully managed and scalable security solutions tailored for enterprise, hybrid, and multi-cloud environments.

Why Foresite — Security Excellence, Your Way

From our Adaptive Security Model to our Google Cloud & Wiz Premier Partnerships, we combine deep expertise, purpose-built technology, and customer-first flexibility.

Google Cloud Security — delivered by Foresite,
Premier SecOps Partner

Combine Google’s native security power with Foresite’s expert-driven, AI-powered operations to secure your cloud and unlock business growth.

Foresite - Google Cloud SecOps Delivery Partner Badge
Thomas AllenDecember 2, 20266 min read

A System Prompt Is Not a Security Control

A System Prompt Is Not a Security Control
8:19

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.

A prompt cannot enforce a permission

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.

How the boundary gets crossed

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.

Put enforcement where the action happens

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.

  • Scope credentials to the job. Use identities with permissions you can review, audit and revoke. Access to a connector should not automatically mean access to everything behind it.
  • Enforce authorization on each tool call. The receiving service should check the requested operation, resource and user permissions. Read access does not imply permission to update, delete or share.
  • Control outbound communication. Limit destinations and check what can leave through approved services. An allowlisted email service can still send sensitive data to the wrong person.
  • Require meaningful approval for high-impact actions. Show the reviewer the actual recipient, transaction or change being authorized, and bind the approval to that action. A generic permission to continue is not much of a checkpoint.
  • Validate outputs in code where possible. Check schemas, parameter ranges and business rules before execution. A valid format does not prove that the content is accurate or the action is appropriate.
  • Log outside the agent. Capture tool calls, authorization decisions and relevant network activity independently of the model's account of what it did. Protect sensitive data in those logs as well.

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.

Check for the lethal trifecta

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.

What I would ask before deployment

For each AI deployment, I want answers to three questions:

  • Which controls still hold if the model ignores its instructions?
  • What data and actions can the agent reach through its actual identity and tools?
  • Can untrusted content cause private data to leave, and where is that path blocked?

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.

References

Simon Willison, The lethal trifecta for AI agents (June 16, 2025).

OWASP, LLM Prompt Injection Prevention Cheat Sheet.


FAQ

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.

avatar
Thomas Allen
Thomas Allen is Chief Information Security Officer – C|CISO, CRISC, CCSP, ISO 27001 LA, CISA, CISSP, HCISPP, GCCC, GCFA at Foresite Cybersecurity, a Google Cloud Premier Partner and the 2026 Google Cloud Security Partner of the Year.

RELATED ARTICLES