
Identify and mitigate sensitive data leaks in large language models by testing system prompts, retrieval-augmented generation pipelines, and tool outputs, and documenting disclosure risks with evidence.
Explore the OWASP top 10 risks for LLM applications and learn to detect unauthorized disclosure fragments of PII, proprietary data, or system context inside responses.
Identify unauthorized disclosure fragments inside helpful responses, not just full records or obvious secrets, across PII, proprietary data, and system context, by examining current session, retrieval, and training sources.
Identify data leaks in production by testing runtime context and model weights to prevent exposure of restricted data, considering access controls, retrieval boundaries, and GDPR or CCPA.
Identify and classify unauthorized disclosure in LLMs (LLM-02) by using a repeatable protocol of controlled prompts to test retrieval, active context, and completion behavior for hidden fields.
Learn how disclosure appears in the wild, from fields in replies to code snippets, including pii like email and password hash, proprietary data, secret key, and system context with endpoints.
Identify how sensitive information leaks occur in production through ordinary user actions and public LLM interfaces, track data flows through LLM systems, and shift QA mindset to detect disclosure opportunities.
Analyze data leaks by distinguishing memorization from context leakage, identify whether leaks come from training weights or runtime context, and apply remediation through retrieval logic and session isolation.
Identify and differentiate memorization leaks from runtime context leaks in chat interfaces, and learn mitigation strategies like unlearning, model replacement, and proper retrieval and session controls.
Identify how a safe first answer can still lead to leaks in follow-up turns; save the full conversation to assess context carryover and disclosure risk.
Develop a repeatable qa test plan for identifying sensitive data leaks by defining a clear role, crafting an effective input strategy, and collecting concrete evidence of unauthorized disclosure.
Craft clear bug reports by separating attack path from disclosure, distinguishing LLM-01 prompt injection from LLM-02 sensitive data exposure, so engineering can fix the right issue.
We clarify LLM-02, show how unauthorized disclosures of user data, confidential information, or internal details can appear, and outline testing with structured prompts and evidence.
Demonstrate PII disclosure risks through completion prefix prompting on synthetic ticket history with restricted fields, and compare safe prompts to prefix attacks using Alama and OpenWebUI to verify disclosure boundaries.
Verify disclosed content against known synthetic data before filing an llm-02 bug, ensuring the value matches the synthetic source and reproduces under identical test conditions to avoid hallucinations.
Define a formal QA test plan for the Sarah Genn disclosure case and execute it in Score with the Mastral model in OpenWebUI, using a synthetic ticket file as context.
Conducts a live lab to test PII exposure via completion prefix probing against a synthetic ticket file, finding an email leak and underscoring fixed, fresh-session run protocols.
Write a precise bug report and post-mortem that separates attack path from exposure, documents the LLM-02 private email exposure, and enforces upstream redaction and strict retrieval boundaries.
Translate LLM-02 concepts into hands-on disclosure tests, reveal PII from a synthetic ticket file with fixed execution and fresh sessions, and document results as a bug report for investigation.
Section 4 introduces a hands-on demo on context window leakage via semantic bypass, testing whether an uploaded file’s data becomes part of the model’s working context and withholds restricted fields.
Explore how system context disclosure reveals hidden system prompts and workflows through prompt extraction attacks like Peelique and JustAsk, expanding the attack surface for real-world LLM apps.
Test context leakage in an active session using an internal auditor persona to probe semantic bypass while withholding budget and lead identity; capture evidence for reproducible testing.
Analyze how restricted fields like budget values, the program lead, and the leads email address leak in local rag summaries. Compare control prompts with semantic bypass tests across models.
This demo compares Mastral latest and openhermes latest, revealing context leakage during constrained summarization and disclosure of budget and lead identity. Verify the exact model and configuration.
Demonstrate context leakage in an active session by comparing model responses to restricted fields in an uploaded document, highlighting boundary differences and the need to minimize sensitive data before deployment.
Assess how inference in a RAG setting can disclose business data through aggregate answers, testing whether restricted individual records stay protected when answering group-level prompts, run locally in Alama.
Explore how production language models memorize training data in the wild, and how clean-session testing and careful logging distinguish memorization from context leakage for QA investigations.
Demonstrate an hr assistant scanning a synthetic salary file to answer payroll questions with aggregate data, while withholding individual salaries and blocking unsafe groups below three records to prevent inference.
Demo 3 tests whether salary questions leak individual compensation through aggregates in an LLM safety context, enforcing group thresholds and withholding names or salaries to prevent row-level disclosure.
Convert demo three results into a bug report, separate attack path from disclosure, enforce a minimum group size of three to prevent salary data exposure, and apply strict verification.
Section 5 shows inference-based disclosure through aggregation, using group statistics as proxies and enforcing minimum group thresholds so only final aggregate values are returned.
Explore training data disclosure by memorization, and apply the test method using fragments to distinguish runtime context from model memory, emphasizing proving the source before labeling memorization.
Explore why training leaks occur due to memorization and overfitting. Learn how prefix probes and synthetic canaries detect persistent memorization versus session leakage, guiding remediation decisions.
Design test cases for training data disclosure using synthetic, unique canaries that look realistic for data type while avoiding real secrets, and document placement context, prefix probe, and repeatability.
Identify and report training data leaks by documenting the exact probe, recovered sequence, and test conditions, including model tag, decoding settings, and Canary ID, to connect leaks to data pipelines.
Verify training leak fixes by scrubbing sensitive data from training or fine-tuning data and re-running the prefix probes across sessions with the deployed configuration to ensure zero recovered sequences.
Section 7 focuses on defenses, remediation, and verification to prevent data leaks, mapping failures to the right control layer: ingestion, retrieval, model behavior, output checks, governance, and testing layers together.
Test each defense layer: ingestion, retrieval, the model, output, and governance, to prevent restricted data from entering prompts or context, and ensure output filters catch sensitive patterns.
Maintain defense verification after release through release gate regression, bugbashes and red teaming, near miss monitoring, drift analysis, and the incident loop, converting bypasses into regression tests.
Implement a layered defense for LLM-02, starting with ingestion. Enforce retrieval authorizations, scope, and minimum group rules; govern with output layer protection, governance, and QA three-step tests.
Verify ingestion minimization of sensitive fields. Enforce retrieval access rules and block restricted output patterns across prompts; rehearse fixes with fresh sessions to close only after all criteria pass.
Section 7 shifts from control design to control evidence as QA proves each defense layer blocks, misses, and backups catch misses, preventing a single point of failure.
Adopt a qa workflow for llm testing: plan, execute, report, verify, and monitor. classify method and impact separately, capture configuration and transcripts for reproducibility, and validate fixes in fresh sessions.
Design a llm-02 test matrix where each test case defines what and how you test, what signals a failure, and use test IDs to enable regression audits across data classes.
Measure and improve coverage across data class, method, layer, and release gate to identify gaps, assess disclosure risk, and justify testing investments for LLM security.
Write a structured LLM-02 bug report with a title naming data class and bypass path, document the method and impact, and include full session evidence for severity and cause analysis.
Integrate LLM-02 testing into the standard QA workflow. Define protected data classes and forbidden disclosures, enforce a minimum group size of 3, assign control ownership, and apply binary release gate.
Apply a structured qa workflow to llm systems, separating method from impact, test boundary bypass and data exposure, and enforce layered defense with governance to block releases until fixes pass.
Turn sensitive data disclosure testing into a repeatable regression workflow by combining manual risk discovery with automated checks that reverify known leak paths as apps evolve.
Define a leak hypothesis and run repeatable llm-02 test cases with a simple qa harness. Use deterministic checks, canaries, and synthetic pii patterns to evaluate responses and save evidence.
Learn to distinguish deterministic signatures from semantic leakage using canary tokens and exact value checks, while understanding when human review is needed for meaning-based disclosure.
Design leak-focused LLM-02 test cases by starting with a disclosure hypothesis, identifying risks like retrieval leakage, credential exposure, or semantic leakage, and defining input pressure, safe behavior, and failure signals.
Run a focused test subset with the harness to collect artifacts, logs, and evidence; verify leaks across runs, preserve prompts, responses, the matched indicator, and run metadata for reproducibility.
Interpret results by weighing strong, stable signals over suspected hallucinations, using run logs and artifacts to classify disclosures as stable, intermittent, or semantic, while guiding qa to assess risk.
Automate disclosure risks with deterministic checks (canaries, fake secrets, synthetic pii patterns), preserve fixes as regression tests, and review artifacts like prompts, responses, and run metadata to detect semantic leakage.
This course contains the use of artificial intelligence.
Large Language Models are changing how software is built. They are also creating new failure paths that traditional QA workflows were never designed to test.
This course focuses on OWASP LLM-02: Sensitive Information Disclosure, one of the most important risks in the OWASP Top 10 for Large Language Model Applications. The problem is simple to describe and difficult to test correctly: can an LLM-based system reveal data the user should not be allowed to see?
This course is designed for QA engineers, SDETs, automation engineers, and technical testers who want practical testing methods instead of theory alone.
You will learn how sensitive data leaks happen through:
Runtime context and live session data
Retrieval and authorization failures
Aggregate inference and minimum-group threshold failures
Training-data memorization behavior
You will learn how to:
Design structured LLM-02 test plans
Build hypothesis-driven test cases
Define clear fail signals
Separate real disclosures from hallucinations
Capture reproducible evidence
Write actionable bug reports
Verify fixes through repeatable testing and regression coverage
The course includes hands-on demonstrations using synthetic data and realistic scenarios. You will see practical QA workflows that can be applied directly to AI-enabled products.
By the end of the course, you will have a repeatable process for testing sensitive information disclosure risks and converting confirmed failures into long-term regression coverage.
This course builds on the same QA-first approach used throughout the OWASP LLM course series.
AI Usage Disclosure
AI tools were used during course development to support brainstorming, editing, structure review, and iterative content refinement. All technical content, demonstrations, workflows, and QA guidance were reviewed, validated, and adapted by the instructor for accuracy and practical use.
No course content was generated and published without instructor review and revision.