Lab: Defences in code, and a red-team set
Module 11 · Lab · About 75 minutes · Needs: lessons 1 to 4 of this module, and the Module 1 lab (or the cells in Step 1)
What you are building
It is Thursday 13 August 2026, week 11, two days after the pilot incident. Anika wants the module's defences out of four notebooks and into the repository, where every later module and every test can reach them. You add two files and one data file. supportdesk/redact.py takes personal data out of text before any copy is made. supportdesk/security.py holds the attack-surface map, the input layers, the pinned injection classifier, the authority check in front of every tool call and the checks on every draft. evals/redteam.jsonl keeps Lesson 1's refusal set and T-1034's three forms as permanent tests. The running example is T-1034, Leo Park's planted refund request. Two blocks call the hosted model; the classifier runs on your own machine.