Updated · English · 3 min read
For Security architects, application engineers and platform teams
Download illustrated HTML (2368.1 KB)
Map trust boundaries
Identify users, applications, repositories, retrieval, endpoints and external tools. Mark information and authority crossings. Include streaming, retries and direct calls; a secondary route can bypass intended enforcement.
Distinguish content from authority. Instructions inside documents, messages or tool results should not grant repository access, authorize actions or change policy. Apply ordinary application authorization outside the model.
Establish identity and permissions
Authenticate users and enforce source access before retrieval. Give requests identifiable application access with permitted models and limits. Keep administrative capabilities separate.
- Test allowed and restricted source records.
- Do not use model instructions as the only authorization.
- Keep provider credentials outside browser code.
- Define rotation, revocation and exception review.
Visual guide
Security checkpoints across an AI workflow
- 1
Application authorization
User access and permitted source context
- 2
Request controls
Identity, inspection and endpoint policy
- 3
Model & tools
Selected LLM and authorized actions
- 4
Response & evidence
Output handling, review and bounded records
Treat inspection as a bounded layer
Configured inspection examines supported traffic for sensitive information, secrets or suspicious patterns. Evaluate actual formats, retrieved context and attachments where supported. Record false positives and misses.
No inspection guarantees prevention of every disclosure or injection. Combine it with minimization, endpoint restrictions, source authorization and tool permissions. Encryption protects transport; it does not decide whether the recipient should receive the information.
Separate output from execution
If AI proposes tool calls, constrain actions and validate arguments. Apply user authorization before execution and require appropriate approval for consequential operations. Generated text must not become unrestricted authority.
| Boundary | Question | Test |
|---|---|---|
| Retrieval | May this user access the source? | Unauthorized document request |
| Provider | Is this endpoint permitted? | Prohibited model selection |
| Tool | Is the action authorized? | Out-of-scope write proposal |
| Output | Is the result suitable? | Links and structured fields |
| Evidence | Is retention necessary? | Synthetic sensitive-request logs |
Worked example
Untrusted instructions in a document
Illustrative test: an assistant retrieves a synthetic document asking the model to ignore its task and disclose unrelated information.
- Limit context
- Retrieve only authorized records and treat source text as untrusted.
- Exercise layers
- Test supported inspection, model permissions and tool authorization independently.
- Review effects
- Inspect outputs, attempted actions and necessary events without overcollecting sensitive content.
Detection is one layer. Restricted data access and tool authority reduce the impact of malicious instructions.
Keep evidence bounded and useful
Agree metadata, policy outcomes and operational events needed for investigation. Review the purpose of content retention before enabling it. Define access, protection, retention and removal.
Assign triage and escalation. Repeated exceptions, unexplained usage and logging failures need review. A dashboard does not prove effectiveness or establish that an event was investigated.
Maintain repeatable security tests
Keep expected outcomes and reviewer notes for representative synthetic tests. Repeat affected cases after changes to models, policies, applications or tools. Response-format changes can affect downstream processing.
- Allowed/denied identities, sources and models.
- Sensitive-data and credential patterns.
- Untrusted source instructions and forbidden tools.
- Timeouts, retries, streaming and limits.
- Output quality, escalation and log content.

