Get in Touch
 Duration 21 hours

Course Outline

Module 1: How AI Apps Break

  • Understanding LLM, RAG, and agent architectures from a developer’s perspective
  • The lifecycle of requests and responses in AI features
  • Prompt flow: managing system, developer, user, and tool messages
  • Identifying where untrusted data enters and re-enters the model
  • Distinguishing between trust boundaries owned by the developer versus those inherited
  • Recognizing that AI attacks are semantic rather than syntactic
  • Aligning the OWASP LLM Top 10 with practical code implementation

Module 2: Prompt Injection for Builders

  • Differentiating between direct and indirect prompt injection
  • Detecting hidden instructions in documents, web content, and tool outputs
  • Understanding jailbreaks and role confusion scenarios
  • The importance of separating instructions from data
  • Defensive prompt design: using delimiters, structure, and minimal authority
  • Accepting that prevention is partial and designing for containment
  • Lab 01: Attack your own chatbot, bypass a basic filter, and restructure the prompt

Module 3: Treating Model Output as Untrusted

  • Viewing model output as untrusted input for the rest of the application
  • Addressing insecure output handling: XSS, SSRF, and downstream command or SQL injection
  • Avoiding the use of eval, exec, or direct rendering of raw model output
  • Utilizing structured outputs and schema validation
  • Implementing output encoding and allowlists
  • Ensuring safe rendering in web and UI contexts
  • Lab 02: Identify and remediate an insecure output handling vulnerability

Module 4: RAG Security

  • Threats associated with vector databases and retrieval
  • Sanitization during the ingestion process
  • Document provenance and trust scoring mechanisms
  • Retrieval scoping and metadata isolation
  • Detecting hidden instructions within retrieved content
  • Preventing data exfiltration via retrieval
  • Lab 03: Poison a RAG pipeline and subsequently defend it

Module 5: Agent and Tool Safety

  • Excessive agency and risks of tool abuse
  • Applying least privilege principles to agents
  • Tool allowlists and argument validation
  • Approval gates and human-in-the-loop mechanisms
  • Sandboxing tool execution
  • Using scoped, short-lived credentials and limiting autonomous loops
  • Lab 04: Secure an over-permissioned agent

Module 6: Secrets, Identity, and Cost

  • API key and secret management: ensuring they are never in prompts, code, or logs
  • Per-user authentication and authorization for AI features
  • Propagating user identity to tools and retrieval systems
  • Preventing 'denial of wallet' through unbounded token and cost consumption
  • Implementing rate limits, token budgets, and timeouts
  • Logging practices that avoid leaking secrets or PII
  • Lab 05: Remove secrets from the prompt path and implement cost limits

Module 7: Guardrail Libraries

  • Understanding the capabilities and limitations of guardrail frameworks
  • Input guardrails: injection detection, PII filtering, and topic classification
  • Output guardrails: validation, filtering, and grounding checks
  • Determining when to use guardrails versus custom deterministic checks
  • Layering guardrails with controls from previous modules
  • Managing performance, false positives, and failure modes
  • Lab 06: Implement and measure an input and output guardrail layer

Module 8: Red-Teaming Your Own App

  • Creating an abuse and test suite for AI features
  • Automating prompt injection and jailbreak tests
  • 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-deployment security checklist for AI features
  • Lab 07: Develop automated red-team tests and integrate them into CI

Module 9: Scoring AI Security, the SAIS-100 Framework

  • The AI Security Hexagon: six questions to replace simple security assessments
  • The six scored categories: data, prompt, agent, supply chain, detection, and governance
  • The 100-point rubric and its weightings
  • Verdict bands and the single-category override rule
  • Using pre- and post-hardening scores as metrics
  • Scoring exercise applied to the capstone application

Capstone: Harden an AI Application

  • Starter app features: injectable prompts, insecure output handling, and unscoped RAG
  • Starter app features: 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
  • Removing secrets from sensitive paths and adding cost and rate limits
  • Incorporating guardrails and automated red-team tests
  • Deliverable: A hardened application along with 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 command-line operations.
  • No machine learning background is necessary; this is an application security course for those building with LLMs, not training them.

Audience

  • Software and backend engineers developing LLM features.
  • Full-stack and API developers.
  • AI and ML application engineers.
  • Platform engineers deploying copilots and agents.
  • Tech leads and senior engineers accountable for AI features.

Testimonials (3)

Upcoming Courses

Related Categories