Build a compact security regression suite for prompt injection
Jump & context
Week 9: AI-SDLC Release Gates, PyRIT CI/CD, CFG Output Caging & Model Extraction Defense
The five hours
- 01
Concepts & system design
60 min· read · map the mechanismR28 — Microsoft PyRIT targets & scoring
R29 — Garak probes & detectors
R04 — OWASP LLM Top 10
Read the assigned sections; map the mechanism, threat model and trade-offs.
- 02
Project implementation
120 min· build · integrate · debugBuild the deterministic fast security regression suite (
D8PR gate: 20–50 cases covering prompt injection, BOLA/tenant isolation, unauthorized tool calls, output schema violations, and citation spoofing). Configure it to trigger automatically whenever model, provider, prompt, or tool schemas change.Build, integrate, debug and improve the increment in the active project.
- 03
Security lab
60 min· attack your own systemSeed a deliberate tool-authorization regression and verify the PR security suite catches it deterministically.
Test the abuse case, failure path, authorization bypass or resource limit.
- 04
Verification & evidence
30 min· test · record evidenceVersioned deterministic security test corpus + CI trigger configuration.
Add or run regression tests; record the 9-point evidence record.
- 05
Deliberate practice & Socratic review
30 min· explain aloud · update gapsAnswer the 8 Socratic questions without notes: What? Why? How? What if? Why not? How can I prove it? Where can it break? What have I learned?
Re-explain the hardest concept aloud, inspect one edge case, update the gap log.
- total5 h
Read today · inside the concepts block
R04 R28 R29Prompt injection, sensitive info disclosure, improper output handling, excessive agency, vector weaknesses, unbounded consumption.
Python Risk Identification Tool: targets, orchestrators, converters, scorers, and multi-turn attack automation.
LLM vulnerability scanner architecture: probes, generators, detectors, and buffs (authorized targets only).
Read only the named sections needed for today's task. Reading sits inside the 60-minute concepts block; it is not extra time.
Free resources for this day
5 curated- docsOWASP Gen AI Security ProjectOWASP Top 10 for LLM Applications
The risk catalogue your 20–50 PR cases must map to: prompt injection, sensitive information disclosure, improper output handling, excessive agency, and unbounded consumption.
R04checked 2026-11-11 - repoMicrosoft (GitHub)PyRIT: The Python Risk Identification Tool for generative AI
Provides targets, orchestrators, converters, and scorers as Python objects, which is what lets a deterministic case list run as a fast, non-interactive PR gate.
R28checked 2026-11-11 - videoMicrosoft DeveloperEpisode 8: Automating AI Red Teaming with PyRIT | AI Red Teaming 101
Shows a PyRIT run from initialisation through orchestrator, target, and scorer against a live endpoint, the same shape as a scripted regression case.
R28checked 2026-11-11 - videoKiso SecureLLM Vulnerability Scanning With Garak | AI Security Testing
Runs garak probes against a local model in an isolated lab and reads the detector output, showing how probe/detector pairs become pass-fail assertions.
R29checked 2026-11-11 - articleKunal GanglaniPrompt Injection Regression Testing [2026 CI Guide]
Describes a CI-ready suite with seed corpora, adversarial transforms, canary secrets, and hard-fail gates — the design pattern for triggering D8 on prompt, model, or tool-schema changes.
R04checked 2026-11-11
Evidence record · 9-point standard
A lab is complete only when it produces evidence. Installing PyRIT, Garak, Presidio or TransformerLens is not completion. Saved on this device only.
Day notes
emptyThe two source formulations
verbatim · nothing summarisedProject & Deliverable Target
All Projects | `D8` (PyRIT CI/CD Security Gate) | S8, M8
Core Implementation
Build the deterministic fast security regression suite (D8 PR gate: 20–50 cases covering prompt injection, BOLA/tenant isolation, unauthorized tool calls, output schema violations, and citation spoofing). Configure it to trigger automatically whenever model, provider, prompt, or tool schemas change.
Security Lab
Seed a deliberate tool-authorization regression and verify the PR security suite catches it deterministically.
Verification & Evidence
Versioned deterministic security test corpus + CI trigger configuration.
Read Today (60m Concepts Block)
R28 (Microsoft PyRIT targets & scoring), R29 (Garak probes & detectors), R04 (OWASP LLM Top 10).
---