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.
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.

Limit: attack success is measured on a fixed corpus. An attack outside the battery is not covered until it is added.
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
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.
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."
AI-security discipline - Remote - open to mid-level and senior IC roles
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.
