How to Secure AI Systems in Your Organization Without Blocking Adoption
A practical seven-layer security blueprint for enterprise AI, covering discovery, data egress, prompt injection, RAG permissions, agent tools, testing and monitoring.
IN BRIEF
Secure AI by enforcing controls around the model, not relying on model instructions alone. Start with asset discovery and data governance, then enforce application-level permissions, retrieval access controls, scoped agent tools, adversarial testing and useful security logs.
AI adoption is rarely stopped by a policy document. Employees and teams still need to summarise documents, analyse data, write code and automate workflows. If the organisation offers no approved route, some use may move outside the visibility of IT and security. That is a governance and discovery problem, not a reason to assume every employee will bypass controls.
The security objective is to make approved AI use safer and easier than unapproved use. That requires controls in the application, identity layer, data platform and operating process. A system prompt can guide model behaviour, but it cannot enforce authorisation or replace deterministic controls.
The seven layers of an enterprise AI security programme
Treat these as a practical architecture and governance checklist, not a mandatory sequence or a claim that every organisation needs identical controls. Tailor them to the use case, data sensitivity, deployment model and level of autonomy.
1. Discover models, embedded AI and connected tools
Build an inventory that includes internal applications, external APIs, self-hosted models, embedded SaaS AI features, retrieval systems and agent tools. Record the business purpose, owner, model/provider, data categories, hosting region, users, connected services and approval status.
Use procurement records, cloud inventories, SaaS administration, expense records and network telemetry as discovery inputs. Do not assume any one signal provides a complete inventory.
- Record model and application versions where available.
- Identify connected MCP servers, plugins and API integrations.
- Assign business and technical owners.
- Define a process for new tools and material changes.
2. Govern data egress and provider terms
Map what leaves the organisation when users submit prompts, upload files or use AI features. Review the exact provider terms and product configuration for training, service improvement, human review, abuse monitoring, retention, location and subprocessors. These terms can differ by product tier and configuration.
Zero Data Retention may be available for some services or customers, but it is not a universal property of enterprise AI. Treat it as a specific contractual and technical requirement where the risk assessment calls for it, and verify its scope and exceptions.
- Apply data classification and acceptable-use rules before data is sent to external services.
- Use DLP or an AI gateway where it can reliably identify and protect sensitive data.
- Keep API keys server-side and apply usage, rate and budget limits.
- Document permitted providers, configurations and data categories.
3. Treat prompts and model outputs as untrusted
Direct prompt injection comes from user input. Indirect prompt injection can arrive through documents, emails, web pages or other retrieved content. Delimiters and instruction hierarchy can help the model interpret content, but they are not security boundaries by themselves.
Do not put secrets or access-control decisions in system prompts. Enforce authorisation in application code and downstream services. Validate structured outputs against schemas, encode content for the destination context and avoid passing model-generated commands directly to sensitive systems.
- Separate trusted instructions from untrusted content for clarity, while assuming the model may still be influenced.
- Validate JSON and other structured outputs before use.
- Apply context-appropriate HTML, SQL and command handling.
- Test downstream consumers, not just the model response.
4. Enforce permissions before RAG content reaches the model
A RAG application should not retrieve a document merely because the model was told not to reveal it. Enforce user and tenant permissions at the retrieval layer, before chunks are added to model context. Verify that filters cannot be bypassed by changing a query, document identifier or user-supplied metadata.
Include source permissions, ingestion, embeddings, vector indexes, caches and deletion propagation in the design. A vector database namespace alone is not proof of isolation unless the application enforces it correctly.
- Test with users who have deliberately different permissions.
- Apply server-side filters using trusted identity context.
- Check access when documents are updated, moved or deleted.
- Log document identifiers and authorisation decisions where appropriate.
5. Give agents least privilege and constrain actions
An agent connected to APIs, databases or MCP tools can affect systems beyond the chat interface. Give each tool the minimum permissions needed for its task. Prefer the calling user's scoped identity over a shared privileged service account where the integration supports it.
Use explicit approval for high-impact actions such as external communications, financial transactions, production changes or destructive operations. Isolate code execution and constrain network access, runtime, step count and spend where relevant.
- Separate read and write tools.
- Validate every tool call server-side.
- Require human approval for consequential actions.
- Provide a way to revoke credentials or disable a tool quickly.
6. Test releases with repeatable adversarial evaluations
Maintain a version-controlled test suite for the application's actual threats. Include direct and indirect prompt injection, sensitive data disclosure, retrieval boundary failures, unsafe output handling, tool misuse and resource exhaustion where relevant. OWASP's 2026 list includes Prompt Injection (LLM01:2026), Excessive Agency (LLM03:2026), Unbounded Consumption (LLM06:2026), Hidden Context Exposure (LLM08:2026), Vector and Embedding Weaknesses (LLM09:2026) and Improper Output Handling (LLM10:2026).
Automated testing helps catch regressions but does not prove a system is secure. Combine it with architecture review, manual testing for high-risk use cases and retesting after model, prompt, data or tool changes.
- Define expected safe behaviour and pass criteria.
- Record model version, configuration and test environment.
- Keep reproducible evidence for findings and remediation.
- Use deployment gates proportionate to risk.
7. Log security-relevant events and prepare response
Ordinary web access logs may not explain why an AI application retrieved a document or invoked a tool. Consider logging prompt-template versions, model/provider version, retrieval references, tool calls, guardrail events, user identity and relevant request IDs. Minimise or mask personal and sensitive content in logs.
There is no universal rule that every AI system must retain every prompt or event for 12 months. Define retention from legal obligations, security needs, contractual commitments, privacy principles and incident-response requirements. Document who can access logs and how they are protected.
- Alert on unusual tool activity, repeated denials, abnormal usage and cost spikes.
- Maintain an incident runbook for data leakage, unsafe actions and provider compromise.
- Provide a controlled way to disable affected features or revoke tool access.
- Test response procedures through exercises.
A practical architecture review checklist
| Control area | Evidence to request |
|---|---|
| Visibility | AI inventory, system owner, model/provider and connected tools |
| Data governance | Data-flow map, classification, provider terms, retention and subprocessors |
| Application security | Output validation, prompt-injection tests and downstream handling |
| RAG security | Pre-retrieval ACLs, tenant isolation and deletion propagation |
| Agent security | Scoped identity, least privilege, approval gates and revocation |
| Assurance | Versioned evaluations, logs, incident response and retesting |
Frequently asked questions
Should an organisation ban public AI tools?
Not as a default substitute for governance. Define which tools and data uses are permitted, provide approved alternatives and apply proportionate technical controls. Some uses may need to be prohibited based on data, law or risk.
Is a system prompt a security control?
It can be a behavioural instruction, but it does not enforce access control. Use application logic, identity, permissions, validation and monitoring for security boundaries.
Does enterprise AI always provide Zero Data Retention?
No. Retention and data-use terms vary by provider, product, tier and configuration. Verify the actual contract and service settings.
How do we test RAG data leakage?
Use controlled test identities with different access rights and documents. Attempt retrieval across those boundaries and verify that server-side filters prevent unauthorised chunks from entering model context.
Which framework should we use?
Use OWASP LLM guidance for application-security risks, NIST AI RMF for risk-management activities, and MITRE ATLAS for adversary behaviours. Select controls based on the system and risk rather than treating any one framework as a complete checklist.
Sources and further reading
- OWASP GenAI Security Project: 2026 LLM Top 10
- NIST AI Risk Management Framework
- MITRE ATLAS
- OWASP GenAI Security Project
Turn the architecture review into a repeatable assessment
The CNSLT Field Guides are currently available under a free introductory offer. Field Guide 001 provides an editable AI security and GRC review workbook with an asset inventory and control checks. Adapt it to your architecture and risk; it is not a certification or compliance guarantee.
EXPLORE THE FIELD GUIDES ↗