Security teams used to ask where the perimeter is. For AI, a better question is where untrusted content can enter and what the system may do next. Sorting risks by layer makes the controls easier to assign, gives each layer an owner and turns a long list of threats into a short review you can run on any system.
Source: Best Secure AI for Business listings, head office country of 122 firms. Collected December 2026.
Five layers
Layer · What goes wrong · OWASP LLM item (5)
| Layer | What goes wrong | OWASP LLM item |
|---|---|---|
| Input | Instructions hidden in a prompt, a web page or a file change behavior | Prompt injection |
| Output | Unchecked output reaches a browser, a database or a shell | Improper output handling |
| Tools and agents | The agent holds more access than the task needs | Excessive agency |
| Data | Sensitive data appears in prompts, answers, logs or retrieval results | Sensitive information disclosure |
| Supply chain | A model, plug-in or data source brings the flaw | Supply chain, data and model poisoning |
The OWASP project also lists system prompt leakage, vector and embedding weaknesses, misinformation and unbounded consumption. Each of those fits one of the five layers: system prompt leakage and embedding weaknesses sit in the data layer, misinformation in output, and unbounded consumption in tools, where loops and heavy calls run up cost.
Risks and controls in each layer
Input
Anything a model reads can steer it. That includes the user's message, but also documents pulled from search, web pages an agent visits, emails it processes and results returned by tools. Direct injection comes from the user. Indirect injection hides in content the system fetched on its own, which makes it harder to spot and more dangerous when the system can act.
Control · Effort · Limits (4)
| Control | Effort | Limits |
|---|---|---|
| Keep system instructions separate from retrieved content in the prompt design | Low | Reduces confusion, does not stop determined attacks |
| Screen inputs for known attack patterns | Medium | Attackers rephrase; screening misses new forms |
| Mark retrieved content as untrusted and restrict what it can trigger | Medium | Needs design work in each application |
| Limit what the system can do if steered (see tools) | Medium | The control that still holds when screening fails |
Output
Model output is untrusted data. If it is placed into a web page, it can carry script. If it is passed to a database query or a shell, it can run commands. If it is shown to a customer, it can be wrong in ways that cause harm.
- Encode output before rendering it in a browser.
- Never pass model output directly into queries or commands; use parameters and allow lists.
- Validate structured output against a schema before acting on it.
- For customer-facing systems, check outputs for sensitive data and for content your policy forbids.
Tools and agents
When a model can call tools, the question becomes what the worst action is. OWASP calls this excessive agency: too many tools, too much permission or too much autonomy.
Control · What it limits (5)
| Control | What it limits |
|---|---|
| Least privilege per tool, scoped to the records the task needs | Scope of damage |
| A distinct identity per agent | Untraceable actions |
| Approval for actions that change state, move money or send data out | Irreversible mistakes |
| Caps on calls, steps and spend per task | Runaway loops and cost |
| A log of every call with its arguments and result | Blind spots in investigation |
Data
Data risk runs both ways. Sensitive data goes into prompts, and sensitive data comes out in answers. In between it sits in logs, caches, vector stores and vendor systems.
- Classify which data may enter which AI tools, and enforce it with approved tools.
- Filter retrieval by the caller's permissions at query time.
- Set retention for prompts, answers and embeddings, and confirm vendor retention in the contract.
- Test with planted, distinctive fake secrets to see whether they surface where they should not.
Our post on AI data leakage controls works through six leakage routes in detail.
Supply chain
AI systems depend on parts you did not build: base models, fine-tuned models from public hubs, plug-ins, tool servers, datasets and libraries. A flaw in any of them becomes yours.
Component · Risk · Control (4)
| Component | Risk | Control |
|---|---|---|
| Model files from public hubs | Tampered weights, unsafe file formats | Approved sources, scanning, pinned versions |
| Plug-ins and tool servers | Broad access, malicious instructions in descriptions | Register with owners, review, least access |
| Training and retrieval data | Poisoned or manipulated content | Source review, change tracking, spot checks |
| Libraries and frameworks | Ordinary software vulnerabilities | Your existing dependency scanning |
MITRE ATLAS catalogues attacks on models themselves, such as poisoning and extraction, with case studies. It complements OWASP, which focuses on the application around the model.
Which layers matter for which kind of system
Not every system carries every risk at the same weight. The table shows where to look first.
System · Heaviest layers · Lighter layers (5)
| System | Heaviest layers | Lighter layers |
|---|---|---|
| Staff using a public chat assistant | Data | Tools, supply chain |
| Internal search over company documents | Data, input | Tools |
| Customer-facing assistant | Output, input, data | Supply chain |
| Agent that updates records or sends messages | Tools, input | Output to browsers |
| Model you fine-tune and host yourself | Supply chain, data | Tools, unless the model also acts |
A system can move between rows as it gains features. An internal search tool that later learns to file tickets has become an agent, and the tools layer moves to the top.
Mistakes that recur in reviews
- Treating retrieved documents as trusted because they come from inside the company.
- Granting an agent a service account with access to a whole system instead of the records it handles.
- Logging every prompt for debugging and keeping the logs indefinitely.
- Testing a model once before launch and never again after a model or prompt change.
- Approving a plug-in or tool server without anyone reading what it can access.
Source: Best Secure AI for Business listings, tools named in the work of 75 firms. Collected December 2026.
What vendors name
The AI security vendor list holds 122 vendors, and 119 have a description we can read. Few name a specific risk in that text.
Term in the description · Vendors (6)
| Term in the description | Vendors |
|---|---|
| Data leakage, data loss or DLP | 6 |
| Red teaming | 4 |
| Guardrails | 3 |
| Shadow AI | 3 |
| Prompt injection | 2 |
| Supply chain or poisoning | 0 |
Vendors describe products, not threats, so these counts understate coverage. The services field tells more: 96 vendors list AI agents and 71 list generative AI. The agent security ranking and the LLM security ranking order those groups by evidence score.
The gap in supply chain wording is worth noting. No description we hold uses supply chain or poisoning, though some products do cover model scanning. If supply chain is a top risk for you, ask vendors directly and expect to combine an AI tool with your existing dependency scanning.
For tool-heavy deployments, the MCP view lists the 34 vendors that name the Model Context Protocol. For regulated data, the finance view lists 48 vendors.
Who owns each layer
Risks without owners do not get fixed. A typical split:
Layer · Usual owner · Supporting team (5)
| Layer | Usual owner | Supporting team |
|---|---|---|
| Input | Application owner | Application security |
| Output | Application owner | Application security, front-end engineering |
| Tools and agents | Identity and access management | Platform engineering |
| Data | Data protection or privacy | Data owners, legal |
| Supply chain | Platform engineering or procurement | Security architecture |
Write the owner's name next to each layer for every system that matters. Where two teams each think the other owns a layer, that is the gap an attacker will find.
A one-hour review worksheet
Pick one system you run. Fill in this table with the people who build and run it.
Layer · Worst realistic failure · Control in place · Owner (5)
| Layer | Worst realistic failure | Control in place | Owner | Gap |
|---|---|---|---|---|
| Input | ||||
| Output | ||||
| Tools and agents | ||||
| Data | ||||
| Supply chain |
Then rank the gaps by impact and by how easy they are to close, and fix the high-impact, easy ones first. Repeat for each system, and again whenever a system gains new tools or data sources.
Review checklist
- Every source of input the system reads is listed, including retrieved content.
- Output never reaches a browser, query or shell without validation.
- Each tool and permission is justified by the task.
- High-impact actions need a person's approval.
4 more
- Retrieval respects the caller's permissions.
- Retention for prompts, answers and embeddings is set and documented.
- Models, plug-ins and tool servers come from approved sources.
- An owner is named for each layer.
How often to repeat the review
Run the worksheet before a system launches, after any change that adds a tool, data source or model, and at least once a year for systems that do not change. Keep each completed worksheet with the system's record so the next reviewer can see what was decided and why. Over time the worksheets become a simple history of how each system's risk has moved, which is useful evidence when auditors or customers ask how you manage AI risk.
The NIST framework covers this work under its map and measure functions, which ask you to identify context and risks, then assess them with repeatable methods.
Source: Best Secure AI for Business listings, team size bands from company profiles. Collected December 2026.
Source: Best Secure AI for Business listings, industries named by 108 firms. Collected December 2026.
Where to go next
Start with the layer where your system can do the most harm, then work outward. The AI security ranking lists vendors with the strongest public evidence across all layers. Scoring rules are on the methodology page.