Defensive incident exercise
Quick answer
A defensive ML incident exercise rehearses detection, containment, evidence preservation, recovery and review. A failed artifact gate should prevent promotion while a verified current model remains available if appropriate. Examples use small inert synthetic inputs and standard-library Python. No real endpoints. ByteMind execution is unverified.
Fail closed on required gates
gates = {"signature":True,"digest":False,"schema":True}print(all(gates.values()))Expected output (locally tested): False. One failing required gate blocks promotion.
How it works
Begin with a fictional incident: a candidate digest fails or its metadata does not match policy. Record version, timestamps, digest and reason; quarantine the candidate; keep the approved champion if still trusted; notify the owner and security response team. Verify recovery artifacts and run known-answer tests before restoring service. If the champion is also suspect, halt or use an approved safe fallback. Record root cause, affected versions, corrective controls and independent approval. Test only local inert fixtures with explicit bounds. The milestone checks real Ed25519 verification, digest binding and bounded request rejection; it does not demonstrate production key custody, sandboxing or exploit resistance.
Preserve approved version
champion = "v2"candidate = "v3"verified = Falseprint(candidate if verified else champion)Expected output (locally tested): v2. The trusted champion stays selected in this simple fixture.
Common mistakes
Never run an unknown artifact to see what it does. Do not overwrite audit evidence or automatically promote after a single passing check. Never probe external endpoints without explicit authorization.
Practice and next steps
Run the milestone and map each rejected fixture to a control. Explain why an approved fixture still requires independent deployment approval.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Defensive incident exercise — knowledge check
Apply defensive incident exercise to small examples and debugging scenarios.
What follows failed integrity verification?
When is retaining champion appropriate?
What does a smoke test show?
What is the safe test boundary?
What does REVIEW_READY mean?