SAHA31 · L2 + L4 Deep Dive · RAG & Memory Security
Defending RAG Pipelines: Retrieval Is Your New Perimeter
A RAG stack moves the attack surface into your data: every ingested document, every tool result, every memory write is now attacker-reachable context. The L2/L4 layers of the SAHA31 standard treat retrieval as a trust boundary and measure it continuously.
01The Controls That Matter (catalog rows 21–40)
- Trust-tiered retrieval. Every chunk carries an authority tier (internal-doc vs. web-scraped vs. tool-output). The model's prompt construction weights them differently; low-trust content can never carry directives.
- Cryptographic context isolation. System prompt and retrieved data are separated with signed boundaries, so a "ignore previous instructions" hidden in a retrieved PDF is structurally inert — not just "filtered."
- Cosine-poisoning detection. Adversarial tests run against the vector store: proximity anomalies, canary queries per tenant, and ingest-time provenance attestation. Every vector must prove its origin; the model handoff gate rejects unsigned data.
- Memory-write review. Agent memory writes are gated (who / what / when), versioned, and reversible. Persistent poisoning — a fake fact that survives reindexing — is a cataloged attack, not an edge case.
02Why "We Scan Ingest" Is Not Enough
Point-in-time scanning misses the two attacks that actually work: query-dependent payloads (poisoned records that only surface for specific popular queries) and cross-tenant bleed (retrieval crossing isolation boundaries). Both are standing L4 attack families with measured catch rates in the SAHA31 catalog — and both are invisible to a one-time ingest scan.
Book a RAG & memory integrity verification
Dr. Deepanjan Saha — Chief AI Security Red Team Principal & Chief Cybersecurity Architect. Deliverable: instrumented L2/L4 layers with provenance attestation wired into your ingest and retrieval paths, plus the meta-loop that keeps them honest.