Individual skill

testing-for-system-prompt-leakage

Extracts LLM system prompts using direct requests, jailbreak/instruction-override framing, translation/encoding tricks, and few-shot replay, combining manual payloads with automated garak and Promptfoo scanners to surface embedded secrets, routing logic, and policy leakage (OWASP LLM07:2025). Use during LLM application red-team engagements or when validating that no credentials or authorization logic live in the system prompt.

skills/testing-for-system-prompt-leakage/SKILL.md

Read pinned source

Source commit 54a798831d2266a3ca61ce68a7acb80b81160d57

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Network or broad shell
Last checked
Nov 9, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
35,889
Repository last updated
Aug 31, 2026
License
Apache-2.0

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt
# Testing for System Prompt Leakage

> **Authorized use only:** The extraction payloads below are for assessing LLM applications you own or have written authorization to test. Extracting prompts, secrets, or routing logic from systems you are not authorized to test may be unlawful.

## Overview

A system prompt (a.k.a. developer message, preamble, or instructions) steers an LLM application's behavior. OWASP **LLM07:2025 System Prompt Leakage** addresses the risk that these prompts contain sensitive material that was never meant to be exposed — API keys, database connection strings, internal role/permission logic, model-routing rules, content policies, and tool definitions. Two principles frame this skill:

1. **The system prompt must never be treated as a secret or used as a security control.** If leaking it breaks your security model, the security model is wrong. The real findings during a leakage test are the *secrets and logic* embedded in the prompt that should have been enforced server-side.
2. **System prompts are extractable.** Through direct requests, instruction-override (jailbreak) framing, translation/encoding tricks, completion attacks, and few-shot replay, adversaries can reliably recover preambles.

This maps to MITRE ATLAS **AML.T0057 — LLM Data Leakage**: triggering unintentional disclosure (here, of the system prompt and embedded data) through crafted queries. Testing combines manual payloads with automated scanners — **garak** (NVIDIA's LLM vulnerability scanner) and **Promptfoo** (red-team eval) provide repeatable extraction probes.

## When to Use
Back to top