Capstone: threat model, harden and gate a small LLM application
Choose a small LLM application you can run locally, such as a document summarizer with one tool. Draw its pipeline, write a threat table, add one control for each of three risks, build a regression suite and write a release gate that states what it does not prove.
The capstone labs
- Put an LLM gateway in front of your apps with LiteLLM: virtual keys, budgets and rate limits: You put per-key budgets and rate limits in front of an app and see them enforced, the cost control from unit 3. Runs on your machine.
- Measure the false-refusal rate of an LLM safety guardrail on legitimate security work: You measure how often a guardrail refuses legitimate work as well as how often it allows harmful requests, the trade-off every filter in this class has. Runs on your machine.
Write it down
- Draw the pipeline of your application: sources of text, the prompt, the model, each use of the output and each tool, and mark every point where someone other than you controls the text.
- Write a threat table with one row per OWASP Top 10 for LLM risk that applies: where it sits, what it could do, and the control you chose.
- Implement three controls (for example output encoding, a narrow tool with an approval, and a pinned and hashed model) and test each against dummy data.
- Build a small regression suite with a stated attempt budget and benign requests, and run it before and after your controls.
- Write a one-page release gate: what must pass, who approves a consequential action, and the list of things your tests do not prove.
You are done when
- You can draw an LLM application's pipeline and place the main risks on it.
- You can show three controls working and a test that fails when one is removed.
- You can state, in writing, what your tests do not prove.
Lion Cipher Labs is not a school, these classes carry no academic credit, and a completion record is a personal record of study, not a credential.
Back to Securing LLM applications.