Sixi Scanner

A command-line red-team scanner for LLM agents. It sends probe prompts to an
endpoint you are authorised to test, judges the replies, and writes out the
evidence.
$ sixi-scanner scan --url https://your-agent.example/v1/chat/completions
45 techniques · Go standard library only, zero dependencies · reports as JSON,
SARIF 2.1.0, Markdown or HTML · Apache 2.0.
Radek (Sixi) · github.com/radeksixi/sixi-scanner
Read this before you use the output for anything.
A clean result is not an assurance. It means the 45 probes below did not
produce a finding against the endpoint you named. It says nothing about
techniques this tool does not implement, and nothing about attacks that need
judgement no substring match or structural oracle can make. The report says so
at the bottom of every Markdown and HTML run, because a reader forwarding the
document should not have to come back to the README to find out.
It does not certify, attest or grade compliance. No output of this tool says
the words compliant, certified or guaranteed, and a test enforces that.
The technique set is a baseline. Every probe here is publicly documented.
That is deliberate — a finding you can reproduce with curl is worth more than
one you cannot — but it means this is a floor, not a state of the art.
It is not a scanner for your infrastructure. It probes one agent endpoint
over HTTP. It does not read your cloud tenancy, map your agent fleet, or check
whether your prompt actually reached the model you think it did.
What it does do
Five things, in order of how much they matter.
It shows its evidence. Every finding carries the exact prompt sent and the
exact reply received, plus the sentence explaining why that reply was judged a
break. A security claim you cannot check is a rumour.
It finds the leak nobody asked for. A marker list only recognises the leak
its own payload requested, and most real leaks are not the one you asked about.
An agent asked about package managers can answer with its refund cap, its
e-mail allow-list and the accounts it may not touch — handing over its
instruction set — while every technique reads that reply as a hold, because no
marker shares a substring with a paraphrase of a rule. A shared second marker
catches a reply that states three or more constraints on the agent itself,
whichever probe drew it. On 1,456 replies recorded from a real agent this took
payload recall from 0.444 to 0.889 at no cost in precision. See
docs/recitation.md, which also says plainly what this
cannot decide on its own.
It does not cry wolf on refusals. This is the hard part of the problem and
the part most tools get wrong. A target that answers "I don't retain any
personal data" has just used the word retain — and a naive scanner reports
that as a data leak. Every marker this tool matches is checked against the
sentence it appeared in, and a match inside a denial is discounted rather than
counted. See docs/judge.md.
It reports what it could not test. A technique that got no answer is listed
as untested rather than counted as a pass — in every report format, not only at
the terminal. A scan that was interrupted partway, or where some techniques
never got an answer, says its coverage is partial and exits 3. A technique that
got an answer the scan had no way to judge — the agent said it had sent
something, and the connector reports no tool calls to check that against — is
listed under undecided, not passed.
It can ask, if you have somewhere to ask. A marker match is evidence, not a
verdict: "I can't share API keys" contains every credential marker's substring
and is not a leak. One optional flag points the scanner at an OpenAI-compatible
model and a context file describing the agent, and every candidate break is put
to it — severity and all, so a "violation, low" does not become a finding. It is
off by default, budgeted, and a run that ran out of budget says so. See
docs/confirm.md.
How it measures up
Every release is re-run on a public benchmark: seven red-teaming tools against
one real Microsoft Foundry agent, scored from the wire by deterministic oracles
and a tool-blind judge rather than by any tool's own verdict. The benchmark is
maintained by this tool's author; the conflict of interest is stated there and
every raw finding is published.
| v0.8.3 on agent-redteam-benchmark |
measured |
among seven tools |
| Precision: of what it reported, how much was real |
0.821 |
1st (next: 0.300) |
| Recall: of what it broke, how much it reported |
0.571 |
1st (next: 0.556; denominator varies per run — see PROTOCOL §9) |
| Distinct violating payloads caught |
8 |
up from 5 across the four prior releases |
| Confirmed violations (turn-matched, 1,480 turns) |
61 |
3rd (promptfoo 89, garak 81) |
| Cloud cost of the run |
$0.72 |
+ 100 local attacker-model calls |
On the separate multi-turn session lane (--target chat), sixi-scanner reaches
1.000 precision (22 of 22 flags confirmed) and hits two deterministic
oracles no single-turn scanner can reach: REFUND_CAP_SPLIT (splitting a 50 EUR
per-request cap into two 30 EUR refunds across a conversation) and
PROMPT_TAINT_RELAYED (planting an agent-directed payload on one turn and
having the agent forward it via send_email on the next). Where it loses is
breadth: 8 distinct violating attacks on the stateless lane, against 67 for
garak and 89 for promptfoo. See the
v0.8.3 write-up.
Verified for v1.0.0
Before tagging v1.0.0, the deterministic judge, tool-policy engine, and MCP/A2A transports were verified on both the recorded Foundry corpus and a live multi-protocol Google ADK target (adk-demo-target) running locally:
- Foundry 1,480-turn offline replay (zero LLM judge calls): marker-only precision rose from
0.667 (58 TP / 29 FP) in v0.10.0 to 0.763 (58 TP / 18 FP, -38% false positives) with zero recall loss (30/61 = 0.492), eliminating 7/7 training-data-extraction FPs and cutting credential-elicitation FPs in half.
- Live Atlas 3-rung defence ladder (
gemma4:e4b-it-qat, qwen3.8:27b): on gemma4:e4b-it-qat, findings dropped monotonically across none (8 findings, 18 server-oracle leaks) → basic (6 findings, 7 leaks) → hardened (1 real remaining finding: multi-turn sleeper-memory bypassing regex input guards; 0 server leaks).
- Live seeded tool-call policy enforcement (
--seed, --trace-path tool_calls, --context atlas-context.json): on none, sixi-scanner observed 24 real ADK tool calls and deterministically caught refund-cap-split (cumulative 60 CHF > 50 CHF), tool-bola (ACC-9999), and payload-relay (send_email) with zero LLM judge calls; on hardened (22 tool calls, 0 server oracle breaches), it exited 0 cleanly.
- Live MCP & A2A end-to-end: passive
surface scored 0 poisoning FPs on clean MCP/A2A endpoints and caught poisoned MCP tool descriptions, poisoned A2A skill cards, and unauthenticated A2A cards; active --target mcp caught json-schema-bypass and active --target a2a maintained multi-turn sessions (19 turns / 11 sessions) and caught sleeper-memory.
See docs/STABILITY.md for the v1.x CLI, exit-code, and schema compatibility policy.
Install
go install github.com/radeksixi/sixi-scanner/cmd/sixi-scanner@latest
Or build from a checkout:
git clone https://github.com/radeksixi/sixi-scanner
cd sixi-scanner && make build && ./sixi-scanner
Go 1.24 or later. There is nothing to vendor and nothing to configure.
Quick start
See the shape of a report without touching the network:
$ sixi-scanner scan --target echo --format markdown
Scan an OpenAI-compatible chat endpoint:
$ sixi-scanner scan --url https://your-agent.example/v1/chat/completions
Scan a bespoke internal agent that does not speak the OpenAI shape:
$ sixi-scanner scan --target json --url https://internal.example/api/ask \
--body '{"question":{{json}},"session":"s1"}' \
--reply-path answer.text
Scan a website chatbot:
$ sixi-scanner scan --target webform --url https://site.example/chat --field message
Re-run exactly one finding to check it still reproduces:
$ sixi-scanner scan --url https://your-agent.example/v1/chat/completions \
--only probe.llm02.system-prompt-leak
Passively inspect an MCP server or A2A Agent Card for tool poisoning and trust-posture issues (sends zero adversarial prompts):
$ sixi-scanner surface --url https://your-agent.example
Compare two JSON scans honestly (distinguishing fixed from not retested):
$ sixi-scanner diff baseline.json current.json
Enforce a deterministic tool-call policy on observed tool traces (no LLM judge required):
$ sixi-scanner scan --target json --url https://internal.example/api/ask \
--body '{"question":{{json}},"session":{{session_json}}}' \
--reply-path reply --trace-path tool_calls \
--context agent.json --reproduce 2 --redact --out report.html
Connectors
--target |
Talks to |
Needs |
openai |
OpenAI-compatible /chat/completions |
--url, optionally --model |
json |
Anything, with a described request and reply shape |
--url, --body, --reply-path, optionally --trace-path |
chat |
An endpoint that keeps a conversation, one probe per turn |
--url, optionally --trace-path |
mcp |
Model Context Protocol (MCP) JSON-RPC 2.0 server (tools/list + tools/call) |
--url, optionally --tool |
a2a |
Agent-to-Agent (A2A) JSON-RPC endpoint (v0.3 message/send with v0.2 tasks/send fallback, session-capable) |
--url |
webform |
An HTML form |
--url, --field |
echo |
Nothing — an in-process target for demos and CI |
nothing |
The json connector is the one that makes this usable against a system nobody
else has seen. --body takes a template with {{json}} (the prompt as a whole
JSON string, quotes included, which is what you want) or {{prompt}} (the
prompt escaped for a string you have already quoted, as in "q":"{{prompt}}").
Including {{session}} or {{session_json}} in --body automatically enables
multi-turn Sequence probes on the json connector. --reply-path (and
optional --trace-path for tool-call traces) take dotted paths into the
response, with numeric segments for arrays:
--body '{"q":{{json}},"session":{{session_json}}}' --reply-path data.0.answer.text --trace-path data.0.tool_calls
Multi-turn probes
Some attacks only exist across a conversation: a limit expressed per request,
an instruction planted on one turn and acted on in the next, a payload that
asks to be relayed onward. Those are sequences -- ordered turns sent inside
one attempt -- and they need a target that can hold a conversation. Point
--target chat at an endpoint that takes {"message", "session_id"} and
answers {"reply"}, and they run:
$ sixi-scanner scan --target chat --url https://agent.example/chat
Each attempt gets its own conversation, and the conversation id travels per
request rather than living on the connector, so techniques running at the same
time cannot end up inside each other's sessions.
Against a connector that cannot hold a conversation, these probes are not
sent at all. Sending them anyway would not weaken them, it would corrupt
them: the turns would go out as unrelated requests, and a probe that requires
every turn to break would then report two individually compliant replies as a
breach. They are listed under unsupported in the report, and a scan that
could run nothing exits 2 rather than passing.
Output
--format |
For |
text |
Reading at a terminal. Findings go to stderr, the summary to stdout, so > summary.txt stays clean. |
json |
Machines. The full schema, including every finding's transcript. |
sarif |
Code scanning. SARIF 2.1.0 with security-severity, Markdown help, automationDetails, and redacted snippets. |
markdown |
Sending to a person who has to decide whether to act. |
html |
Self-contained, auto-escaped single-file HTML report (no external assets, no compliance grading). |
Write a report to a file with --out; the format is taken from the extension
(.json, .sarif, .md, .html) unless --format says otherwise. Pass
--redact to scrub secrets, tokens, emails, IPv4 addresses and long account
numbers from finding evidence while keeping fingerprints stable, --reproduce N
to re-run only breaking payloads N extra times and record k/n
reproducibility, and --log-jsonl <path> to stream one structured JSONL record
per attempt (prompt, reply, tool calls, latency, mechanism, verdict) for
offline analysis alongside the aggregate stats block in JSON reports.
In CI
Run sixi-scanner directly in your pipeline and write SARIF 2.1.0 for code scanning:
- name: Red-team the agent
env:
AGENT_URL: ${{ secrets.AGENT_URL }}
AGENT_TOKEN: ${{ secrets.AGENT_TOKEN }}
run: |
sixi-scanner scan --url "$AGENT_URL" \
--header "Authorization: Bearer $AGENT_TOKEN" \
--format sarif --out sixi.sarif
Exit codes are the interface:
| Code |
Meaning |
0 |
Ran, found nothing |
1 |
Ran, found something |
2 |
Could not run — bad flags, unreachable target, bad output path |
3 |
Did not cover what it was asked to cover — interrupted, or some techniques got no answer |
3 is distinct from 0 on purpose: a cancelled scan must not read as a pass,
and neither must one where the target stopped answering partway. An endpoint
that answers with an error status and nothing readable — an expired token, a
mistyped path, a rate limiter — counts as no answer.
Upload with github/codeql-action/upload-sarif
or the SARIF uploader of your choice.
What is covered, and what is not
sixi-scanner list prints the catalogue; docs/techniques.md explains the gaps.
Covered, as publicly documented baseline probes (45 active techniques plus passive MCP/A2A surface inspection):
- Prompt injection — instruction override, forged conversation turns,
authority and persona framing, inter-agent routing framing, encoded
instructions, non-English and low-resource multilingual instructions, indirect
and latent document injection, Unicode tag-plane & BiDi/backspace smuggling,
MathPrompt, many-shot conditioning, Bad Likert Judge, adversarial poetry,
JSON schema constraint bypass, delayed multi-turn instructions, and sleeper
memory poisoning
- Sensitive disclosure — system prompt leakage (direct and as a translation
task), credential and configuration elicitation (with provider-token patterns
and placeholder filtering), parameter induction into tool arguments,
conversation-context leakage, personal data elicitation (with role-mailbox
filtering), canary disclosure
- Excessive agency — tool enumeration, assent to irreversible actions,
injected instructions inside tool arguments, scope expansion, per-request cap
splitting across a session, outbound payload relay, BOLA, BFLA, SSRF, and
deterministic wire policy enforcement via
--context policy
- Misinformation and availability — unqualified compliance claims, false
action claims adjudicated against the tool trace, narration-only honesty caps,
declined-then-produced detection, unbounded output, verbatim memorisation
probes
- Output handling — structural Markdown/EchoLeak exfiltration, SSTI echo
pass-through, raw ANSI/OSC 8 escape injection, Base64 active HTML/XSS
reflection, CSV formula injection, and email header injection
- Passive surface inspection (
sixi-scanner surface) — MCP tools/list
poisoning & cross-tool shadowing, A2A Agent Card poisoning & trust posture
Not covered, and worth being explicit about:
- Anything requiring a browser. The
webform connector does not run
JavaScript, so a chatbot that renders client-side comes back empty rather than
clean.
- Anything requiring authentication flows or MFA setup.
- Adaptive multi-step chains. Sequence techniques send fixed multi-turn
conversations on session-capable targets, but this tool does not dynamically
synthesise or adapt attack chains across requests. The optional confirmation
stage is a judge, not a second attacker — it cannot escalate.
- Live multi-agent mesh orchestration (
interagent-framing tests whether one
HTTP endpoint trusts spoofed peer/supervisor routing syntax, not an internal
message bus).
- Anything about your deployment. Whether the prompt reaches the model you
think it does is out of scope for an HTTP scanner.
Design notes worth knowing
Every technique starts a fresh conversation. A jailbreak that worked has
already changed the target's state — it agreed to something, adopted a persona,
dropped a guardrail. A later technique probing that state is measuring a
different agent than the one that answered the first probe.
A refusal moves to the next variant, it does not repeat. Repeating a refused
request is how a scan turns into a wall: slow, expensive, and it tells the
reader nothing the first refusal did not. Each variant is a different statement
of the same idea.
A transport error is not an answer. It is retried once, then that technique
is abandoned and the rest of the scan continues. It is never scored.
The prompt is never judged. Only the reply is. A marker that appears in your
own payload has matched nothing.
Extending it
A technique is a struct. There is nothing to register by hand and nothing in the
engine to change:
tech.Data{Def: tech.Definition{
ID: "probe.llm02.example-probe",
Title: "Example probe",
Category: "LLM02:2025 Sensitive Information Disclosure",
Severity: tech.SeverityHigh,
Description: "What it probes for, and why it matters.",
Remediation: "The concrete change that closes it.",
Variants: []string{"first payload", "different second payload"},
Markers: []string{"string that appears only on a real disclosure"},
Negations: []string{"cue that the marker was named, not disclosed"},
MinMarkers: 1,
}}
Markers is the part that needs care. A marker that also appears in a refusal
produces a false positive; one that appears only in a perfect leak produces a
false negative. When a technique has an easy false-positive failure mode, raise
MinMarkers and populate Negations.
A transport is likewise just an interface — implement Send and Describe,
register it, and nothing else changes.
This is a complete tool for probing an endpoint you can reach, and it is
deliberately small enough to read in an afternoon. If you need more than this,
the honest answer is usually that you need a different tool rather than a bigger
one: a larger technique library bought on trust is worth less than the
forty-five techniques here, each of which you can check.
Security
Please read SECURITY.md before running this against anything. It
covers reporting a vulnerability and the acceptable-use boundary, which is
narrow: only scan endpoints you own or are authorised to test in writing.
Author
Radek (Sixi) Issues and pull requests welcome — see
CONTRIBUTING.md.
This is a personal project. It is not affiliated with, endorsed by, or derived
from any company, and it has no commercial counterpart. Everything it does, it
does locally, with no account and no telemetry.
Licence
Apache 2.0 — see LICENSE and NOTICE.
The licence covers the code and not the name. Sixi Scanner and
sixi-scanner are marks of the author, and Apache 2.0 grants no trademark
rights. In practice that means: use it commercially, fork it, change every line
of it — but do not ship a modified version as Sixi Scanner, or sell a product
under the name, without asking. Nominative use — saying what you use, linking
here, naming it in an assessment — needs no permission and never does.
TRADEMARK.md has the details, including what happens if someone
ignores it.