Skip to content
Pro lab

Red-Team CI Lab

A jailbreak and attack suite — garak, PyRIT, promptfoo-style — runs in CI on every build and reports an attack-success-rate against a gate. Your job is the release call: does the build pass, should it fail the merge, or should it be held because the run itself cannot be trusted? Some runs hide a real jailbreak over the gate or a regressed fix; others look alarming but are a flaky single result, a grader that mis-scored, a harness that ran zero cases, or a gate quietly loosened to manufacture a green. For each, call the verdict and name the reason. Read the run, not the colour of the pipeline. Defensive only; synthetic runs, no working exploits.

0s

CI run queue

1 / 10 gated

Run · suiteStatus
Nightly jailbreak suite, no changespromptfoo red-team · 1,200 cases▶ now
A new jailbreak class landsgarak probes · DAN + encoding familyqueued
A fixed jailbreak comes backpromptfoo regression set · seeded attacksqueued
New attack case added — model resists itPyRIT · new multi-turn casequeued
One failure that will not reproducegarak · single CI runqueued
Grader flags a refusal as a successpromptfoo · LLM-as-judge graderqueued
ASR under the gate but trending uppromptfoo nightly · 3-build trendqueued
Suite went green after a harness errorgarak · CI jobqueued
Multi-turn attack crosses the gatePyRIT · crescendo / multi-turnqueued
One reliable critical success, tiny samplegarak · tool-exfiltration probequeued
Nightly jailbreak suite, no changespromptfoo red-team · 1,200 cases

ASR 1.2% against a 5% gate; all seeded regression cases still blocked.

attack-success-rateASR 1.2% · gate 5%

the amber line is the gate; a bar past it is over threshold (but the number is only as good as the grader and the run)

⌖ run report

Tip: inspect the run before you call it — the ASR bar alone will not tell you if the gate moved, the grader lied, or nothing actually ran.

1 · Build verdict

2 · Reason

Pick a verdict and the reason to continue.

ASR vs the gate

0%20%+attack-success-rate →~gate

This run reports 1.2% ASR against a 5% gate. Decide whether the build passes, fails, or should be held — and whether that ASR can even be trusted.

CI red-team gate

A queue of 10 CI runs of the jailbreak/attack regression suite. For each, call the build verdict — pass, fail, or hold — and name the reason. Some runs are genuinely green and some numbers cannot be trusted.

So far: 0 / 10 runs gated.

Live arena

4 active
adversary kill-chain1/5
release-lin13%
ml-redteam-mara4%
evals-eng-rafi3%
release-gate-you (you)0%

adversary staging…

Loading…

Sample report · illustrative data

Sample result: Red-Team CI Lab gatekeeping debrief

Example run of six invented CI red-team results, each given a verdict (pass, fail or hold) and the reason behind it.

Scorecard

Verdicts correct
5 of 6 (worth 55% of the score)
Reasons correct
5 of 6 (worth 45% of the score)
Score
83%
Pass
Not yet: every verdict and reason must be right

Per-run debrief

CI runYour callRight callRight reason
Nightly jailbreak suite, no changesPassPassASR within threshold, no regressions
A new jailbreak class landsFailFailASR over the gate threshold
A fixed jailbreak comes backFailFailPreviously fixed attack regressed
New attack case added, model resists itPassPassNew attack case the model already resists
One failure that will not reproduceHoldHoldFlaky, non-deterministic single run
Grader flags a refusal as a successFailHoldGrader mis-scored (false result)

Where points were lost

When the grader scores a refusal as a success, the attack-success-rate cannot be trusted, so the right call is to hold and investigate the grader rather than block the merge on a number produced by a grader bug.

Made-up example data. Your own run uses your inputs. Downloads of the full report need Pro.

TL;DR

What this lab is

5 points
  • A browser-based release-gate drill: a jailbreak/attack regression suite (garak-, PyRIT-, promptfoo-style) runs in CI on every build. For each run you decide whether the build should PASS, FAIL (block the merge), or HOLD, and name the reason.
  • Built on real red-teaming/eval concepts: attack-success-rate (ASR) as the metric, a threshold GATE in CI, regression suites that re-run previously-fixed jailbreaks, grader reliability, run-to-run variance, and the rule that a green with zero cases executed is not a pass.
  • Fail the runs that matter — a new jailbreak class over the gate, a regressed seed case even when the aggregate is under gate, a reproducible critical success, a multi-turn crescendo, a gate quietly loosened in the same change — without over-failing a genuinely green build.
  • HOLD the runs you cannot trust: a single flaky result that will not reproduce, a harness error that executed no cases, a grader mis-scoring refusals as successes (or, after a grader swap, successes as refusals). The ASR is only as good as the grader and the suite behind it.
  • garak, PyRIT and promptfoo are named as the real tools these suites are built from; the runs themselves are synthetic illustrative scenarios and the ASR figures are not measurements or published statistics. Defensive-only; no working exploits. Difficulty tiers, a speed bonus and an S–D grade.

The ASR is a starting point, not the verdict

An attack-success-rate over the gate, reproducible across seeds, is a clean FAIL — that is what the gate is for. But the aggregate number hides things a mature gate checks separately. A regression — a seeded, previously-fixed attack succeeding again — is a fail even when overall ASR is under the gate, because the suite exists to stop a fix silently breaking. A single reproducible critical success (say, tool-based exfiltration at 6/6) is a fail no matter how small the sample, because averaging it away hides a reliable hole. And a multi-turn crescendo that only lands by the fifth turn will never show in a single-turn number — so gate on the multi-turn ASR too.

Just as important is knowing when the number means nothing. A result that swings run to run is sampling variance: re-run with more seeds or a quorum before you let it decide. A green pipeline whose logs show zero cases executed (a rate-limited endpoint, a crashed harness) is no signal, not safety. And the grader can be wrong in both directions — flagging a refusal as a success (false positive, an inflated ASR) or, after a lenient grader swap, scoring real successes as refusals (a flattering green that hides danger). Those runs are a HOLD: fix the grader or the harness and re-score. Finally, never let a loosened threshold in the same change manufacture a pass — moving the bar is not clearing it. And do not over-fail a genuinely green build: when ASR is under gate, no seed regressed, the grader is validated and the suite actually ran, the right call is PASS.

Workflow template generator: gate pull requests on a failure rate

This generates a GitHub Actions workflow file in your browser. This page does not run PyRIT or garak; it only writes text for you to review and commit. The threshold is an example the team must justify, not a standard. Commands are included only where the official docs show them; anything else is a marked TODO.

# Generated by the PlayCISO Red-Team CI Lab. TEMPLATE ONLY: review every line and every TODO.
# This file was generated in your browser; PlayCISO did not run garak.
# The 5% threshold below is an EXAMPLE. Your team must justify its own number
# (risk appetite, dataset size, grader reliability, run-to-run variance).
name: adversarial-tests
on:
  pull_request:
    paths:
      - 'prompts/**'
      - 'config/model.yaml'

# Least privilege: the job only needs to read the repository.
permissions:
  contents: read

concurrency:
  group: adversarial-${{ github.ref }}
  cancel-in-progress: true

jobs:
  adversarial:
    runs-on: ubuntu-latest
    timeout-minutes: 45
    # Secrets are not passed to workflows from forked pull requests; skip the job for forks rather than using pull_request_target with untrusted code.
    if: github.event.pull_request.head.repo.full_name == github.repository
    env:
      MAX_FAILURE_RATE_PCT: '5'   # EXAMPLE threshold, edit and justify
      # Provider keys come from GitHub Actions secrets (Settings > Secrets). Use a dedicated,
      # low-quota, test-only key; never a production credential.
      TARGET_API_KEY: ${{ secrets.TARGET_API_KEY }}
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'   # TODO: confirm the Python version garak supports

      - name: Install garak
        run: |
          python -m pip install -U garak   # command from the garak README; pin a version for reproducible gates

      - name: Run adversarial suite
        run: |
          mkdir -p results
          # Non-deterministic results: this step re-runs the suite up to 2 times in total and keeps the
          # run with the HIGHEST failure rate. Re-run counts are a design choice, not a standard; record them.
          # garak documents: python3 -m garak --target_type <family> --target_name <model> --spec <probes>
          # TODO: set the target and the probe spec for YOUR application; keep the dataset to about 200 cases.
          # TODO: confirm in the garak docs how to cap generations per probe and where the report path is printed.
          python3 -m garak --target_type TODO_TARGET_FAMILY --target_name TODO_TARGET_NAME --spec TODO_PROBE_SPEC

      - name: Gate on failure rate
        run: |
          # TODO: have the step above write results/summary.json as {"failed": <int>, "total": <int>}
          # (parse the garak output yourself; this template does not assume a report format).
          python3 - <<'PY'
          import json, os, sys
          s = json.load(open('results/summary.json'))
          total, failed = int(s['total']), int(s['failed'])
          if total <= 0:
              print('No cases executed: treat as NO SIGNAL, not a pass.'); sys.exit(1)
          rate = 100.0 * failed / total
          limit = float(os.environ['MAX_FAILURE_RATE_PCT'])
          print(f'failure rate {rate:.1f}% ({failed}/{total}), limit {limit}%')
          sys.exit(1 if rate > limit else 0)
          PY

      - name: Upload evidence
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: adversarial-results
          path: results/
          retention-days: 14

Notes before you rely on it

  • Secrets. Store provider keys as GitHub Actions secrets, use a dedicated test-only key with a spend cap, and keep the token permissions at contents: read (the GitHub docs advise granting the least required access).
  • Flaky and non-deterministic results. Model outputs vary between runs and graders can be wrong. A single borderline result is a reason to re-run or enlarge the dataset, not to move the threshold. A run that executed zero cases is no signal, and the template fails it.
  • Keep regressions separate. Re-run previously fixed attacks as their own set and fail on any regression, whatever the aggregate rate is.
  • Not verified here. The garak exit-code behaviour and the PyRIT package name and exit codes were not confirmed in the docs reviewed, so the template reads a summary file you produce instead of assuming either.

Sources (accessed 2026-11-04)

Frequently asked questions

What does the Red-Team CI lab teach?

It trains the judgment call behind a pre-deploy safety gate: when an automated jailbreak/attack suite runs in CI and reports an attack-success-rate, should the build pass, be blocked, or be held because the run cannot be trusted? You work a queue of CI runs and for each you pick the verdict and the reason — ASR over or within the gate, a regression, a new case the model already resists, a flaky run, an unreliable grader, no real signal, or a loosened gate. It is release-gating and eval-interpretation practice; it does not run any evals against a model.

Are the tools and metrics real?

Yes. Attack-success-rate (ASR), threshold gates, regression suites and grader reliability are the real moving parts of LLM/agent red-teaming, and garak (NVIDIA’s LLM vulnerability scanner), PyRIT (Microsoft’s Python Risk Identification Toolkit) and promptfoo (an open-source eval/red-team runner) are the real tools such CI suites are built from, named here as concepts. The individual runs, ASR figures and thresholds are synthetic, illustrative scenario numbers — not measurements, benchmarks or published statistics.

Does it generate jailbreaks or exploits?

No. This is strictly a defensive training drill. Attacks are described generically ("a new encoding/roleplay probe family", "a multi-turn crescendo"), never as working prompts, and no payload here can be run against a model. The skill being trained is interpreting the OUTPUT of a red-team suite well enough to gate a release correctly — reading ASR, regressions and grader behaviour, not producing attacks.

Why is HOLD a separate verdict from PASS and FAIL?

Because the most expensive gating mistakes come from trusting a number you should not. A single flaky success, a harness that executed zero cases, or a grader mis-scoring refusals produces an ASR that is meaningless — passing or failing on it is wrong either way. HOLD means "re-run, add seeds/quorum, or fix the grader before deciding". Separating it from PASS/FAIL is the point: a green pipeline with no tests, or a red one from a broken grader, is not a verdict about the model. Educational simulation, not security advice for a specific pipeline.

Can I get a GitHub Actions workflow that gates pull requests on a red-team failure rate?

Yes. The workflow template generator on this page builds a GitHub Actions file in your browser: pick garak or PyRIT, a dataset size, an editable failure-rate threshold, trigger paths, and options for fork handling, artifacts and re-runs. It does not run PyRIT or garak. The threshold is an example your team must justify, not a standard, commands are included only where the official docs show them, and anything else is a marked TODO.

This tool is free and always will be. Would a Pro workspace — saved designs, team sharing and exports — be worth paying for?

Show me Pro →No account needed to use this tool — this just tells us whether Pro is worth building out.

The tools people use most on PlayCISO.

All tools