Skip to content

Reference

Threat model: the scanner itself

Scan deliberately talks to hostile or compromised systems, and it holds the user’s API keys. This document covers threats to the user running Scan, and misuse of Scan. Owners: the milestone listed. Each mitigation becomes a test where possible.

Assets

  • The user’s API keys (target, attacker and judge models)
  • The user’s machine and CI runner
  • Scan results (they may contain the target’s data and system prompt)
  • The integrity of results (a false “grade A” is harmful)
  • Third parties who are not authorised targets

Trust boundaries

  1. Config and packs → Scan (packs may come from the community)
  2. Scan ↔ target (target responses are attacker-controlled by design)
  3. Scan ↔ MCP server under test (it may be malicious)
  4. Canary sink ↔ network
  5. Scan → report viewers (HTML is opened in a browser)
  6. Dependency supply chain → Scan

Threats and mitigations

ID Threat Mitigation Milestone
T1 Target response contains HTML or JS that runs when the report is opened (stored XSS) Jinja autoescape; never mark target text safe; a test with an XSS payload fixture M5a, M5b
T2 Malicious pack YAML runs code (YAML tags, templating) yaml.safe_load only; JSON Schema validation; whitelisted placeholders, no expression language M2
T3 API key leaks into reports, logs, transcripts or exceptions Redacting secret wrapper; a final redaction pass on the JSON; a test that plants a key and greps all outputs (AC-12) M1
T4 Canary sink is reachable from the network, or is abused as an open relay Bind to 127.0.0.1 by default; ephemeral port; only log and respond with 204; per-run salted canary values (ADR-0008); chunked and malformed bodies handled M1
T5 A malicious MCP server under test attacks the host over stdio (command injection, as in CVE-2025-6514) The command comes only from the user config, never from the server; no shell; documented sandbox advice (container); static checks never run tool code M4
T6 Scan is pointed at a third party without permission Required authorization block (AC-11); responsible-use doc; README warning M1
T7 The target’s prompt injection manipulates the LLM judge into a false “pass” Deterministic signals decide first (ADR-0003); the judge prompt wraps the transcript as quoted data; the judge’s reasoning is stored for review M2
T8 Result tampering or non-reproducibility undermines a published benchmark Recorded seed, model versions and pack versions; signed releases later M1, M6
T9 Dependency compromise Locked uv.lock; Dependabot; actions pinned by SHA; gitleaks; signed releases (Sigstore) at launch setup, M6
T10 Runaway cost or rate-limit abuse of the target Call estimate before running; budget cap; backoff M1, M2
T11 Reports contain the target’s sensitive data and are shared carelessly A banner noting that reports may contain target data; local-only by default; telemetry off M5b
T12 Attack text is reused by scammers (dual use) Evasion packs are not public; payloads test behaviour only (responsible-use.md) M2, M3

Local app server (ADR-0010, M7)

ID Threat Mitigation Tests
T13 The local server is reachable from the network Binds 127.0.0.1 only. A non-loopback --host needs --i-understand-remote-access, is documented as unsupported, and widens only the Host allow-list test_server.py, test_server_launch.py
T14 A malicious web page drives the local API (CSRF, DNS rebinding) A random 256-bit token on every API call, Host allow-list, Origin check on mutations, no CORS, strict CSP test_api_requires_the_session_token, test_unexpected_host_header_is_refused, test_cross_origin_mutations_are_refused
T15 Secrets leak through the API, events or artifacts The API reports only whether an environment variable is set; configs hold names only; every event and artifact passes the redactor test_env_check_returns_booleans_only, test_scan_run_streams_events_and_secrets_never_appear
T16 File access outside the workspace, or active content from a hostile target Strict ids and path checks, an artifact allow-list, report HTML served with Content-Security-Policy: sandbox test_config_ids_are_strict, test_run_ids_and_artifact_names_are_strict, test_artifacts_and_report_sandbox

Out of scope (for now)

The hosted tier (to be modelled before it is built), and side channels on the user’s machine.