Datasets:
messages listlengths 3 223 |
|---|
[
{
"role": "system",
"content": "You are a senior security engineer. Give precise, practical answers grounded in established standards (CWE, CAPEC, MITRE ATT&CK, NVD)."
},
{
"role": "user",
"content": "Fix the security vulnerability in this TypeScript code and explain the change.\n\n```typescript... |
[
{
"role": "system",
"content": "You are an expert in application security and threat detection. Be accurate; never invent identifiers or facts."
},
{
"role": "user",
"content": "Fix the security vulnerability in this C/C++ function and explain the change.\n\n```c\nsrs_timestamp_check(srs_t *srs,... |
[
{
"role": "system",
"content": "You are a cybersecurity expert. Answer accurately and concisely. If you are not certain, say so instead of guessing."
},
{
"role": "user",
"content": "Explain what this Sigma rule detects, how it works, and likely false positives.\n\n```yaml\ntitle: Axios NPM Comp... |
[
{
"role": "system",
"content": "You are an expert in application security and threat detection. Be accurate; never invent identifiers or facts."
},
{
"role": "user",
"content": "Review this fortran code for security vulnerabilities and fix them.\n\n```fortran\n```fortran\nprogram main\n impli... |
[
{
"role": "system",
"content": "You are a defensive AppSec repair agent in the local CyberSecurity_OWASP OpenEnv environment. Use only the listed local tools. Do not target real systems. Work step by step: inspect policy and generated code, reproduce the authorization issue locally, submit a policy-tied dia... |
[
{
"role": "system",
"content": "You are an expert in application security and threat detection. Be accurate; never invent identifiers or facts."
},
{
"role": "user",
"content": "Why might conventional mitigation techniques fail when addressing Authentication Log Correlation Strategies in hybrid ... |
[
{
"role": "system",
"content": "You are a senior security engineer. Give precise, practical answers grounded in established standards (CWE, CAPEC, MITRE ATT&CK, NVD)."
},
{
"role": "user",
"content": "Review this Java function/code for security vulnerabilities. Name the weakness (CWE) if there i... |
[
{
"role": "system",
"content": "You are a senior security engineer. Give precise, practical answers grounded in established standards (CWE, CAPEC, MITRE ATT&CK, NVD)."
},
{
"role": "user",
"content": "Fix the security vulnerability in this JavaScript code and explain the change.\n\n```javascript... |
[
{
"role": "system",
"content": "You are a cybersecurity expert. Answer accurately and concisely. If you are not certain, say so instead of guessing."
},
{
"role": "user",
"content": "Review this JavaScript function/code for security vulnerabilities. Name the weakness (CWE) if there is one and ex... |
[
{
"role": "system",
"content": "You are an expert in application security and threat detection. Be accurate; never invent identifiers or facts."
},
{
"role": "user",
"content": "Analyze ATT&CK technique T0863 (User Execution) in the context of the enterprise security.\nTechnique: T0863 - User Ex... |
[
{
"role": "system",
"content": "You are an expert in application security and threat detection. Be accurate; never invent identifiers or facts."
},
{
"role": "user",
"content": "Explain how T0848 (Rogue Master) manifests in the enterprise and how it is addressed.\nTechnique: T0848 - Rogue Master... |
[
{
"role": "system",
"content": "You are a senior security engineer. Give precise, practical answers grounded in established standards (CWE, CAPEC, MITRE ATT&CK, NVD)."
},
{
"role": "user",
"content": "Could you please provide a YARA rule that detects a specific pattern in PE files, where the hex... |
[
{
"role": "system",
"content": "You are a vulnerability detection expert specializing in identifying security flaws in C/C++ code, with a focus on Common Weakness Enumeration (CWE) standards. You provide precise, evidence-based analysis without speculation, and clearly label any vulnerabilities you detect."... |
[
{
"role": "system",
"content": "You are an expert in application security and threat detection. Be accurate; never invent identifiers or facts."
},
{
"role": "user",
"content": "Review this C/C++ function for security vulnerabilities. Name the weakness (CWE) if there is one and explain it.\n\n``... |
[
{
"role": "system",
"content": "You are an expert in application security and threat detection. Be accurate; never invent identifiers or facts."
},
{
"role": "user",
"content": "What is CWE-622?"
},
{
"role": "assistant",
"content": "CWE-622: Improper Validation of Function Hook Argu... |
[
{
"role": "system",
"content": "You are OpenHands agent, a helpful AI assistant that can interact with a computer to solve tasks.\n\n<ROLE>\nYour primary role is to assist users by executing commands, modifying code, and solving technical problems effectively. You should be thorough, methodical, and priorit... |
[
{
"role": "system",
"content": "You are an expert in application security and threat detection. Be accurate; never invent identifiers or facts."
},
{
"role": "user",
"content": "How would you orchestrate cross‐domain response actions to simultaneously contain Applied NDR, NSM, and EDR in on‐prem... |
CyberData 2 Large
65,000 chat examples for fine-tuning a model to write secure code, find vulnerabilities, reason about them, and work as a coding agent. Assembled entirely from existing public datasets; no model was run to write any of it.
The CyberData 2 family
| Size | Repo | Examples | Train | Valid |
|---|---|---|---|---|
| Small | VertexAGI/cyberdata-2-small | 15,000 | 14,050 | 950 |
| Medium | VertexAGI/cyberdata-2-medium | 25,000 | 23,451 | 1,549 |
| Large | VertexAGI/cyberdata-2-large | 65,000 | 60,812 | 4,188 |
| Full | VertexAGI/cyberdata-2-full | 174,877 | 164,357 | 10,520 |
CyberData 2 Large is a nested subset of the larger sizes: each source contributes a fixed share (capped at what exists), always the first rows of a fixed order, so Small is inside Medium, Medium inside Large and Large inside Full, and every row keeps the same train/valid split in every size. Shares are set by goal (agentic coding about 29%, writing code and finding vulnerabilities about 37%, reasoning about 9%, supporting knowledge about 21%), not by how much of each source exists.
What this size teaches
| Goal | Rows | Share |
|---|---|---|
| Writing secure code and detection rules (fix, rewrite, write-a-rule) | 13,210 | 20.3% |
| Finding vulnerabilities (code review, weakness identification) | 11,482 | 17.7% |
| Cyber reasoning (step-by-step vulnerability analysis with a verdict) | 5,825 | 9.0% |
| Agentic coding and tool use (security and software-engineering agents) | 9,496 | 14.6% |
| Security knowledge, Q&A and threat intelligence (supporting material) | 24,987 | 38.4% |
Where every row comes from (provenance)
Each row has a provenance tag in row_index.csv, so you can train on a stricter subset (for example, drop third-party-synthetic).
| provenance | rows | share | what it means |
|---|---|---|---|
authoritative-structured |
32,867 | 50.6% | real records (MITRE entries, Sigma rules, KEV entries, real CVE-fix code) turned into chat rows by fixed templates; every fact is copied or composed from a field of the record |
third-party-synthetic |
8,730 | 13.4% | AI-written Q&A by the dataset authors; the least reliable rows, so they are FILTERED: any row citing a CWE id that does not exist, or naming a CWE or ATT&CK technique with a name that does not match MITRE's data, is dropped (on 3,000-row samples roughly 15-19% of rows that cite ids had a nonexistent or mismatched one), as are refusals and duplicate questions |
reasoning-verified |
5,825 | 9.0% | reasoning traces written by DeepSeek-R1-0528 for the OpenVul authors and kept only when the final verdict matched the ground-truth label |
agent-trajectories |
5,656 | 8.7% | security-agent and software-engineering agent trajectories |
grounded-third-party |
4,939 | 7.6% | instruction sets written by their authors from real sources, who state their claims are checked against the source |
verified-executed |
3,840 | 5.9% | agent steps whose episodes were executed against a local environment and passed a deterministic reward check |
human-annotated |
1,796 | 2.8% | expert-annotated threat-report text turned into extraction tasks by a template |
nist-excerpt |
1,347 | 2.1% | answers grounded in excerpts of NIST publications |
Sources
| Source | Rows | % | Provenance | License / terms | What it contributes |
|---|---|---|---|---|---|
| MITRE CWE | 3,997 | 6.1% | authoritative-structured |
MITRE CWE terms of use (royalty-free; keep the MITRE copyright notice) | Weakness definitions, mitigations, detection methods, and the entries' own bad/good code examples |
| MITRE CAPEC | 898 | 1.4% | authoritative-structured |
MITRE CAPEC terms of use (royalty-free; keep the MITRE copyright notice) | Attack-pattern descriptions, prerequisites, consequences, mitigations |
| MITRE ATT&CK (enterprise) | 3,502 | 5.4% | authoritative-structured |
MITRE ATT&CK terms of use (royalty-free; keep the MITRE copyright notice) | Techniques, mitigations, detection analytics, groups, software, campaigns |
| SigmaHQ detection rules | 6,735 | 10.4% | authoritative-structured |
Detection Rule License 1.1 (attribution to the rule authors, kept inside each rule) | Real rules: write a rule from a description, explain a rule |
| CISA Known Exploited Vulnerabilities | 1,617 | 2.5% | authoritative-structured |
US-government work, public domain | Exploited-in-the-wild status and required action per CVE |
| PrimeVul (paired vulnerable/fixed C/C++ functions) | 6,954 | 10.7% | authoritative-structured |
MIT (train + valid pairs only; the test pairs are never used) | Review a vulnerable function, review its patched version, fix it |
| CVEfixes (real CVE fix commits, many languages) | 9,164 | 14.1% | authoritative-structured |
Apache-2.0 per the Hub listing (the original CVEfixes release is CC BY 4.0) | The same three code tasks across PHP/Python/JavaScript/Java/Go/Ruby/C/C++ and others |
| OpenVul rejection-sampling vulnerability reasoning (Leopo1d) | 5,825 | 9.0% | reasoning-verified |
Apache-2.0 (reasoning distilled from DeepSeek-R1-0528 by the dataset's authors) | Step-by-step reasoning about whether C/C++ code is vulnerable, kept only when the verdict matched the label; vulnerable and patched versions in pairs |
| Annotated threat-report corpus | 1,796 | 2.8% | human-annotated |
CC-BY-4.0 per the Hub tag (the dataset card has no text) | Entity extraction and relationship listing from real threat-report excerpts |
| CTI instruction dataset (reloading0101) | 4,939 | 7.6% | grounded-third-party |
CC-BY-4.0 | CVE/ATT&CK/KEV/Sigma-grounded threat-intelligence instructions and follow-ups; its authors state every claim is checked against the source |
| NIST SP excerpt instructions (nuhmanpk) | 1,347 | 2.1% | nist-excerpt |
CC-BY-4.0 (source documents are NIST publications) | Answers grounded in excerpts of NIST SP 800-series documents |
| OWASP defensive repair trajectories (Humanlearning) | 3,840 | 5.9% | verified-executed |
Apache-2.0 | Agent steps from episodes that were executed and reward-verified in a local environment (successful episodes only, no anti-cheat flags) |
| Trendyol cybersecurity instructions | 2,694 | 4.1% | third-party-synthetic |
Apache-2.0 | AI-written defensive Q&A, filtered (see below) |
| Fenrir v2.1 | 1,796 | 2.8% | third-party-synthetic |
Apache-2.0 | AI-written defensive Q&A, filtered, de-duplicated against Trendyol |
| CyberNative code vulnerability pairs | 3,592 | 5.5% | third-party-synthetic |
Apache-2.0 | Review vulnerable code and write the safer version |
| YARA / Suricata rules Q&A | 648 | 1.0% | third-party-synthetic |
Apache-2.0 | Write a YARA or Suricata rule |
| 0xKitkat/AgentForge-1152 (security split) | 576 | 0.9% | agent-trajectories |
Apache-2.0 | Defensive security-agent trajectories with tool use |
| nvidia/SWE-Hero-openhands-trajectories | 1,639 | 2.5% | agent-trajectories |
CC-BY-4.0 | Software-engineering agent trajectories (OpenHands), length-capped at 120,000 characters |
| nvidia/Open-SWE-Traces (resolved runs only) | 3,441 | 5.3% | agent-trajectories |
CC-BY-4.0 | Coding-agent trajectories whose patch was verified to fix the task (OpenHands / SWE-agent / mini-swe-agent), length-capped at 120,000 characters |
Considered and left out
trendmicro-ailab/Primus-ReasoningandPrimus-Instruct: gated (access request required).rmems/incident-response-oncall-trajectories: tagged Apache-2.0, but its own rights note says it is not training data for any model-weight update.netgoat-ai/Koda-IDS-CyberReasoning: inspected and rejected. After quality filtering only templated scenarios for one vendor's tool API remained.ayshajavd/code-security-vulnerability-dataset: mostly a repackaging of BigVul (no clear license), PrimeVul-derived samples and CyberNative, so it added little that was new.- Benchmark sets (CyberMetric, MMLU computer security, CTI-Bench): kept out so they stay usable for evaluation; a scan found none of their questions verbatim here.
Splits and checks
train.jsonl has 60,812 rows and valid.jsonl has 4,188. Rows derived from the same object (a CWE entry, a Sigma rule, a code-fix pair, an agent episode, a vulnerable/patched reasoning pair, a document chunk) always share one split. Checks run before release (build_scripts/verify_sizes.py): exact row counts; unique ids; strict nesting between sizes; the same split for every row in every size; every line parses with valid roles and an assistant last turn; no row mentions any of the 916 CVEs we hold out for a CVE-recall evaluation; no verbatim CyberMetric / MMLU-security question appears.
Format
Each line is {"messages": [...]}, standard chat SFT format. Agent rows carry tool_calls; reasoning rows keep the source's <think>...</think> block followed by the final answer. row_index.csv has id, source, task, provenance, split, group per row.
from datasets import load_dataset
ds = load_dataset("VertexAGI/cyberdata-2-large")
print(ds["train"][0]["messages"])
Limitations
- Vulnerability finding is supply-limited. The real vulnerable-and-fixed code comes from PrimeVul, CVEfixes and the OpenVul reasoning set; there is no more openly licensed labeled data we trusted. Vulnerability detection is a hard task: training on these labels does not by itself guarantee good detection.
- Reasoning covers one task. The only verified reasoning set we found is vulnerability detection in C/C++. There is no verified reasoning data here for incident response or threat analysis.
- Agent trajectories are length-capped at 120,000 characters (about 30k tokens), so the longest runs are absent.
- Templated rows teach the answer format and the content of the records as written; they are not a verified knowledge base. In our tests none of the 8B base models we tried could recall facts about CVEs they had not seen, so for CVE-specific facts use lookup, not memory.
- PrimeVul and CVEfixes CWE labels come from NVD and are sometimes loose. The
third-party-syntheticandgrounded-third-partyrows can still contain errors beyond the ids we can check.
Licensing and attribution
A mixture of independently licensed sources (see the table). Required attribution: (c) The MITRE Corporation for CWE, CAPEC and ATT&CK content; SigmaHQ rule authors (Detection Rule License 1.1; author fields are kept in the rule text); CC-BY-4.0 sources (nvidia SWE-Hero and Open-SWE-Traces, reloading0101, nuhmanpk, mrmoor) must be credited as listed. The OpenVul reasoning was written by DeepSeek-R1-0528; check DeepSeek's terms for your use. No source is gated or carries a non-commercial restriction.
- Downloads last month
- 29