Skip to main content
Module 12 · Lesson 3 of 342/42 in the course~22 min
Module lessons (3/3)

Tool-Call Allowlists & Output Encoding

Lesson preview6 hands-on exercises readyApplication & Web Security · Module 12 — AI / LLM Application Security (OWASP LLM Top 10)

Gate AI function calling strictly via typed schemas and sanitize model-generated Markdown links against javascript: XSS.

What you'll learn in this lesson

  • Reproduce Excessive Agency (OWASP LLM06) when an LLM JSON tool router executes unvalidated functions, __proto__ keys, or destructive tools without approval.
  • Prevent Improper Output Handling / Markdown Exfiltration & XSS (OWASP LLM05) across links label and covert tracking images !pixel.
  • Implement deterministic tiered tool-call allowlists with human-in-the-loop approval and strict output URI/HTML sanitization.

Overview

When an AI agent emits structured tool calls ({ "tool": "...", "args": { ... } }) and renders rich Markdown responses in browser UI, two critical attack vectors appear:

Review these four patterns securing AI agent tool routers and rendered chat outputs:

Sections covered in this lesson

  1. 11. Tool Allowlists, Human Gates & Markdown Firewall
  2. 22. Interactive Explorer: Tool-Abuse & Agent Authorization Firewall
  3. 33. Progressive Labs: Warm-Up → Attack → Defend → Harden
  4. 44. Checkpoints & Code Review
Pro Lesson · Module 12 — AI / LLM Application Security (OWASP LLM Top 10)

Unlock "Tool-Call Allowlists & Output Encoding" and the full Application & Web Security curriculum

Gate AI function calling strictly via typed schemas and sanitize model-generated Markdown links against javascript: XSS.

Unlock all 6 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Application & Web Security plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.