Get in Touch
 Duration 21 hours

Course Outline

Module 1: Understanding AI Application Failures

  • LLM, RAG, and agent architectures from the developer's perspective
  • The request and response lifecycle of AI features
  • Prompt flow: system, developer, user, and tool messages
  • Points where untrusted data enters and re-enters the model
  • Trust boundaries developers own versus those they inherit
  • The semantic, rather than syntactic, nature of AI attacks
  • Aligning the OWASP LLM Top 10 with the code you write

Module 2: Prompt Injection for Builders

  • Direct versus indirect prompt injection
  • Hidden instructions in documents, web pages, and tool outputs
  • Jailbreaks and role confusion techniques
  • The importance of separating instructions from data
  • Defensive prompt design using delimiters, structure, and minimal authority
  • Why prevention is partial and the need to design 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 raw evaluation, execution, or rendering of model output
  • Utilizing 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

  • Vector database and retrieval-related threats
  • Sanitization during the ingestion process
  • Document provenance and trust scoring
  • Retrieval scoping and metadata isolation
  • Hidden instructions embedded in retrieved content
  • Data exfiltration risks through retrieval
  • Lab 03: Poison a RAG pipeline and then implement defenses

Module 5: Agent and Tool Safety

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

Module 6: Secrets, Identity, and Cost Management

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

Module 7: Guardrail Libraries

  • 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
  • Integrating guardrails with controls from previous modules
  • Considerations for performance, false positives, and failure modes
  • Lab 06: Implement input and output guardrail layers and measure their impact

Module 8: Red-Teaming Your Own Application

  • Creating an abuse and test suite for AI features
  • Automating prompt injection and jailbreak tests
  • Regression testing for guardrails and policies
  • Incorporating AI security checks into continuous integration
  • Model and dependency supply chain: provenance and version pinning
  • 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 with the SAIS-100 Framework

  • The AI Security Hexagon: six key questions beyond simple security status
  • 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 pre- and post-hardening scores as metrics
  • A scoring exercise applied to the capstone application

Capstone: Hardening an AI Application

  • Starter app vulnerabilities: injectable prompts, insecure output handling, and unscoped RAG
  • Starter app vulnerabilities: 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, followed by applying least privilege and approval gates
  • Removing secrets from the prompt path and adding cost and rate limits
  • Integrating guardrails and automated red-team tests
  • Deliverable: A hardened application accompanied by an OWASP LLM Top 10 self-assessment

Requirements

  • Proficiency in building and consuming REST APIs.
  • Familiarity with a scripting language, with labs conducted in Python.
  • Basic understanding of application authentication, git, and command-line operations.
  • No prior machine learning background is necessary; this is an application security course for those building with LLMs, not for 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 with ownership of AI features.

Testimonials (3)

Upcoming Courses

Related Categories