Get in Touch
 Duration 21 hours

Course Outline

Module 1: Understanding AI Application Failures

  • LLM, RAG, and agent architectures from a developer’s perspective
  • The request-response lifecycle of AI features
  • Prompt flow: system, developer, user, and tool messages
  • Identifying where untrusted data enters and re-enters the model
  • Distinguishing between trust boundaries a developer owns versus those inherited
  • Why AI attacks are semantic in nature rather than syntactic
  • Mapping the OWASP LLM Top 10 to specific code implementations

Module 2: Prompt Injection for Builders

  • Direct versus indirect prompt injection techniques
  • Hidden instructions embedded in documents, web pages, and tool outputs
  • 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 naïve filter, and restructure the prompt

Module 3: Treating Model Output as Untrusted

  • Viewing model output as untrusted input for the broader application
  • Insecure output handling risks: XSS, SSRF, and downstream command or SQL injection
  • Avoiding eval, exec, or rendering raw model output directly
  • Implementing structured outputs and schema validation
  • Output encoding and allowlist strategies
  • Safe rendering practices in web and UI contexts
  • Lab 02: Identify and remediate an insecure-output-handling vulnerability

Module 4: RAG Security

  • Threats to vector databases and retrieval mechanisms
  • Sanitization processes during data ingestion
  • Document provenance and trust scoring methods
  • Retrieval scoping and metadata isolation
  • Hidden instructions within retrieved content
  • Preventing data exfiltration through retrieval channels
  • Lab 03: Poison a RAG pipeline, then implement defenses

Module 5: Agent and Tool Safety

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

Module 6: Secrets, Identity, and Cost Management

  • API key and secret management: ensuring they are never exposed 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' via unbounded token and cost consumption
  • Implementing rate limits, token budgets, and timeouts
  • Logging strategies that protect secrets and 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 input and output guardrail layers and measure their impact

Module 8: Red-Teaming Your Application

  • Creating an abuse and test suite for AI features
  • Automating prompt injection and jailbreak tests
  • Regression testing guardrails and security policies
  • Integrating AI security checks into continuous integration pipelines
  • Model and dependency supply chain security: provenance and pinning
  • Establishing a pre-release security checklist for AI features
  • Lab 07: Write automated red-team tests and integrate them into CI

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

  • The AI Security Hexagon: shifting from 'is it secure?' to six specific questions
  • The six scored categories: data, prompt, agent, supply chain, detection, and governance
  • The 100-point rubric and its weighting system
  • Verdict bands and the single-category override rule
  • Using pre- and post-hardening scores as metrics
  • Scoring exercise applied to the capstone application

Capstone: Hardening an AI Application

  • Starting with a vulnerable app: injectable prompts, insecure output handling, and unscoped RAG
  • Addressing starter app flaws: over-permissioned agents, secrets in the prompt path, and lack of cost limits
  • Restructuring prompts for containment and validating model outputs
  • Sanitizing and scoping retrieval, then applying least privilege and approval gates
  • Removing secrets from critical paths and adding cost and rate limits
  • Implementing guardrails and automated red-team tests
  • Deliverable: A hardened application plus an OWASP LLM Top 10 self-assessment report

Requirements

  • Experience with building and consuming REST APIs.
  • Familiarity with a scripting language; labs are conducted in Python.
  • Basic knowledge of application authentication, git, and command-line interfaces.
  • No machine learning background is necessary; this is an application security course for those building with LLMs, not training them.

Target 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.

Number of participants


Price per participant

Testimonials (3)

Upcoming Courses

Related Categories