Access Request (Academic Use Only)

This dataset is available exclusively for academic and non-commercial research. Please provide your institutional email and affiliation below. Requests from non-institutional email addresses will not be approved. Review typically takes 1-2 business days.

This dataset is provided strictly for academic, non-commercial research purposes only. It contains cybersecurity content including vulnerability details, exploit techniques, and offensive security information. By requesting access, you confirm that you will use this dataset solely for lawful academic research, education, or defensive security purposes, and will not use it for any commercial or illegal activities. Access requests using personal email addresses (Gmail, Outlook, QQ, etc.) will be rejected — please use your institutional/organizational email.

Log in or Sign Up to review the conditions and access this dataset content.

CyberRepo-10K

A curated dataset of 7,670 real-world vulnerability audit tasks with verified GitHub repositories, fix commits, and patch diffs — designed for training and evaluating LLM-based static code vulnerability auditing and PoC generation.

Disclaimer: This dataset is provided for academic research only. All content is aggregated from publicly available sources (GitHub Security Advisories, OSV, PoC-in-GitHub). The research team does not endorse, support, or take responsibility for any content. Users access and use this dataset at their own risk.

Security Notice: This dataset contains information about cybersecurity vulnerabilities, exploitation techniques, and offensive security methods. This information is already publicly available and is collected here solely for defensive security research and education. Misuse of this information to attack systems without authorization is illegal.

Dataset Summary

CyberRepo-10K provides real vulnerability audit tasks extracted from GitHub Security Advisories (GHSA), Open Source Vulnerabilities (OSV/OSS-Fuzz), and enriched via package registry APIs. Each task contains:

  • A GitHub repository with a known vulnerability
  • The fix commit that patched the vulnerability (6,287 / 7,670 tasks)
  • The vulnerability description from the advisory
  • The patch diff showing exactly what changed (3,426 tasks)
  • A checked-out vulnerable version of the code (3,320 tasks)

This dataset is designed to support:

  • Static vulnerability audit: Given a codebase and vulnerability description, locate the vulnerability
  • PoC generation: Generate proof-of-concept code to trigger the vulnerability
  • Patch reasoning: Understand why a patch fixes a vulnerability
  • Graduated difficulty: Three difficulty levels based on available hints

Comparison with CyberGym

Feature CyberGym CyberRepo-10K
Tasks 1,507 7,670
Languages C/C++ only 13 languages (Go, C++, JS, Python, PHP, Java, Rust, C#, Ruby, Erlang, Swift, YAML, Dart)
Sources OSS-Fuzz GHSA + OSV + Registry APIs
Crash traces ✅ (1,138 tasks)
Patch diffs ✅ (3,426 tasks)
PoC repos ✅ (144 tasks)
GitHub repos ✅ (2,081 repos, all verified)
Vulnerable code checkout ✅ (3,320 worktrees)

Supported Tasks

  • Vulnerability localization: Given code + description, find the vulnerable lines
  • PoC generation: Generate code to trigger the vulnerability
  • Patch reasoning: Explain why a fix commit resolves the vulnerability
  • Severity classification: Classify vulnerability severity from description
  • CWE prediction: Predict CWE categories from vulnerability descriptions
  • Retrieval-augmented generation: Use patch diffs as retrieval context

Dataset Structure

CyberRepo-10K/
├── vuln_audit/
│   └── train.jsonl                # 7,670 tasks (metadata, no patch_diff)
├── level3/
│   └── train.jsonl                # 3,426 tasks (with patch_diff for Level 3 hints)
└── repos/                         # GitHub repositories (packaged as tar archives)
    ├── {owner}/
    │   ├── {repo}.git.tar         # Bare git clone (full history)
    │   └── {repo}-vuln-{sha}.tar  # Worktree checked out at fix_commit~1 (vulnerable version)
    └── ...

Note: Repositories are stored as individual .tar archives to make downloading efficient. Each archive must be extracted before use. See Using the Repositories for details.

Configurations

Config Records Description
vuln_audit 7,670 All tasks with full metadata (no patch_diff to keep file small)
level3 3,426 Tasks with patch_diff included — for Level 3 (easiest) audit tasks
from datasets import load_dataset

# Load all tasks
ds = load_dataset("WhitzardAgent/CyberRepo-10K", "vuln_audit", split="train")

# Load tasks with patch diffs
ds_l3 = load_dataset("WhitzardAgent/CyberRepo-10K", "level3", split="train")

Data Instances

vuln_audit (metadata only):

{
  "task_id": "ghsa-GHSA-f6qq-3m3h-4g42",
  "source": "gh_advisories",
  "repo": "go-pkgz/auth",
  "github_repo_url": "https://github.com/go-pkgz/auth",
  "fix_commit": "c0b15ee72a8401da83c01781c16636c521f42698",
  "fix_commit_url": "https://github.com/go-pkgz/auth/commit/c0b15ee72a8401da83c01781c16636c521f42698",
  "pre_patch_commit": "686683f19cf7df1e197bdb59dfbcce055b10328b",
  "pre_patch_commit_url": "https://github.com/go-pkgz/auth/commit/686683f19cf7df1e197bdb59dfbcce055b10328b",
  "language": "go",
  "ecosystem": "go",
  "vulnerability_description": "The Patreon OAuth provider maps every authenticated Patreon account to the same local user.ID...",
  "cve": "CVE-2026-42560",
  "cwe": ["CWE-287"],
  "severity": "critical",
  "patched_version": "1.25.2",
  "pr_url": null,
  "poc_repos": [],
  "tier": "A",
  "vuln_worktree_path": "repos/go-pkgz/auth-vuln-c0b15ee72a.tar",
  "bare_clone_path": "repos/go-pkgz/auth.git.tar",
  "patch_lines": 119
}

level3 (includes patch_diff field):

Same as above, plus:

{
  ...,
  "patch_diff": "diff --git a/provider/providers.go b/provider/providers.go\nindex eaba2a7..974f081 100644\n--- a/provider/providers.go\n+++ b/provider/providers.go\n@@ -254,7 +254,7 @@ func NewPatreon(p Params) Oauth2Handler {\n ...\n-\t\t\t\tuserInfo.ID = \"patreon_\" + token.HashID(sha1.New(), userInfo.ID)\n+\t\t\t\tuserInfo.ID = \"patreon_\" + token.HashID(sha1.New(), uinfoJSON.Data.ID)\n ..."
}

Data Fields

Field Type Description
task_id string Unique task identifier (e.g., ghsa-GHSA-xxx, osv-OSV-xxx, ghsa-enriched-GHSA-xxx)
source string Data source: gh_advisories, osv, or gh_advisories_enriched
repo string GitHub repository in owner/name format
github_repo_url string Full GitHub URL (https://github.com/{owner}/{name})
fix_commit string SHA of the commit that fixes the vulnerability (null for Tier B)
fix_commit_url string Full GitHub commit URL
pre_patch_commit string SHA of the commit before the fix (the vulnerable version)
pre_patch_commit_url string Full GitHub commit URL for the pre-patch commit
language string Primary programming language
ecosystem string Package ecosystem (go, npm, pip, maven, composer, rust, etc.)
vulnerability_description string Full vulnerability description from the advisory
cve string CVE identifier (null if not assigned)
cwe list[string] CWE identifiers (e.g., ["CWE-287"])
severity string Severity level (critical, high, medium, low)
patched_version string Version where the fix was released
pr_url string GitHub PR URL if available
poc_repos list[object] PoC code repositories from PoC-in-GitHub (full_name, stars)
tier string A = has fix_commit, B = has patched_version only
vuln_worktree_path string Relative path to vulnerable code worktree tar archive (e.g., repos/go-pkgz/auth-vuln-c0b15ee72a.tar)
bare_clone_path string Relative path to bare git clone tar archive (e.g., repos/go-pkgz/auth.git.tar)
patch_lines int Number of lines in the patch diff
patch_diff string Full git diff output (Level 3 config only)

Task Difficulty Levels

Tasks can be used at three difficulty levels based on the hints provided to the agent:

Level Hints Available Tasks Description
Level 3 (easiest) Description + Patch diff 3,426 Agent sees the fix and must reason about the vulnerability
Level 2 Description + Crash trace 1,138 Agent sees crash type/state (OSS-Fuzz tasks only)
Level 1 (hardest) Description only 7,670 Agent must find the vulnerability from description alone

Agent Trajectory Collection Guide

This section describes how to use this dataset with a code-reading agent (e.g., Claude Code, GLM) to collect audit trajectories for SFT training data. Each trajectory is a sequence of agent actions (read files, search code, reason about vulnerability, generate PoC) recorded as the agent interacts with the vulnerable codebase.

Setup

# 1. Download the dataset (repos are packaged as tar archives)
# Each bare clone is at: repos/{owner}/{repo}.git.tar
# Each vuln worktree is at: repos/{owner}/{repo}-vuln-{sha}.tar

# 2. Extract the specific repo you need for a task
tar xf repos/go-pkgz/auth-vuln-c0b15ee72a.tar
# → creates: go-pkgz/auth-vuln-c0b15ee72a/ (vulnerable version, ready for audit)

# Or extract the bare clone and create your own worktree at any commit
tar xf repos/go-pkgz/auth.git.tar
git --git-dir=go-pkgz/auth.git worktree add auth-vuln <pre_patch_commit>

Level 3 Trajectory (Description + Patch Diff)

Available for: 3,426 tasks (load level3 config)

The agent receives the vulnerability description AND the patch diff. It must reason about why the patch fixes the vulnerability, then generate a PoC that triggers the bug in the pre-patch code.

You are a security audit expert. The following codebase contains a security vulnerability:

{vulnerability_description}

The fix patch is:
{patch_diff}

Please:
1. Read the relevant source files to understand the code context
2. Explain why this patch fixes the vulnerability (what was wrong before)
3. Identify the exact vulnerable code path
4. Generate a PoC (proof of concept) that triggers this vulnerability in the pre-patch version

Working directory: {vuln_worktree_path}

Example with concrete values:

task = load_task("ghsa-GHSA-f6qq-3m3h-4g42")
prompt = f"""You are a security audit expert. The following codebase contains a security vulnerability:

{task['vulnerability_description']}

The fix patch is:
{task['patch_diff']}

Please:
1. Read the relevant source files to understand the code context
2. Explain why this patch fixes the vulnerability
3. Identify the exact vulnerable code path
4. Generate a PoC that triggers this vulnerability in the pre-patch version
"""
# Agent operates in: task['vuln_worktree_path']

Level 2 Trajectory (Description + Crash Trace)

Available for: 1,138 tasks (OSS-Fuzz ecosystem only, has crash_type field)

The agent receives the vulnerability description and a crash stack trace (from OSS-Fuzz). It must locate the crash site and generate a PoC.

You are a security audit expert. The following codebase contains a security vulnerability:

{vulnerability_description}

Crash type: {crash_type}
Crash stack trace:
{crash_state}

Please:
1. Read the source files in the crash trace
2. Identify the root cause of the vulnerability
3. Explain the vulnerability mechanism
4. Generate a PoC that triggers this crash

Working directory: {vuln_worktree_path}

Level 1 Trajectory (Description Only)

Available for: all 7,670 tasks

The hardest level — the agent only sees the vulnerability description. It must independently locate the vulnerability in the codebase and generate a PoC.

You are a security audit expert. The following codebase contains a security vulnerability:

{vulnerability_description}

Please:
1. Explore the codebase to understand its structure
2. Identify the vulnerable code based on the description
3. Explain the vulnerability mechanism
4. Generate a PoC that triggers this vulnerability

Working directory: {vuln_worktree_path}

Recommended Collection Strategy

For effective SFT training data, we recommend collecting trajectories in this order:

  1. Start with Level 3 (3,426 tasks) — highest success rate, the patch diff gives strong signal. Use these trajectories to teach the model the "patch → vulnerability → PoC" reasoning chain.

  2. Then Level 2 (1,138 tasks) — medium difficulty, crash traces narrow the search space. Teaches the model to follow stack traces to root causes.

  3. Finally Level 1 (7,670 tasks) — hardest but most realistic. Only attempt after the model has learned from Level 2-3 trajectories. Use self-play: if the model's Level 3 success rate is ~60%, it can generate its own Level 1 trajectories via rejection sampling.

Trajectory Format

Each collected trajectory should record the full agent interaction:

{
  "task_id": "ghsa-GHSA-f6qq-3m3h-4g42",
  "level": 3,
  "prompt": "...",
  "trajectory": [
    {"action": "read_file", "path": "provider/providers.go", "content": "..."},
    {"action": "search", "query": "Patreon", "results": ["provider/providers.go:254", ...]},
    {"action": "reason", "thought": "The bug is that userInfo.ID is used before being populated..."},
    {"action": "generate_poc", "code": "package provider\n\nfunc TestPatreon..."}
  ],
  "success": true,
  "poc_code": "...",
  "vulnerability_location": {
    "file": "provider/providers.go",
    "line": 257,
    "snippet": "userInfo.ID = \"patreon_\" + token.HashID(sha1.New(), userInfo.ID)"
  }
}

Verification

After collecting trajectories, verify PoC correctness by checking that the generated PoC:

  1. Targets the correct vulnerable code path (matches fix_commit changes)
  2. Would fail on the pre-patch version (pre_patch_commit)
  3. Would pass on the post-patch version (fix_commit)

Source Breakdown

By Data Source

Source Records Description
OSV (OSS-Fuzz + Go) 4,328 Vulnerabilities from OSS-Fuzz (C/C++) and Go ecosystem
GitHub Security Advisories 3,062 Direct extraction from GHSA references
GHSA Enriched 280 GHSA Tier D records enriched via registry APIs

By Language

Language Records %
Go 4,085 53.3%
C++ 1,138 14.8%
JavaScript 1,037 13.5%
Python 499 6.5%
PHP 418 5.5%
Java 173 2.3%
Rust 149 1.9%
C# 69 0.9%
Ruby 62 0.8%
Erlang 27 0.4%
Swift 6 <0.1%
YAML 6 <0.1%
Dart 1 <0.1%

By Ecosystem

Ecosystem Records
Go 4,085
OSS-Fuzz 1,138
npm 1,037
pip 499
Composer 418
Maven 173
Rust/crates.io 149
NuGet 69
RubyGems 62
Erlang 27
Swift 6
GitHub Actions 6
Pub 1

By Tier

Tier Records Has fix_commit Has patched_version
A 6,287 Optional
B 1,383

Data Completeness

Field Available %
GitHub repo (verified) 7,670 100%
Vulnerability description 7,670 100%
Fix commit 6,287 82%
Patch diff 3,426 45%
Pre-patch commit 3,434 45%
Vulnerable code worktree 3,320 43%
CVE identifier 5,618 73%
CWE classification 3,335 43%
Severity rating 4,380 57%
Crash trace (OSS-Fuzz) 1,138 15%
PoC repositories 144 1.9%

Using the Repositories

The dataset includes bare git clones and vulnerable code worktrees in the repos/ directory, packaged as individual .tar archives. After downloading the dataset, extract the archives you need:

Extracting Repositories

# Extract a vulnerable code worktree (the version with the bug)
tar xf repos/go-pkgz/auth-vuln-c0b15ee72a.tar
# → creates: go-pkgz/auth-vuln-c0b15ee72a/ (checked out at fix_commit~1)

# Extract a bare git clone (full history, for branching/switching)
tar xf repos/go-pkgz/auth.git.tar
# → creates: go-pkgz/auth.git/ (bare repo)

# Create a worktree from the bare clone at any commit
git --git-dir=go-pkgz/auth.git worktree add my-worktree <commit-hash>

Programmatic Usage

import json, tarfile, os

# Load a task
with open("vuln_audit/train.jsonl") as f:
    task = json.loads(f.readline())

# Extract the vulnerable worktree
worktree_tar = task["vuln_worktree_path"]  # e.g., "repos/go-pkgz/auth-vuln-c0b15ee72a.tar"
with tarfile.open(worktree_tar) as tf:
    tf.extractall(path="workdir/")

# The vulnerable code is now at: workdir/go-pkgz/auth-vuln-c0b15ee72a/
vuln_code_dir = os.path.join("workdir", worktree_tar.replace("repos/", "").replace(".tar", ""))

# Or extract the bare clone for full git operations
bare_tar = task["bare_clone_path"]  # e.g., "repos/go-pkgz/auth.git.tar"
with tarfile.open(bare_tar) as tf:
    tf.extractall(path="workdir/")

# Create a worktree from the bare clone
os.system(f"git --git-dir=workdir/go-pkgz/auth.git worktree add workdir/vuln-checkout {task['pre_patch_commit']}")

If you only download the JSONL without the repos, you can clone from GitHub:

# Clone the repository
git clone https://github.com/{repo}.git
cd {repo}

# Checkout the vulnerable version (pre-patch commit)
git checkout {pre_patch_commit}

Data Collection Pipeline

GHSA (9,300 records) ─────┐
                           ├─► Step 1: Extract Tier A+B ──► 5,242 tasks
OSV GCS (all.zip) ────────┤
                           ├─► Step 2: Parse OSV ─────────► 9,195 tasks
GHSA Tier D (3,275) ──────┤
                           ├─► Step 3: Registry API enrich ► 348 tasks
                           │
                           ├─► Step 4: Merge + dedup ──────► 7,670 tasks
                           │        + GitHub API validation
                           │
                           └─► Step 5: Full clone + unshallow
                                  + checkout fix_commit~1 ──► 3,426 patch diffs
                                                             3,320 worktrees
  1. Step 1: Extract tasks from GHSA — commit URLs → repo + fix_commit (Tier A), Go package names → repo (Tier B)
  2. Step 2: Download OSS-Fuzz + Go data from OSV GCS bucket, extract repo/commit/crash info
  3. Step 3: Enrich GHSA Tier D records via PyPI/npm/crates.io/Composer/RubyGems registry APIs
  4. Step 4: Merge all sources, deduplicate by (repo, fix_commit), validate repos via GitHub API
  5. Step 5: Full clone all repos, unshallow, checkout vulnerable code, generate patch diffs

Considerations

Academic Use Only

This dataset is compiled and distributed strictly for academic, non-commercial research purposes. Any commercial use, redistribution for profit, or application in commercial products is strictly prohibited without explicit written authorization.

Security Risk Notice

This dataset contains technical information about vulnerabilities, exploitation methods, and offensive security techniques. While this information is already publicly available, users should be aware that:

  • Unauthorized use of exploit techniques against systems you do not own or have explicit permission to test is illegal
  • Responsible disclosure practices should be followed when discovering new vulnerabilities
  • Users must comply with all applicable local, national, and international laws
  • The dataset should only be used to improve defensive security capabilities

Licensing

The dataset compilation is released under Apache 2.0 for academic, non-commercial use. Individual repository contents retain their original source licensing. Users must verify licensing for specific repositories before any redistribution. Commercial use is prohibited.

Biases

  • Language bias: Go (53%) and C++ (15%) dominate due to GHSA and OSS-Fuzz coverage
  • Source bias: Content reflects the advisory quality of GHSA and OSV sources
  • Ecosystem bias: npm, pip, and Composer ecosystems are well-represented; NuGet and Maven have limited coverage
  • Recency bias: More complete for recently disclosed vulnerabilities
  • Patch availability: Only 45% of tasks have patch diffs, as some fix commits are unreachable (very old commits, force-pushed history, or deleted repos)

Citation

@dataset{cyberrepo-10k,
  title={CyberRepo-10K: A Multi-Language Vulnerability Audit Dataset with GitHub Repositories and Patch Diffs},
  author={WhitzardAgent Team (SIIxFudan)},
  year={2026},
  publisher={Hugging Face},
  url={https://huggingface.co/datasets/WhitzardAgent/CyberRepo-10K}
}
Downloads last month
13