Chapter 13

AI Security and Guardrails

Threat-model the AI system, not just the chatbot text box. Test every untrusted channel: user text, retrieved pages, tool output, files, OCR, hidden Unicode, images, and external APIs. Scope tool permissions with least privilege, logging, approvals, and reversibility. Turn…

Apply this chapter

  • Threat-model the AI system, not just the chatbot text box.
  • Test every untrusted channel: user text, retrieved pages, tool output, files, OCR, hidden Unicode, images, and external APIs.
  • Scope tool permissions with least privilege, logging, approvals, and reversibility.
  • Turn OWASP-style risks and guardrails into replayable release-blocking eval cases.

Continue the conversation

Apply this to your context.

Save your product context once, then open a focused conversation that combines it with this concept.

7 focused briefs

Concepts in this chapter

  1. 099
    AI Security Threat ModelsAI security starts by naming what the system can read, infer, decide, and do.
  2. 100
    OWASP Top 10 for LLM ApplicationsThe OWASP LLM Top 10 is useful when security risks need to become concrete eval cases, release gates, traces, and mitigations.
  3. 101
    Prompt Injection and Indirect Prompt InjectionPrompt injection is what happens when untrusted text tries to become instructions.
  4. 102
    Training Data Poisoning and BackdoorsBad data can teach a model behavior that only appears when the trigger is right.
  5. 103
    Model Provenance, Geopolitical, and Nation-State RiskWhere a model is built, hosted, governed, and tuned can matter for security, privacy, continuity, and bias.
  6. 104
    MCP Security and Tool PermissioningMCP makes AI systems more useful by connecting tools. It also makes permission boundaries more important.
  7. 105
    Guardrails for AI SystemsGuardrails are the code, policy, permissions, human review, and telemetry around a model that limit what bad outputs can do.

Shared across the Knowledge Edition

Adapt every concept to your world.

Describe your product, role, users, risks, constraints, or current quality problem. This stays in this browser until you choose to send it to ChatGPT.

Saved only in this browser.0 / 2400