RAG Security, Provenance & Data Poisoning
Stamp immutable `document_id`, `chunk_id`, `sha256_hash`, and `tenant_acl` at ingestion. Enforce tenant filters *before/during* vector search. Generate citations from server-verified chunk IDs (`D5`), never unverified model URLs.
Stage detail
When: Weeks 3--4, with controlled poisoning tests after baseline retrieval works.
- Vector-store access control and retrieval-time tenant/document filters.
- Row-level security where appropriate; it does not replace complete authorization design.
- Citation spoofing and provenance: source IDs, ownership, chunk IDs, page/section metadata, and server-generated citation links.
- Indirect injection in documents, metadata, OCR text, tables, and retrieved chunks.
- Data poisoning: malicious or misleading content inserted into the corpus.
- Ingestion risks: file type/size, parser vulnerabilities, archive bombs, path traversal, remote URL ingestion, and untrusted metadata.
Practice: insert a clearly labeled malicious test document into a disposable corpus. Ask a related question and measure whether the model follows the instruction or emits an attacker-controlled URL. Test provenance, trust labels, source filtering, instruction/data separation, authorization, and citation validation.
Do not learn yet: production-scale poisoning campaigns or assume one malicious document owns every answer. Measure retrieval probability, exposure, and impact.
Study days for this stage
12- 15Study embeddings, semantic similarity, chunking, and vector…W3S4M1D12R11 R13
- 17Artifact Pinning & Hash GateW3S4M1D12R12 R13 R37 R39
- 18Implement vector search and metadata filtersW3S0S4R03 R13
- 19Review the retrieval pipeline as an attack surfaceW4S0S1R10 R39
- 20Build the RAG API with retrievalW4S2S4R04 R41
- 21Server-Verified Citations & AbstentionW4S4D5R05 R14 R15 R45
- 25Add tenant/document ACL tests to the evaluation suiteW5S4R03 R13
- 62Test memory provenanceW11S4M6D10R13 R24 R41
- 81Provenance, ACLs & Multi-Hop ResearchW14S4S7M3D3D5D6D10R04 R05 R09 R13 R14
- 91Authorization & Isolation Red TeamingW16S0S4M1D2D3D4D5D7D10D11D12R02 R03 R05 R11 R13 R21 R24 R37
- 96Simulate a poisoned document or memory entryW16S4M6D5D10R13 R17
- 104Revisit training-data poisoning/backdoor experimentW18S4M2D5D10R19 R20 R45