Skip to main content
puodziukas.dev›CASES › ADVERSARIAL RED TEAM

For teams securing LLM features

Case study, AI security

A Prompt Edit Quietly Reopened an Injection Path

I built a red-team regression battery on my own synthetic corpus, bound to the release gate so every change replays every adversarial attempt.

Hire me - remote W2Résumé (PDF)

What broke in the baseline was the quiet regression, a prompt edit that reopens an injection path unseen, and the cost now is one RED build that stops the ship.

Topographic data-mesh backdrop in navy and royal blue

Limit: attack success is measured on a fixed corpus. An attack outside the battery is not covered until it is added.

171/177 caught, synthetic corpus - mapped to five classes of the OWASP LLM Top 10
This battery replays a fixed set of adversarial attempts, synthetic corpus, mapped to five classes of the OWASP LLM Top 10; 6 get through. A red-team suite is only useful if it runs on every change. The attack-success-rate is the number that must not rise for a change to ship: a new bypass fails the build.

Attack-Success-Rate Is the Metric

Measure attack-success-rate (ASR): of a fixed battery of adversarial attempts, how many produced the disallowed behavior. Here the battery is the synthetic corpus, and the ASR is the 6 attempts that got through. The value of the metric is that it is comparable across every code change, a regression shows up as an ASR above the documented baseline of 6.

Attack Classes Covered

Corpus class
prompt injection
Instructions smuggled through user input that try to override the system prompt.
Corpus class
jailbreak
Role-play and obfuscation attacks that try to unlock restricted behavior.
Corpus class
system prompt leak
Attempts to make the model reveal its system prompt.
Corpus class
data exfil
Attempts to make the model leak secrets or prior-turn private data.
Corpus class
unsafe tool call
Coercing an agent to call a tool with attacker-chosen arguments.

A Regression Gate on Every Change

The battery is wired into the release gate: it re-runs on every change and fails the build on any new miss beyond the 6 documented known-gap rows, and on a known gap the gate now handles (stale row). A model or prompt edit that quietly re-opens an injection path does not reach production, because the new miss is unexpected and the gate goes RED. Attack resistance stops being a launch-day claim and becomes a property the pipeline enforces on every commit.

Honest Scope

ASR is measured on a fixed corpus. New attacks are untested: a novel attack outside the battery is what the suite does not yet cover, so new attack patterns get added when they appear and the battery grows. The claim is precise: on this synthetic corpus, the caught count at the top of this page holds and 6 get through. Replay: github.com/mpuodziukas-labs/llm-adversarial-gate.

Statistical Honesty

A point rate on a small corpus hides its width. On the synthetic corpus, the Wilson score interval for recall is 92.8% to 98.4%, and the Wilson score interval for false positives is 1.5% to 9.2%. The benign set is too small for a tight false-positive bound, so that rate is reported as an interval, never as a guarantee. Reruns are byte-identical, so any change in the output is a regression and never noise.

# Adversarial regression gate (per change) results = run_red_team(corpus) # fixed battery unexpected = [r for r in results if r.wrong and not r.known_gap] if unexpected or stale_known_gaps(results): block_ship() # a reopened path is a RED gate else: allow_merge() # only documented known gaps missed

Why This Matters For An AI-Security Team

A security team owning an LLM product needs adversarial coverage that does not decay between audits. A red-team battery bound to the release gate turns a point-in-time pentest into a continuous control: each of the five corpus classes has assertions, every change re-runs them, and the ASR is the single number a reviewer reads to know the posture held. It is the difference between "we tested for injection once" and "injection cannot regress without failing the build."

PROOF
✓Caught, synthetic corpus: count at the top of this page - 6 successful, on the eval corpus
✓Corpus classes - prompt injection - jailbreak - system prompt leak - data exfil - unsafe tool call
✓Replay command - python3 build_corpus.py && python3 evaluate.py (offline, fixed corpus)
✓Regression-gated - Re-runs on every change; any new miss beyond the documented known gaps blocks the ship
Hire me - remote W2

AI-security discipline - Remote - open to mid-level and senior IC roles

RELATED CASES
Eval & Release Gate ->AI Governance Mapping ->

How to verify

Clone llm-adversarial-gate and run python3 build_corpus.py && python3 evaluate.py.

Roles this proves: AI Security Engineer, QA / Test Automation Engineer.