Skip to the content.

UKGovernmentBEIS/inspect_ai - security scan

Repository: UKGovernmentBEIS/inspect_ai Commit scanned: a29a8f3e58ebb0599a6e514821fd72181a8a3594 Scan date: 2026-07-02 Disclosure status: public — post-only (clean scan; no upstream issue filed)

Summary

Severity Count
Critical 1
High 50
Medium 110
Low 0 (filtered at --min-severity medium)
Info 0

Total findings: 161 (0 real after curation)

Inspect is the LLM-evaluation framework built by the UK AI Security Institute — it runs eval tasks that execute model-generated tool calls (bash, python, editors) inside Docker/local sandboxes, records transcripts to a log store, and ships a log viewer. That makes its most interesting surface the sandbox boundary: an eval framework deliberately runs untrusted, model-authored code, so the security question is whether that code stays contained.

This is the 12th clean scan, and one of the most satisfying: the two findings a scanner would headline — a tarfile.extractall sandbox-escape and pickle deserialization — are, on inspection, defended with a CVE citation and a trusted local cache respectively. The people whose literal job is AI safety had already closed the interesting hole.

Top findings

1. The tar-slip sandbox-escape is defended with filter="data" and a CVE citation

2. Pickle is a local model-response cache, not an untrusted-load

3. The eval() “code execution” hits are the framework’s own API

4. The one critical is a transitive jupyter-server CVE that isn’t reached

5. The 50→bulk is workflow tag-pinning and by-design sandbox Dockerfiles

Patterns observed

An eval framework’s threat model is the sandbox, and this one holds. The whole reason Inspect exists is to run model-authored code — bash tools, python tools, editors — so “arbitrary code execution” inside the sandbox is the feature, not the bug (the same inversion the AG2 scan showed). The security question narrows to the boundary: does anything let that code reach the host? The one place it could — extracting a sandbox-built tar on the host during checkpoint egress — is defended with filter="data" and a CVE-2007-4559 comment. That’s the single most important control on the codebase, and it’s correct.

The scariest-looking findings were the most thoroughly handled. This keeps recurring (openmed’s trust_remote_code allowlist, codex-lb’s trusted-proxy CIDRs) and Inspect is a clean example: tarfile.extractall and pickle.load are exactly the rules a reviewer’s eye jumps to, and both were already reasoned through — one with an inline CVE reference, the other by keeping the data on the local side of the trust boundary. A scanner reports the dangerous primitive; it can’t report the argument or the data source that makes it safe.

Provenance shows. Inspect is maintained by an AI security institute, and the security posture is what you’d hope for from that: the sandbox-escape vector is documented and mitigated, the log-store SQL is parameterized (the IN-clause builds ? placeholders and binds the values; only internal table-name constants are interpolated), Dependabot is wired, and there are no secrets (gitleaks clean). The 161 count is real scanner output, but after curation it’s tag-pinning hardening and a transitive CVE.

Notes on the tool

Disclosure timeline

This is a post-only clean-scan write-up. The sandbox-escape vector is mitigated with filter="data" and a CVE citation, the pickle is a trusted local cache, the eval() hits are the framework’s own API, the log-store SQL is parameterized, and the lone critical is a transitive, unreached jupyter-server CVE. Nothing cleared the quality gate.

Reproduce

git clone https://github.com/UKGovernmentBEIS/inspect_ai /tmp/scan-target
python scanner/run_scan.py --repo /tmp/scan-target \
  --reports-dir ./reports/ukgovernmentbeis-inspect-ai \
  --min-severity medium --ignore-samples