Dataset Viewer
Auto-converted to Parquet Duplicate
static_analyzer
stringclasses
2 values
cve_id
stringlengths
13
16
dataset
stringclasses
5 values
environment_id
stringlengths
16
67
group
stringclasses
5 values
language
stringclasses
5 values
project_id
stringlengths
9
54
task_id
stringlengths
9
30
task_path
stringlengths
22
73
task_prompt
stringlengths
4.92k
22.9k
patch
stringlengths
318
241k
before_context
stringlengths
220
2.06M
after_context
stringlengths
113
2.08M
task_metadata_json
stringlengths
765
8.94k
checker_template
stringclasses
1 value
codeql
CVE-2022-4741
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-02cb4e0a6c5aaabd6a78
CodeQL go
go
morefixes__sajari__docconv
morefixes-02cb4e0a6c5aaabd6a78
codeql_go_benchmark_top30_v1/tasks/morefixes-02cb4e0a6c5aaabd6a78
# Go CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Go context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session, but no...
diff --git a/docx.go b/docx.go index 0b3c2e6..f9f276a 100644 --- a/docx.go +++ b/docx.go @@ -40,7 +40,7 @@ func ConvertDocx(r io.Reader) (string, map[string]string, error) { size = si.Size() ra = f } else { - b, err := ioutil.ReadAll(r) + b, err := ioutil.ReadAll(io.LimitReader(r, maxBytes)) if err != nil ...
# Patch-overlapping Go context before the fix ## `docx.go` (changed lines (43, 44)) ```go package docconv import ( "archive/zip" "bytes" "encoding/xml" "fmt" "io" "io/ioutil" "os" "time" ) type typeOverride struct { XMLName xml.Name `xml:"Override"` ContentType string `xml:"ContentType,attr"` PartN...
# Patch-overlapping Go context after the fix ## `docx.go` (changed lines (43,)) ```go package docconv import ( "archive/zip" "bytes" "encoding/xml" "fmt" "io" "io/ioutil" "os" "time" ) type typeOverride struct { XMLName xml.Name `xml:"Override"` ContentType string `xml:"ContentType,attr"` PartName ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "morefixes-02cb4e0a6c5aaabd6a78", "dataset_id": "morefixes", "dataset_item_id": "morefixes-02cb4e0a6c5aaabd6a78", "project_id": "morefixes__sajari__docconv", "language": "go", "backend": "codeql" }, "changed_go_files": [ "...
null
codeql
CVE-2025-47281
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-08d699b1f7c72c366406
CodeQL go
go
morefixes__kyverno__kyverno
morefixes-08d699b1f7c72c366406
codeql_go_benchmark_top30_v1/tasks/morefixes-08d699b1f7c72c366406
# Go CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Go context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session, but no...
diff --git a/pkg/engine/wildcards/wildcards.go b/pkg/engine/wildcards/wildcards.go index 730d82529..a21ad08f9 100644 --- a/pkg/engine/wildcards/wildcards.go +++ b/pkg/engine/wildcards/wildcards.go @@ -135,7 +135,16 @@ func getValueAsStringMap(key string, data interface{}) (string, map[string]strin } for k, v := r...
# Patch-overlapping Go context before the fix ## `pkg/engine/wildcards/wildcards.go` (changed lines (138, 139)) ```go package wildcards import ( "strings" "github.com/kyverno/kyverno/ext/wildcard" "github.com/kyverno/kyverno/pkg/engine/anchor" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ReplaceInSelecto...
# Patch-overlapping Go context after the fix ## `pkg/engine/wildcards/wildcards.go` (changed lines (138, 139, 140, 141, 142, 143, 144, 145, 146, 147)) ```go package wildcards import ( "strings" "github.com/kyverno/kyverno/ext/wildcard" "github.com/kyverno/kyverno/pkg/engine/anchor" metav1 "k8s.io/apimachinery/p...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "morefixes-08d699b1f7c72c366406", "dataset_id": "morefixes", "dataset_item_id": "morefixes-08d699b1f7c72c366406", "project_id": "morefixes__kyverno__kyverno", "language": "go", "backend": "codeql" }, "changed_go_files": [ ...
null
codeql
CVE-2020-29243
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-096cbfbd1d27f9ce86fb
CodeQL go
go
morefixes__dhowden__tag
morefixes-096cbfbd1d27f9ce86fb
codeql_go_benchmark_top30_v1/tasks/morefixes-096cbfbd1d27f9ce86fb
# Go CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Go context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session, but no...
diff --git a/mp4.go b/mp4.go index bc0286b..6523397 100644 --- a/mp4.go +++ b/mp4.go @@ -149,8 +149,8 @@ func (m metadataMP4) readAtomData(r io.ReadSeeker, name string, size uint32, pro // "data" + size (4 bytes each) b = b[8:] - if len(b) < 3 { - return fmt.Errorf("invalid encoding: expected at least %d byt...
# Patch-overlapping Go context before the fix ## `mp4.go` (changed lines (152, 153, 154)) ```go // Copyright 2015, David Howden // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package tag import ( "bytes" "encoding/binary" "errors" "fmt" "io" "strconv" ...
# Patch-overlapping Go context after the fix ## `mp4.go` (changed lines (152, 153)) ```go // Copyright 2015, David Howden // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package tag import ( "bytes" "encoding/binary" "errors" "fmt" "io" "strconv" "strin...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "morefixes-096cbfbd1d27f9ce86fb", "dataset_id": "morefixes", "dataset_item_id": "morefixes-096cbfbd1d27f9ce86fb", "project_id": "morefixes__dhowden__tag", "language": "go", "backend": "codeql" }, "changed_go_files": [ "mp4...
null
codeql
CVE-2023-34236
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-0adb0a489b07a50d6b2f
CodeQL go
go
morefixes__weaveworks__tf-controller
morefixes-0adb0a489b07a50d6b2f
codeql_go_benchmark_top30_v1/tasks/morefixes-0adb0a489b07a50d6b2f
# Go CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Go context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session, but no...
diff --git a/runner/server.go b/runner/server.go index 5a5db655..676ef756 100644 --- a/runner/server.go +++ b/runner/server.go @@ -170,6 +170,18 @@ func (r *TerraformRunnerServer) ProcessCliConfig(ctx context.Context, req *Proce return &ProcessCliConfigReply{FilePath: tfrcFilepath}, nil } +// initLogger sets up th...
# Patch-overlapping Go context before the fix ## `runner/server.go` (changed lines (173, 194, 195, 196, 197, 198, 199, 200, 201, 202)) ```go package runner import ( "bytes" "context" "errors" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "strings" securejoin "github.com/cyphar/filepath-securejoin" "gi...
# Patch-overlapping Go context after the fix ## `runner/server.go` (changed lines (173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 206, 207)) ```go package runner import ( "bytes" "context" "errors" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "strings" securejoin "github.com/cyphar/filepa...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "morefixes-0adb0a489b07a50d6b2f", "dataset_id": "morefixes", "dataset_item_id": "morefixes-0adb0a489b07a50d6b2f", "project_id": "morefixes__weaveworks__tf-controller", "language": "go", "backend": "codeql" }, "changed_go_files...
null
codeql
CVE-2022-41939
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-110ab7950a2c0b2c6f28
CodeQL go
go
morefixes__knative__func
morefixes-110ab7950a2c0b2c6f28
codeql_go_benchmark_top30_v1/tasks/morefixes-110ab7950a2c0b2c6f28
"# Go CodeQL detector synthesis\n\nYou are cc operating in `/work`. Starting only from the supplied (...TRUNCATED)
"diff --git a/cmd/root.go b/cmd/root.go\nindex 8fefcb37..b062eba2 100644\n--- a/cmd/root.go\n+++ b/c(...TRUNCATED)
"# Patch-overlapping Go context before the fix\n\n## `cmd/root.go` (changed lines (12, 364, 365))\n\(...TRUNCATED)
"# Patch-overlapping Go context after the fix\n\n## `cmd/root.go` (changed lines (12, 365, 366, 367,(...TRUNCATED)
"{\n \"schema_version\": \"synthesis-task-v1\",\n \"task\": {\n \"pair_id\": \"morefixes-110ab7(...TRUNCATED)
null
codeql
CVE-2023-27582
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-1218ce956f8120d59555
CodeQL go
go
morefixes__foxcpp__maddy
morefixes-1218ce956f8120d59555
codeql_go_benchmark_top30_v1/tasks/morefixes-1218ce956f8120d59555
"# Go CodeQL detector synthesis\n\nYou are cc operating in `/work`. Starting only from the supplied (...TRUNCATED)
"diff --git a/internal/auth/sasl.go b/internal/auth/sasl.go\nindex 06417ce..2103ab7 100644\n--- a/in(...TRUNCATED)
"# Patch-overlapping Go context before the fix\n\n## `internal/auth/sasl.go` (changed lines (84,))\n(...TRUNCATED)
"# Patch-overlapping Go context after the fix\n\n## `internal/auth/sasl.go` (changed lines (84, 85, (...TRUNCATED)
"{\n \"schema_version\": \"synthesis-task-v1\",\n \"task\": {\n \"pair_id\": \"morefixes-1218ce(...TRUNCATED)
null
codeql
CVE-2024-39315
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-14446e68cdc53bc98807
CodeQL go
go
morefixes__pomerium__pomerium
morefixes-14446e68cdc53bc98807
codeql_go_benchmark_top30_v1/tasks/morefixes-14446e68cdc53bc98807
"# Go CodeQL detector synthesis\n\nYou are cc operating in `/work`. Starting only from the supplied (...TRUNCATED)
"diff --git a/internal/handlers/userinfo.go b/internal/handlers/userinfo.go\nindex c430d4f85..fa30e5(...TRUNCATED)
"# Patch-overlapping Go context before the fix\n\n## `internal/handlers/userinfo.go` (changed lines (...TRUNCATED)
"# Patch-overlapping Go context after the fix\n\n## `internal/handlers/userinfo.go` (changed lines ((...TRUNCATED)
"{\n \"schema_version\": \"synthesis-task-v1\",\n \"task\": {\n \"pair_id\": \"morefixes-14446e(...TRUNCATED)
null
codeql
CVE-2022-2582
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-1d20aba9f4be2de73db5
CodeQL go
go
morefixes__aws__aws-sdk-go
morefixes-1d20aba9f4be2de73db5
codeql_go_benchmark_top30_v1/tasks/morefixes-1d20aba9f4be2de73db5
"# Go CodeQL detector synthesis\n\nYou are cc operating in `/work`. Starting only from the supplied (...TRUNCATED)
"diff --git a/internal/sync/singleflight/singleflight_test.go b/internal/sync/singleflight/singlefli(...TRUNCATED)
"# Patch-overlapping Go context before the fix\n\n## `internal/sync/singleflight/singleflight_test.g(...TRUNCATED)
"# Patch-overlapping Go context after the fix\n\n## `internal/sync/singleflight/singleflight_test.go(...TRUNCATED)
"{\n \"schema_version\": \"synthesis-task-v1\",\n \"task\": {\n \"pair_id\": \"morefixes-1d20ab(...TRUNCATED)
null
codeql
CVE-2025-66626
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-2331a664751876781460
CodeQL go
go
morefixes__argoproj__argo-workflows
morefixes-2331a664751876781460
codeql_go_benchmark_top30_v1/tasks/morefixes-2331a664751876781460
"# Go CodeQL detector synthesis\n\nYou are cc operating in `/work`. Starting only from the supplied (...TRUNCATED)
"diff --git a/workflow/executor/executor.go b/workflow/executor/executor.go\nindex 9cfaf5380..98a4ba(...TRUNCATED)
"# Patch-overlapping Go context before the fix\n\n## `workflow/executor/executor.go` (changed lines (...TRUNCATED)
"# Patch-overlapping Go context after the fix\n\n## `workflow/executor/executor.go` (changed lines ((...TRUNCATED)
"{\n \"schema_version\": \"synthesis-task-v1\",\n \"task\": {\n \"pair_id\": \"morefixes-2331a6(...TRUNCATED)
null
codeql
CVE-2019-12496
codeql_go_benchmark_top30_v1
codeql_go_benchmark_top30_v1/morefixes-2cc25dee5f2a118bcb26
CodeQL go
go
morefixes__hybridgroup__gobot
morefixes-2cc25dee5f2a118bcb26
codeql_go_benchmark_top30_v1/tasks/morefixes-2cc25dee5f2a118bcb26
"# Go CodeQL detector synthesis\n\nYou are cc operating in `/work`. Starting only from the supplied (...TRUNCATED)
"diff --git a/platforms/mqtt/mqtt_adaptor.go b/platforms/mqtt/mqtt_adaptor.go\nindex 78bc508e..b3df2(...TRUNCATED)
"# Patch-overlapping Go context before the fix\n\n## `platforms/mqtt/mqtt_adaptor.go` (changed lines(...TRUNCATED)
"# Patch-overlapping Go context after the fix\n\n## `platforms/mqtt/mqtt_adaptor.go` (changed lines (...TRUNCATED)
"{\n \"schema_version\": \"synthesis-task-v1\",\n \"task\": {\n \"pair_id\": \"morefixes-2cc25d(...TRUNCATED)
null
End of preview. Expand in Data Studio

CheckerBench Dataset

300 static-analysis tasks with complete runtime assets: 159 CSA tasks and 141 CodeQL tasks.

Backend / language Tasks
CSA (C/C++) 159
CodeQL Go 30
CodeQL Java 30
CodeQL JavaScript 30
CodeQL Python 51
Total 300

dataset/tasks.jsonl is the authoritative portable roster. tasks/ contains browsable task inputs. The assets/ directory provides complete task bundles, reference implementations, source snapshots, CodeQL databases, CSA build assets, refinement environments, and a frozen Docker image.

Load the task table

from datasets import load_dataset

tasks = load_dataset("Benchanything/checkerbench", split="test")
assert len(tasks) == 300

The single test split contains all 300 benchmark tasks; no training or validation split is provided. Each row includes the task ID, static analyzer (static_analyzer: csa or codeql), language, CVE and source-project identifiers, task prompt, patch, before/after context, and task configuration as JSON text. checker_template contains the CSA starter implementation and is null for CodeQL tasks. The original browsable inputs are also available under tasks/. task_path identifies the task inside its restored bundle, while environment_id identifies its runtime environment.

Download and restore

Requirements: Linux x86-64, Docker, Python 3.10+, and at least 100 GB of available disk space. Additional task workspaces require additional storage.

Download the complete distribution, including the datasets and frozen runtime image (approximately 13.3 GB of compressed assets):

pip install -U huggingface_hub
hf download Benchanything/checkerbench --repo-type dataset --local-dir checkerbench
cd checkerbench
python3 scripts/restore.py --assets assets --data runtime_data --load-image

For a private repository, authenticate with hf auth login using an account with access before downloading. Public downloads do not require authentication.

To download only dataset archives using a local copy of this repository's scripts:

python3 scripts/download.py --kind dataset --output assets

The downloader verifies every part against its SHA-256 checksum, and the restore script also verifies the complete compressed stream. Split archives are extracted or loaded directly without writing an extra combined copy. Verified downloads and completed restores can be reused.

Create a task workspace

The checkerbench-runtime:review-v1 image targets linux/amd64 and includes LLVM/Clang 18.1.8, CodeQL 2.26.4, language toolchains, and Python dependencies. Model-service credentials are supplied separately by the operator.

Start a container with stable paths:

mkdir -p work
docker run --rm -it --network none --entrypoint /bin/bash \
  -v "$PWD:/release:ro" -v "$PWD/runtime_data:/data:ro" \
  -v "$PWD/work:/work" checkerbench-runtime:review-v1

Prepare a CSA task:

python /release/scripts/prepare.py csa pair_134943 \
  --data-root /data --output /work/pair_134943
cd /work/pair_134943
# Write checker.cpp, then compile and scan.
bash compile.sh
CHECKER_NAME=YOUR_CHECKER_NAME bash scan/scan_before.sh
CHECKER_NAME=YOUR_CHECKER_NAME bash scan/scan_after.sh

Prepare a CodeQL task:

python /release/scripts/prepare.py codeql morefixes-32ed35a8bd8aba7b47ad \
  --language go --data-root /data --output /work/go-example
cd /work/go-example/tasks/morefixes-32ed35a8bd8aba7b47ad
# Edit query/vulnerability.ql, then compile and scan.
bash scripts/compile_query.sh
bash scripts/run_before.sh
bash scripts/run_after.sh

Only tasks in the fixed 300-task roster are accepted. Maintainers can add --reference to reproduce a bundled reference implementation. Keep the same container paths after preparing a workspace. CSA uses shared Git objects from the read-only dataset; CodeQL databases are copied into the task workspace.

Dataset contents

  • CSA: 159 tasks with source snapshots, captured build assets, reference implementations, and refinement environments. Shared runtime assets preserve restoration dependencies.
  • CodeQL: four task bundles containing 30 Go, 30 Java, 30 JavaScript, and 51 Python tasks, with their captured analysis databases.
  • scripts/prepare.py restores before/after scanning workspaces. The CSA bundle also includes scripts/rehydrate_benchmark_env.py for full refinement worktrees. Historical refinement assets contain absolute paths and symbolic links; see docs/environment.md for the restoration boundary.
  • References and evaluator assets are maintainer material. During evaluation, expose only a prepared single-task workspace and its required runtime assets to the evaluated agent.

Integrity and validation

release-manifest.json records archive and part sizes, SHA-256 checksums, and the image fingerprint. environment/versions.json records the toolchain versions; the exported image is the direct restoration entry point. reports/validation.json records the checks actually performed and their limits.

Third-party source and tools retain their own license files. This repository does not assign a new blanket license to all bundled third-party content.

Downloads last month
68