AI Red Team · Whitepaper

Appendix A · Appendices

Appendix A: Code Examples: Detection, Evaluation and Guardrail Artefacts

Appendix A from "AI Red Team"

Author Conceived and directed by Gunnar Nordqvist; text written by AI agents
Published 2 November 2026
Build number 2026.11
ai-red-teaming ai-enabled-defence purple-teaming security-operations nist-csf-2

This appendix collects fuller versions of artefacts that the chapters introduce. Each example is identified as NN_CODE_XXX, where NN is the introducing chapter, and grouped by NIST CSF 2.0 Function. In keeping with the book's rules it contains only defensive artefacts and no exploit code, payloads, attack prompts or other attack tooling. All identifiers refer to the fictional organisations Nordvik Region and Hansa Mutual and are illustrative, and every YAML listing parses as written.

Chapter 3 keeps the CSF profile in version control. In Hansa Mutual's excerpt below, a Category records current and target maturity, targets for the three AI focus areas, the implementing controls and the European obligations the same evidence serves, so that one control is assured once and reported often.

aiProfile: NIST-IR-8596-ipd # Cyber AI Profile, preliminary draft

Primary topics explored

  1. Index of examples
  2. Foundations
  3. Govern
  4. Detect
  5. Verification and improvement

About AI Red Team

AI Red Team is Book 4 of The Transformed Architecture. It shows how large European enterprises and public authorities put artificial intelligence to work as an active part of cyber defence: AI-assisted red teaming and adversary emulation, red teaming of AI systems themselves, the AI-assisted security operations centre, detection engineering, threat intelligence, incident response and purple teaming, all under a lawful mandate and with evidence a supervisor can inspect.

It builds on the conclusions of Architecture as Code, AI Governance and AI Platform and Security.

Who should read this

CISOs, SOC leads, red and blue team practitioners, security architects, AI architects and technical decision-makers.

Portrait of Gunnar Nordqvist

Gunnar Nordqvist

Conceived, directed and published the books of The Transformed Architecture.

Continue with the full chapter

Read the full chapter online

Appendix A: Appendix A: Code Examples: Detection, Evaluation and Guardrail Artefacts in AI Red Team gives the detailed explanations, practical examples and implementation patterns behind this summary.

This whitepaper belongs to “Appendices” and is one of 32 drawn from the manuscript.