AG-027: Prompt Leakage Risk

HIGH AG-027 OWASP ASI08 · ASI03

What this rule means

System prompt contains sensitive information extractable via prompt extraction attacks.

Why it matters

McKinsey Lilli breach (March 2026): system prompts leaked internal architecture.

How to fix it

Never put credentials/URLs in system prompts; use runtime config injection.

Detect it

pip install lucin
lucin scan .                  # all rules
lucin explain AG-027          # this rule, in your terminal

Findings carry a file:line and, where the rule supports it, a witness path showing the flow that triggered it. Precision and recall for the whole rule set, with the commands that regenerate them, are on the benchmarks page — and the gaps are on limits.

← All detection rules