Type
Method
Published
Reading time
3 min read
Author
Lire en français
Lire en français →

Prepare an LLM and RAG security audit before production

Which documents, identities and actions should an LLM, RAG or MCP assessment cover? A preparation checklist with eight fictional test cases.

Methodology and education

Read the article

Prepare an LLM or RAG security assessment by identifying retrievable documents, the identities accessing them and the effects available through connected tools. Write an observable question. Can customer A obtain information reserved for customer B, or trigger an action that requires confirmation?

This checklist supports assessment preparation. The cases below are fictional and their outcomes remain to be established on an authorised system.

What should a RAG system map include?

List document sources, the index, access metadata, retrieval steps and response construction. For each source, record who can publish, read and delete a document. Identify information sent to the model provider and information retained in logs.

OWASP describes unauthorised access and cross-context disclosure risks when retrieval controls are insufficient. Our proposed method turns those boundaries into explicit test expectations. OWASP on vector and embedding weaknesses

Which test cases should you prepare?

This example assumes two customer workspaces, a reader and a manager. Adapt the expectations to your permission model.

Fictional case Expected behaviour Evidence to retain
Reader A searches for an accessible A document Authorised answer with an identifiable source Identity and cited document
Reader A searches for a private B document B data remains protected, including retrieved excerpts Retrieval decision and answer
A document contains hostile instructions Reading and action permissions remain enforced Test document and observed effects
A tool receives another customer’s object Access denied before reading the object Authorisation decision
An external action needs confirmation Effect blocked until the required approval Approval and action record
Reading permission is revoked Subsequent requests respect revocation Time, identity and decision
A source is unavailable The application communicates the relevant limitation Answer and source state
The model or a connector changes Critical cases run against that version Version and comparable outcomes

Within the agreed scope, inspect retrieved excerpts, citations and tool outputs for the protected records. A short final answer can conceal excessive retrieval earlier in the workflow.

Does prompt injection establish a data leak?

A hostile instruction in an answer establishes model behaviour in that case. A finding about disclosure or an unauthorised action needs the observed effect and its prerequisites. Record generated text, the server’s decision and the actual action. OWASP describes injection entry points including content retrieved by an application. Prompt injection definition

Use identifiable test documents and non-sensitive records for a reproducible demonstration. Record model version, relevant settings and connector. Successful checks on selected examples leave other paths to investigate.

What should MCP tool checks cover?

Describe the identity supplied to the server, the authorised resource and each tool’s effects. Enforce access at the point where an effect occurs. Official MCP guidance discusses authorisation and delegation risks. MCP security practices

Our MCP assessment demonstrator runs local checks against an in-memory access contract. It illustrates a specific boundary and documents its limits. Use it to prepare questions about your architecture.

What belongs in the report and proposal?

For each finding, ask for objective, initial identity, assessed version, conditions, observed steps, demonstration records, established effect and recommendations. Identify the variants actually covered. Agree retest conditions when prompts, models, indexes or tools change.

Before providing access, define permitted data, allowed external destinations and stopping conditions. Bring your architecture and assessment requirements to RootZero. Scope, method and availability are confirmed during scoping. See the AI security requirements covered by this enquiry

Follow future rootzero publications

#AI security scoping

Start with data and effects.

Describe the LLM/RAG architecture, identities and connected tools. Method, scope and availability require confirmation.