The dataset viewer is not available for this subset.
Exception: SplitsNotFoundError
Message: The split names could not be parsed from the dataset config.
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 286, in get_dataset_config_info
for split_generator in builder._split_generators(
~~~~~~~~~~~~~~~~~~~~~~~~~^
StreamingDownloadManager(base_path=builder.base_path, download_config=download_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 80, in _split_generators
raise ValueError(
...<2 lines>...
)
ValueError: The TAR archives of the dataset should be in WebDataset format, but the files in the archive don't share the same prefix or the same types.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/split_names.py", line 68, in compute_split_names_from_streaming_response
for split in get_dataset_split_names(
~~~~~~~~~~~~~~~~~~~~~~~^
path=dataset,
^^^^^^^^^^^^^
config_name=config,
^^^^^^^^^^^^^^^^^^^
token=hf_token,
^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 340, in get_dataset_split_names
info = get_dataset_config_info(
path,
...<6 lines>...
**config_kwargs,
)
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 291, in get_dataset_config_info
raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
PatchAudit Artifact
This artifact contains the PatchAudit technique code for auditing security patches. Given a CVE's initial
patch commit C1 and a later commit Ci, PatchAudit decides whether Ci is a future commit — a commit
that continues the fix because C1 was incomplete (left the same vulnerability reachable) or
incorrect (its own change introduced a new defect). If a true future commit exists, C1 is a bad
patch; if the latest future commit still does not close the hole, it is a lingering (zero-day) bad
patch.
The artifact packages PatchAudit's three-phase pipeline:
- Phase 1 — explicit intent. Extract explicit references from
Ci's commit message — onlyC1's own commit hash or the CVE id count — and, when found, validate whether they indicate genuine continuation. Conservative gate: only a HIGH-confidence explicit match skips Phase 2; anything else falls through to Phase 2. - Phase 2 — semantic intent. Build a whole-repository Code Property Graph (Joern), take bounded 3-hop
forward data/control slices from the changed lines of
C1andCi, and intersect them into the Intent Scope (empty intersection ⇒ not a future commit, filtered without any LLM call); a code LLM (Qwen3-14B) — or the agentic path (tools/agent/) that adds function/variable/issue/web retrieval — then decides YES/NO with a grounded rationale. - Phase 3 — multi-pronged verification. Two parallel prongs: an independent GPT-5 judge auditing the
agent's grounding, and CodeQL+Semgrep vulnerability-state evidence used only as CORROBORATION
(reliability-gated — trusted only when an analyzer detects the CVE's CWE at
C1_pre; otherwise its silence is labeled a possible false negative, never taken as "safe"). Arbitration: mutual support ⇒ accept (high confidence); disagreement/insufficient ⇒ bounded refinement (≤3 rounds); budget exhausted ⇒ fall back to the agent's current prediction. Output isfuture-commit/not-future-commit, and for a bad patch theincomplete/incorrectclass with a justification, issue, and cause.
The default artifact run executes the full pipeline on a bundled case directory. The Phase-2 agent is the
fine-tuned adapter (models/phase2_lora) over base Qwen3-14B, served by vLLM as model name phase2 and
used by default. (You can instead point the agent at the plain base model — set AGENT_MODEL=Qwen/Qwen3-14B
and serve it without the adapter — but the worked examples' expected results were produced with the fine-tuned
adapter.) The large-scale measurement study is not needed to run the examples.
Quick start (prebuilt bundle)
If you got the packaged bundle (patchaudit_bundle_adapters.tar.zst → extracts to this directory), it ships
the prebuilt analysis image and the fine-tuned adapters — no docker build needed. The base Qwen3-14B
(~28 GB, public) auto-downloads from HuggingFace on first agent start.
# 1. load the prebuilt analysis image (skip if you built it from docker/Dockerfile)
docker load -i patchaudit-analysis-image.tar # -> patchaudit-analysis:latest
# 2. start the Phase-2 agent — vLLM serving the base model + our LoRA adapter (served as model "phase2").
# ADAPTER= mounts the adapter into the container; the base Qwen3-14B auto-downloads on first start.
# GPU flag auto-detected: CDI if configured, else `--gpus all` (override with GPU_ARGS=...).
ADAPTER="$PWD/models/phase2_lora" tools/vllm_server.sh start
# no-vLLM fallback (works without driver >=550, but much slower):
# VENV=/path/to/gpu-venv ADAPTER="$PWD/models/phase2_lora" tools/hf_server.sh start
# 3. run the worked example. The agent uses the fine-tuned adapter (model "phase2") by default.
# Phase-3 verification is mandatory: the independent GPT-5 judge audits the agent — set OPENAI_API_KEY.
git clone https://github.com/django/django repos/django
docker run --rm --network host \
-e OPENAI_API_KEY -e VLLM_BASE_URL=http://localhost:8000/v1 \
-v "$PWD/examples:/cases" -v "$PWD/repos/django:/repos/django:ro" \
patchaudit-analysis:latest /cases/case_CVE-2021-31542 all --stop-at-first-yes
Expected: the 23 empty-intersection commits are Phase-2-filtered (no LLM call); only C2 (b5569996) reaches
the agent → YES → future-commit (C1 is a bad patch; paper Figure 10). Full details, the 2026 (LAS) example, and the evaluation set
are below and in data/benchmark_565.jsonl. (Building from source instead of the bundle: see
Assessing Functionality.)
Contents
Top-level folders (file-by-file inventory is under Assessing Availability):
tools/— the full Phase 1–3 pipeline (Python stdlib; external analyzers as subprocesses); the reviewer entry pointrun_case.shand the agent serversvllm_server.sh/hf_server.sh.tools/agent/is the optional agentic Phase 2 (autonomous plan→execute→retrieve with function/variable/issue/web tools) — run it viatools/agent/run_agent.pyin a venv fromtools/agent/requirements.txt(langchain/langgraph/ mcp; Node.js only for the optional GitHub/Firecrawl tools). The default pipeline does not need it.docker/— the analysis-imageDockerfileanddocker-compose.yml.models/— the fine-tuned LoRA adapters overQwen3-14B:phase1_lora/(textual-intent filter) andphase2_lora/(the Phase-2 semantic-intent agent, loaded by the agent server by default).data/— the labeled CVE sets and BadPatch-Bench (benchmark_565.jsonl), plus the re-exploitation cases and the zero-day PoCs. (Dataset construction scripts are not shipped.)examples/— the two worked cases:case_CVE-2021-31542/(Django, paper Figure 10) andcase_CVE-2025-62193/(NOAA-PMEL/LAS, new 2026).reproduce/— scripts + data to regenerate the paper's §6 large-scale-study tables and figures (before/after-2020 prevalence table, patch-metric violin plots, year distribution). Self-contained (data ships alongside); the image hasnumpy/pandas/matplotlib. Seereproduce/README.md, e.g.docker run --rm --entrypoint python3 patchaudit-analysis:latest /patchaudit/reproduce/generate_before_after_2020_table.py.patchaudit-analysis-image.tar— the prebuilt analysis image (docker load);README.md— this file.
A case is a directory with a case.json (fields under Adapt to any CVE). The input is a
CVE's initial patch — the commit c1, the repository (repo_url / repo_path), and the cve_description.
C2, the future commit, is what PatchAudit discovers by scanning C1's later commits; the repo is cloned
separately and mounted. All intermediates (snapshots/, same_file/, manifest.json, result/, static/)
are regenerated into the case directory.
The evaluation runs the full pipeline: Phase 2 slicing + Intent Scope, the advisory Phase 3.1 static
analysis (CodeQL + Semgrep), the Phase 2.2 agent (Qwen3-14B on GPU), and the Phase 3 GPT-5 judge +
refinement loop, producing the final future-commit / not-future-commit decision. For a confirmed bad
patch (future-commit), one more turn emits the paper's Output — the incomplete / incorrect class, a
justification of why Ci shares C1's patching intent, and an issue-cause analysis of what made C1 deficient.
Assessing Availability
A reviewer here only confirms the files are present (file-level inventory). How to run them is in Assessing Functionality.
tools/(17 files):extract.py,slice_prepare.py,slice3.sc,intent_scope.py,scope_files.py,static_scan.py,static_verdict.py,llm_phase2.py,llm_judge.py,refine_loop.py,case.py,run_case.sh,vllm_server.sh,hf_server.py,hf_server.sh,install_host.sh,check_env.sh.docker/:Dockerfile,docker-compose.yml,README.md.models/phase1_lora/andmodels/phase2_lora/: each hasadapter_model.safetensors,adapter_config.json, and the Qwen3 tokenizer files (tokenizer.json,vocab.json,merges.txt,special_tokens_map.json, …).data/:benchmark_565.jsonl(BadPatch-Bench, 565(C1,C2)pairs / 110 CVEs),benchmark_candidate.json(110 labeled CVEs: 45 positive / 65 negative),all_positive.json(617 bad patches),all_negative.json(5786 non-bad-patch CVEs),reexploitation_cases.json(12 re-exploitation cases), andzero_day_pocs/(13 PoCs — a separate set — indexed byzero_day_pocs/README.md; defensive research only).examples/case_CVE-2021-31542/andexamples/case_CVE-2025-62193/: each hascase.json,README.md,expected/scan_summary.jsonl.patchaudit-analysis-image.tar— the prebuilt analysis image (pinned Joern 4.0.614, CodeQL 2.26.4 with python/java/cppsecurity-extendedpacks, Semgrep 1.175.0, JDK 21, andtools/).
Assessing Functionality
Reproduce the paper's Figure 10 example: CVE-2021-31542 (Django directory traversal). This lets you
check the tool's output against a result the paper reports.
C1 (0b79eb36) added a validate_file_name() guard that rejects any path separator. This is an
over-correction. C2 (b5569996) relaxes it to block only ... The tool should flag C2 as the future
commit that fixes C1.
Set up (one-time):
| need | for | notes |
|---|---|---|
| Linux x86-64 | everything | tested on Ubuntu 24.04 |
| free disk | model + images + caches | ~65–70 GB for a first deploy (Qwen3-14B ~28 GB + HF Xet cache ~10 GB + vLLM image ~17 GB + analysis image ~7 GB + bundle/adapters). 100 GB+ if you batch many repos (snapshots, Joern CPGs, CodeQL DBs). The Xet cache and the bundle archive can be deleted after setup. |
| 2 × ≥24 GB GPU | the Phase-2 agent | Qwen3-14B needs both (or one 48 GB GPU) |
| Docker + GPU access | model server + analysis image | either NVIDIA CDI (rootless — below) or the standard runtime (--gpus all); vllm_server.sh auto-detects and picks one (override with GPU_ARGS) |
OPENAI_API_KEY |
the Phase-3 verification judge (GPT-5) | required — verification is a mandatory step |
# analysis image: Joern 4.0.614, CodeQL 2.26.4 (+packs), Semgrep 1.175.0
docker build -f docker/Dockerfile -t patchaudit-analysis:latest .
docker run --rm --entrypoint bash patchaudit-analysis:latest /patchaudit/tools/check_env.sh
# Phase-2 agent: the fine-tuned adapter (models/phase2_lora) over base Qwen3-14B, served as model "phase2".
# ADAPTER= mounts the adapter into the container; the base Qwen3-14B (~28 GB) auto-downloads on first start
# (optional pre-fetch: huggingface-cli download Qwen/Qwen3-14B).
ADAPTER="$PWD/models/phase2_lora" tools/vllm_server.sh start
export OPENAI_API_KEY="<your-openai-api-key>" # Phase-3 verification judge (GPT-5) — required
Agent backend — two options, both serve the same :8000 endpoint (the pipeline is unchanged):
tools/vllm_server.sh start— recommended (vLLMv0.8.5.post1, needs NVIDIA driver ≥ 550 / CUDA 12.4). Serve base + adapter withADAPTER="$PWD/models/phase2_lora"(mounts it, serves asphase2). Force offline withHF_OFFLINE=1. (A merged 16-bit checkpoint is optional and regenerable from the adapter; not shipped.)tools/hf_server.sh start— no-vLLM fallback (transformers + PEFT; runs without the driver requirement, but much slower — it shards the 14B across GPUs). Serves base Qwen3-14B +models/phase2_lora.
No Docker for the analysis stages? tools/install_host.sh installs the same pinned toolchain — see
Run Without Docker. Verify anything with tools/check_env.sh --full.
Run the Figure 10 example:
git clone https://github.com/django/django repos/django
docker run --rm --network host -e OPENAI_API_KEY -e VLLM_BASE_URL=http://localhost:8000/v1 \
-v "$PWD/examples:/cases" -v "$PWD/repos/django:/repos/django:ro" \
patchaudit-analysis:latest /cases/case_CVE-2021-31542 all --stop-at-first-yes
Expected result (matches the paper's Figure 10):
- Phase 2 slicing scores the 24 code-touching commits between
C1andC2. - Only
C2(b5569996) intersectsC1's slice — cross-file, spanning thevalidate_file_namedefinition indjango/core/files/utils.pyand its call site indjango/db/models/fields/files.py. Every other commit has an empty intersection and is filtered out before any LLM call. - The agent returns YES and the GPT-5 judge agrees → final label future-commit (
C1is a bad patch). - This is the paper's Figure 10:
C2is the future commit andC1is a bad patch.
23 between-commits shared=0 -> filtered by Phase 2 slicing (no agent call)
b5569996 (C2) shared>0 agent=YES judge=AGREE -> future-commit
Exact shared/core counts shift with tool versions and CPG scope; the stable signals are that only C2
intersects and the verdict is YES → future-commit (C1 is a bad patch). The secondary patch-type label
(incomplete/incorrect) can vary between runs and models — the paper's ground truth for this CVE is
incorrect (C1 over-restricted validate_file_name; C2 relaxed it while keeping the traversal closed).
Per-commit decisions and the judge trace are in
examples/case_CVE-2021-31542/result/phase23_loop.*.jsonl; the reference to diff against is
examples/case_CVE-2021-31542/expected/scan_summary.jsonl.
Assessing Reusability
We apply the tool to CVE-2025-62193 (NOAA-PMEL/LAS, Java), a CVE that was never part of the paper. We
reproduce, from scratch, the manual analysis a security engineer would do. Then we check the tool against it.
- Not in the study.
CVE-2025-62193was disclosed in January 2026, after the study was frozen. It is in neitherdata/benchmark_candidate.jsonnor any paper table. This is genuinely new input. - Manual step 1 — the initial patch. The initial patch is
C1 = e69afb18(2025-09-24). It adds a reject check for PyFerret expressions inRequestInputFilter.java. - Manual step 2 — the future commit(s). Only one later commit touches that file:
C2 = de5f9237, 19 minutes later.C1placed the check beforelasRequestwas parsed, sogetPropertyreturned empty and the guard never fired.C2moves the check after parsing, so it fires.C1is therefore a bad patch (N = 1future commit). - Tool vs. manual. PatchAudit should reach the same conclusion:
C2is the future commit;C1is a bad patch.
tools/vllm_server.sh start; export OPENAI_API_KEY="<key>"
git clone https://github.com/NOAA-PMEL/LAS repos/LAS
docker run --rm --network host -e OPENAI_API_KEY -e VLLM_BASE_URL=http://localhost:8000/v1 \
-v "$PWD/examples:/cases" -v "$PWD/repos/LAS:/repos/LAS:ro" \
patchaudit-analysis:latest /cases/case_CVE-2025-62193 all
Expected result:
- Of the 3 commits after
C1, the two README-only commits are dropped at extraction (no code files). C2(de5f9237) intersectsC1on the moved block:core=5, acrossRequestInputFilter.javaand the JDOM request classes.- The agent returns YES. The judge agrees. The final label is future-commit / high.
- This matches the manual finding:
C2is the future commit;C1is a bad patch. - The base model's secondary label may print
incompleteorincorrectbetween runs. The stable result is the primary decision (future commit).
case.json sets "snapshot_paths": ["JavaSource"] to scope the CPG to the Java source tree (7 MB / 491 files)
instead of the 535 MB repo. This is valid because C1 and C2 live in one module.
Adapt to any CVE
The input is a CVE's initial patch: c1 + the repository (repo_url / repo_path) + cve_description.
Set later_commits: "auto" and PatchAudit runs end to end — it discovers the candidate future commits
(commits after C1 that touch C1's own non-test code files, chronological, capped by max_candidates),
slices and judges each, and with --stop-at-first-yes stops at the first confirmed future commit = C2.
No c2 is provided — it is what the tool finds. (Add a c2 with later_commits: "c2" or "between" only to
pin a known target; the shipped examples do this so their expected output is deterministic.)
Create a new examples/case_<CVE>/case.json (end-to-end form — no c2):
{
"cve": "CVE-YYYY-NNNNN", "cwe": "CWE-...",
"owner": "org", "repo": "name",
"repo_url": "https://github.com/org/name",
"repo_path": "/repos/name",
"language": "python | java | c",
"c1": "<initial patch commit — the CVE's fix under audit>",
"later_commits": "auto",
"max_candidates": 60,
"snapshot_paths": ["<optional subtree>"],
"cve_description": "<NVD description>"
}
Run it end to end (given only C1, the tool finds C2):
tools/run_case.sh <case_dir> all --stop-at-first-yes.
later_commits:"auto"(end-to-end — discoverC2among commits afterC1that touchC1's own non-test code files, chronological, capped bymax_candidates(default 60); noc2needed);"c2"scores only a pinnedC1→C2pair;"between"scores theC1→C2window (ancestors ofC2afterC1's date — robust across divergent branches);"all"scans every later commit ofC1. Add--stop-at-first-yesto stop the scan at the first confirmed future commit.- Run one stage with
tools/run_case.sh <case_dir> <stage>(extract | slice | scope | static | verdict | loop | analyze | all). run_case.shreads these env vars and passes them to the agent/judge loop (so-e VAR=...ondocker runworks):AGENT_MODEL(defaultphase2),VLLM_BASE_URL,JUDGE_MODEL(defaultgpt-5). Explicit CLI args after the stage still override them.- Phase-3 verification is mandatory and uses the independent GPT-5 judge (
OPENAI_API_KEYrequired); the agent is never accepted without it. - Serve the Phase-1 adapter too by adding it to the vLLM launch:
EXTRA_ARGS="--enable-lora --lora-modules phase1=/lora/phase1 phase2=/lora/phase2"(mount both dirs). - Evaluate on the bundled benchmark:
data/benchmark_565.jsonl(565 labeled(C1, C2)pairs, 110 CVEs) — run each pair throughtools/run_case.sh <case> loopand compare the decision toground_truth.
Run Without Docker
After tools/install_host.sh + source ~/.patchaudit/env.sh, run the full pipeline directly (repo cloned at
./repos/django, case.json repo_path pointing at it):
tools/vllm_server.sh start; export OPENAI_API_KEY=sk-...
tools/run_case.sh examples/case_CVE-2021-31542 all --stop-at-first-yes
run_case.sh reads JOERN, CODEQL, SEMGREP, JAVA_HOME, VLLM_BASE_URL, JUDGE_MODEL (default
gpt-5), MAXDEPTH, OPENAI_API_KEY from the environment (all set by env.sh except the API key).
Rootless Docker + NVIDIA CDI
Only if you set Docker up yourself on a shared host without root — rootless Docker with the CDI device is the
working combination (driver ≥ 550, nvidia-ctk present):
dockerd-rootless-setuptool.sh install # once; needs the system docker-ce + rootless extras
export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock
nvidia-ctk cdi list | grep nvidia.com/gpu # CDI device must resolve
docker run --rm --device nvidia.com/gpu=all ubuntu nvidia-smi # sanity check
Put any classic-runtime static docker binaries behind the system ones on PATH, or user-namespace
creation is denied under an AppArmor-restricted kernel.
Expected Output Schema
For each scored later commit, result/prompts_v3.jsonl contains the Phase-2 prompt and:
later_commit— the candidate commit hash.intersection_stats—{shared_items_count, core_items_count, shared_files, base_slice_size, later_slice_size}.core= a changed line of one commit reached by the other's slice;shared= all reached lines in common.intersection_snippets— the Intent Scope, core lines first, each taggedfile:line dN function(dN= N function boundaries from the changed line).
For each scored later commit, result/phase23_loop.*.jsonl contains:
final.label—future-commit/not-future-commit;final.confidence;final.status(accepted/unresolved).rounds[]— per round: the agentdecision/patch_type(incomplete | incorrect | n/a), the judgeAGREE | DISAGREE+grounding(n_grounded/n_checked), and the judge audit trace.final.patch_type— for a confirmed bad patch,incomplete | incorrect(from the report turn).final.report— the paper's Output, from one more turn after the judge accepts (present only whenfinal.label = future-commit):justification(whyCisharesC1's patching intent),issue(the deficiency inC1), andcause(its root cause).static_vote— the advisory Phase 3.1 verdict for the pair (positive | negative | inconclusive).
static/static_verdict.<cfg>.json records the patch-local three-valued static verdict and the per-analyzer
findings inside the Intent Scope. This file is shipped for the example cases, so the all/analyze flow
reuses it and skips the multi-minute CodeQL/Semgrep scan ("using existing static verdict"); pass
FORCE_STATIC=1 to re-run the analyzers from scratch (codeql_db/ is never shipped).
Troubleshooting
codeql pack ... cannot be found→codeql pack download codeql/{python,java,cpp}-queries(the image ships all three;tools/check_env.shflags any missing).semgrep: not foundin a stage → put the Semgrep venv/bin first onPATH, or setSEMGREP=/abs/path.- CodeQL Java DB fails fast → it needs
--build-mode=none(already set) and a JDK 21. - vLLM container exits at load → GPU memory / driver; check
docker logs patchaudit-vllmand the driver row in the setup table under Assessing Functionality. - agent answer comes back
UNKNOWN→ the chain-of-thought hit the token cap; the loop issues a forced-verdict follow-up automatically, or raise--max-tokens. git ... exit 128/ "dubious ownership" on a mounted repo → the container runs as root and the host repo is owned by your user;run_case.shsetsgit safe.directory '*'automatically, so this is handled — if you invoke a stage script directly, add-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0='*'.- Outputs written into the mounted case dir (
snapshots/,result/,static/, …) are owned by root (the container's user). To clean them from the host:sudo rm -rf, or run the container with--user "$(id -u):$(id -g)"(needs a writable HF cache/case dir for that uid).
Notes For Reviewers
- Static analysis is advisory. It is patch-local and three-valued; when the analyzers are blind to a vulnerability class they return INCONCLUSIVE and abstain. It never vetoes the agent/judge.
- Whole-repo CPGs are the cost driver. For a very large repository, set
snapshot_pathsto the module containingC1/C2(as the LAS example does), or the Joern stage can be slow. - The judge is bounded. It audits the agent's grounding and does not re-analyse the commits; it may flag ungrounded sub-claims while still agreeing with a correct decision.
- Driver / GPU. The bundled vLLM image is
v0.8.5.post1(CUDA 12.4, needs driver ≥ 550). On a newer driver you may set a newerVLLM_IMAGE. Qwen3-14B bf16 needs ~2×24 GB (tensor-parallel 2). - Determinism. Slicing, Intent Scope, and static analysis are deterministic. The agent runs at
temperature 0 but Qwen3's chain-of-thought length can vary; the loop compensates with a forced-verdict
follow-up when a response is truncated before its
DECISIONline. - Reproducibility of the examples. Line numbers and exact slice sizes can shift slightly with tool
versions; the
coreintersection and the final decision are the stable signals to check.
- Downloads last month
- 64