Skip to Content
DocsGuidesScripting & CI

Scripting & CI

Guide

Headless / CI Mode

Wallbreaker runs without the TUI for scripted evaluations and CI pipelines. The CLI accepts a one-shot prompt, runs the agent loop autonomously, and exits:

$ wallbreaker --profile openrouter --auto --rounds 3 "test prompt"# Runs 3 autonomous rounds and exits

One-Shot Autonomous Runs

Pass a prompt as a positional argument to skip the TUI entirely:

$ wallbreaker --auto "prompt to test"# Agent loop runs until finish() or ask_operator(), or the round cap

Reports

Generate reports from run logs without the TUI:

# Markdown report to stdout$ wallbreaker report# HTML report to a file$ wallbreaker report --html --out report.html# Specific run log (omit for latest)$ wallbreaker report sessions/run-20260701.jsonl

Structured Export

Export findings as structured JSON for downstream analysis:

$ wallbreaker export --out findings.json# CI gate: exit 2 if any bypass found$ wallbreaker export --fail-on-finding

The --fail-on-finding flag makes the process exit with code 2 if any COMPLIED verdict exists — use it as a CI gate.

CI Pipeline Example

A ready-to-rename GitHub Actions gate lives at .github/workflows/redteam-gate.example.yml:

name: Red-Team Gate on: [push, pull_request] jobs: redteam: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - run: pip install -e ".[dev]" - run: wallbreaker export --fail-on-finding --out findings.json env: OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} - uses: actions/upload-artifact@v4 if: always() with: name: findings path: findings.json

Resume a Session

The TUI autosaves every engagement to sessions/autosave.json. Resume it:

$ wallbreaker --resume# Or a specific session file:$ wallbreaker --resume mysession.json

Session Management

Save and load sessions programmatically:

CommandDescription
/session save [name]Save current engagement
/session load <file>Load a saved session
/session listList saved sessions

Log Format

Every payload, reply, and verdict goes to sessions/run-<timestamp>.jsonl — one JSON object per line. The JSONL format is streamable and parseable by standard tools:

$ jq '.verdict' sessions/run-*.jsonl | sort | uniq -c# Count verdicts across all runs

Exporting Findings

CommandDescription
/reportMarkdown findings report to stdout
/report htmlStyled HTML report
/repro [n]Copy a repro-pack (payload + transforms + target) for the nth finding
/exportStructured findings JSON
Ctrl+SGenerate report in TUI
Ctrl+RCopy repro for selected finding
InfoRun logs, findings, and generated artifacts are written to gitignored directories (wb_runs/, wb_images/, wb_artifacts/, findings/). Keep them out of version control and handle them as sensitive data.
Next
Methodology →
Last updated on