Course Outline
Module 1: How AI Apps Break
- LLM, RAG, and agent architectures from a developer’s perspective
- The request and response lifecycle of an AI feature
- Prompt flow: system, developer, user, and tool messages
- Points where untrusted data enters and re-enters the model
- Distinguishing trust boundaries owned by the developer from those inherited
- Why AI attacks are semantic rather than syntactic
- Mapping the OWASP LLM Top 10 to actual code implementations
Module 2: Prompt Injection for Builders
- Direct versus indirect prompt injection
- Hidden instructions found in documents, web pages, and tool output
- Jailbreaks and role confusion scenarios
- The importance of separating instructions from data
- Defensive prompt design techniques: delimiters, structure, and minimal authority
- Understanding why prevention is partial and designing for containment
- Lab 01: Attack your own chatbot, bypass a naïve filter, and restructure the prompt
Module 3: Treating Model Output as Untrusted
- Viewing model output as untrusted input for the rest of the application
- Insecure output handling risks: XSS, SSRF, and downstream command or SQL injection
- Avoiding direct evaluation, execution, or rendering of raw model output
- Using structured outputs and schema validation
- Output encoding and the use of allowlists
- Safe rendering practices in web and UI contexts
- Lab 02: Identify and fix an insecure output handling bug
Module 4: RAG Security
- Threats associated with vector databases and retrieval processes
- Sanitization techniques for ingestion
- Document provenance and trust scoring
- Retrieval scoping and metadata isolation
- Detecting hidden instructions in retrieved content
- Preventing data exfiltration through retrieval
- Lab 03: Poison a RAG pipeline, then learn to defend it
Module 5: Agent and Tool Safety
- Risks of excessive agency and tool abuse
- Applying least privilege principles to agents
- Tool allowlists and argument validation
- Implementation of approval gates and human-in-the-loop mechanisms
- Sandboxing tool execution environments
- Using scoped, short-lived credentials and limiting autonomous loops
- Lab 04: Lock down an over-permissioned agent
Module 6: Secrets, Identity, and Cost
- API key and secret management: keeping them out of prompts, code, and logs
- Per-user authentication and authorization for AI features
- Propagating user identity to tools and retrieval systems
- Addressing denial of wallet: preventing unbounded token and cost consumption
- Implementing rate limits, token budgets, and timeouts
- Logging practices that prevent leaking secrets or PII
- Lab 05: Remove secrets from the prompt path and implement cost limits
Module 7: Guardrail Libraries
- Capabilities and limitations of guardrail frameworks
- Input guardrails: detecting injection, PII, and topic classifiers
- Output guardrails: validation, filtering, and grounding checks
- Determining when to use guardrails versus custom deterministic checks
- Layering guardrails with controls from previous modules
- Considering performance, false positives, and failure modes
- Lab 06: Add input and output guardrail layers and measure their impact
Module 8: Red-Teaming Your Own App
- Building an abuse and test suite for AI features
- Automated prompt injection and jailbreak testing
- Regression testing for guardrails and policies
- Integrating AI security checks into continuous integration
- Managing model and dependency supply chains: provenance and pinning
- Using a pre-ship security checklist for AI features
- Lab 07: Write automated red-team tests and integrate them into CI
Module 9: Scoring AI Security, the SAIS-100 Framework
- The AI Security Hexagon: six key questions instead of simply asking “is it secure?”
- The six scored categories: data, prompt, agent, supply chain, detection, and governance
- The 100-point rubric and its associated weightings
- Verdict bands and the single-category override rule
- Using scoring before and after hardening as a performance metric
- Conducting a scoring exercise on the capstone application
Capstone: Harden an AI Application
- Reviewing the starter app: injectable prompts, insecure output handling, and unscoped RAG
- Reviewing the starter app: over-permissioned agents, secrets in the prompt path, and lack of cost limits
- Restructuring prompts for containment and validating model output
- Sanitizing and scoping retrieval, then applying least privilege and approval gates
- Moving secrets out of the prompt path and adding cost and rate limits
- Implementing guardrails and automated red-team tests
- Deliverable: A hardened app plus an OWASP LLM Top 10 self-assessment
Requirements
- Confidence in building and consuming REST APIs.
- Proficiency in a scripting language, with labs conducted in Python.
- Familiarity with basic application authentication, git, and the command line.
- No machine learning background is necessary; this is an application security course for those building with LLMs, not for training them.
Audience
- Software and backend engineers developing LLM features.
- Full-stack and API developers.
- AI and ML application engineers.
- Platform engineers shipping copilots and agents.
- Tech leads and senior engineers responsible for AI features.
Testimonials (3)
inventory and identifying the different risk exposures within AI
Gary Cook - Cybersecurity and Information Technology Risk Division
Course - Introduction to AI Trust, Risk, and Security Management (AI TRiSM)
I really enjoyed learning about AI attacks and the tools out there to begin practicing and actively using for security testing. I took a lot of knowledge away which I didn't have at the beginning and the course met what I hoped it would be. My favorite part shown from the training was Comet Browser and was amazed at what it could do. Definitely something will be looking into more. Overall it was a great course and enjoyed learning all OWASP GenAI Top 10.
Patrick Collins - Optum
Course - OWASP GenAI Security
The profesional knolage and the way how he presented it before us