Get in Touch
 Duration 21 hours

Course Outline

Module 1: Understanding AI Application Vulnerabilities

  • LLM, RAG, and agent architectures viewed from a developer's perspective
  • The complete request and response lifecycle of an AI feature
  • Prompt flow dynamics: system, developer, user, and tool messages
  • Entry and re-entry points for untrusted data in the model
  • Distinguishing trust boundaries owned by the developer versus those inherited
  • The semantic nature of AI attacks compared to syntactic ones
  • Correlating the OWASP LLM Top 10 with specific code implementations

Module 2: Prompt Injection for Developers

  • Contrasting direct and indirect prompt injection techniques
  • Identifying hidden instructions within documents, web pages, and tool outputs
  • Examining jailbreaks and role confusion scenarios
  • The critical importance of separating instructions from data
  • Defensive prompt design strategies: delimiters, structure, and minimal authority
  • Recognizing the limits of prevention and designing for containment
  • Lab 01: Attacking a chatbot, bypassing basic filters, and restructuring prompts

Module 3: Managing Untrusted Model Output

  • Viewing model output as untrusted input for downstream application components
  • Risks of insecure output handling: XSS, SSRF, and downstream command or SQL injection
  • Avoiding the use of eval, exec, or raw rendering of model output
  • Implementing structured outputs and schema validation
  • Utilizing output encoding and allowlists for safety
  • Ensuring safe rendering practices in web and UI contexts
  • Lab 02: Identifying and remedying insecure output handling vulnerabilities

Module 4: RAG Security Principles

  • Threats associated with vector databases and retrieval processes
  • Sanitizing data during the ingestion phase
  • Establishing document provenance and trust scoring mechanisms
  • Scoping retrieval and isolating metadata
  • Mitigating hidden instructions within retrieved content
  • Preventing data exfiltration via retrieval channels
  • Lab 03: Simulating RAG pipeline poisoning and implementing defenses

Module 5: Agent and Tool Safety

  • Addressing excessive agency and tool misuse
  • Applying least privilege principles to agent capabilities
  • Defining tool allowlists and validating arguments
  • Implementing approval gates and human-in-the-loop controls
  • Sandboxing tool execution environments
  • Managing scoped, short-lived credentials and restricting autonomous loops
  • Lab 04: Securing an over-permissioned agent

Module 6: Secrets, Identity, and Cost Management

  • API key and secret management: excluding them from prompts, code, and logs
  • Enforcing per-user authentication and authorization for AI features
  • Propagating user identity across tools and retrieval systems
  • Countering 'denial of wallet' attacks involving unbounded token and cost usage
  • Implementing rate limits, token budgets, and timeout mechanisms
  • Logging practices that avoid leaking secrets or PII
  • Lab 05: Removing secrets from the prompt path and enforcing cost limits

Module 7: Utilizing Guardrail Libraries

  • Understanding the capabilities and limitations of guardrail frameworks
  • Input guardrails: detecting injection, PII, and specific topics
  • Output guardrails: performing validation, filtering, and grounding checks
  • Determining when to use guardrails versus custom deterministic checks
  • Integrating guardrails with controls established in previous modules
  • Evaluating performance, false positives, and potential failure modes
  • Lab 06: Implementing and measuring input and output guardrail layers

Module 8: Red-Teaming Your Application

  • Constructing comprehensive abuse and test suites for AI features
  • Creating automated tests for prompt injection and jailbreak attempts
  • Performing regression testing on guardrails and security policies
  • Incorporating AI security checks into continuous integration pipelines
  • Addressing model and dependency supply chain risks through provenance and pinning
  • Using a pre-deployment security checklist for AI features
  • Lab 07: Developing automated red-team tests and integrating them into CI

Module 9: Assessing AI Security with the SAIS-100 Framework

  • The AI Security Hexagon: shifting from binary 'secure' questions to six key areas
  • The six scored categories: data, prompt, agent, supply chain, detection, and governance
  • Applying the 100-point rubric and understanding its weightings
  • Interpreting verdict bands and the single-category override rule
  • Using pre- and post-hardening scores as key performance metrics
  • Conducting a scoring exercise on the capstone application

Capstone: Fortifying an AI Application

  • Reviewing the starter app's vulnerabilities: injectable prompts, insecure output handling, and unscoped RAG
  • Identifying starter app flaws: over-permissioned agents, secrets in the prompt path, and lack of cost limits
  • Restructuring prompts for containment and implementing model output validation
  • Sanitizing and scoping retrieval, while applying least privilege and approval gates
  • Relocating secrets and introducing cost and rate limiting measures
  • Integrating guardrails and automated red-team testing
  • Final deliverable: A hardened application accompanied by an OWASP LLM Top 10 self-assessment

Requirements

  • Proficiency in building and consuming REST APIs.
  • Knowledge of a scripting language, with all labs conducted in Python.
  • Familiarity with basic application authentication, git workflows, and command-line operations.
  • No prior machine learning experience is necessary; this is an application security course focused on building with LLMs, not training them.

Target Audience

  • Software and backend engineers developing LLM-based features.
  • Full-stack and API developers.
  • AI and ML application engineers.
  • Platform engineers deploying copilots and autonomous agents.
  • Tech leads and senior engineers with ownership of AI feature implementations.

Number of participants


Price per participant

Testimonials (3)

Upcoming Courses

Related Categories