Run an automated LLM vulnerability scanner
Run an open-source scanner on a local model and learn to critique its output
Lab 9 of 10 · about 45 minutes · runs on a laptop. Related chapters: 20. Attacks on language models and their defenses · 21. Evaluating models and systems
Open-source scanners like garak and Microsoft’s PyRIT automate probe libraries (injection, encoding, leakage, jailbreaks). Run one against your local model so you know what the tooling does and does not find.
pip install garakpython -m garak --help # check current flags; they change between versionspython -m garak --model_type huggingface --model_name gpt2 --probes promptinjectRead the report. Which probes succeeded? Which successes are meaningful for a real deployment and which are noise? Being able to critique scanner output is a more useful skill than being able to run it.