File size: 6,857 Bytes
8df6aa0 d38f080 8df6aa0 d38f080 8df6aa0 dc36d9d 8df6aa0 dc36d9d 8df6aa0 d38f080 8df6aa0 d38f080 8df6aa0 d38f080 8df6aa0 d38f080 8df6aa0 d38f080 8df6aa0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | ---
dataset_info:
features:
- name: benchmark_id
dtype: string
- name: title
dtype: string
- name: category
dtype: string
- name: language
dtype: string
- name: framework
dtype: string
- name: application_type
dtype: string
- name: source_type
dtype: string
- name: vulnerability_name
dtype: string
- name: vulnerability_description
dtype: string
- name: vulnerable_code
dtype: string
- name: secure_code
dtype: string
- name: exploit_example
dtype: string
- name: exploitability_explanation
dtype: string
- name: attack_prerequisites
dtype: string
- name: expected_llm_analysis
dtype: string
- name: expected_detection
dtype: string
- name: expected_fix
dtype: string
- name: expected_secure_code
dtype: string
- name: expected_severity
dtype: string
- name: expected_confidence
dtype: string
- name: expected_cwe
dtype: string
- name: expected_owasp
dtype: string
- name: expected_owasp_api
dtype: string
- name: expected_owasp_llm
dtype: string
- name: expected_cvss
dtype: string
- name: expected_cvss_score
dtype: float
- name: expected_false_positive_probability
dtype: float
- name: expected_false_negative_probability
dtype: float
- name: evaluation_rubric
dtype: dict
- name: scoring_criteria
dtype: list
- name: tags
dtype: list
- name: references
dtype: list
- name: metadata
dtype: dict
version: 1.1.0
splits:
train:
num_examples: 434
validation:
num_examples: 69
test:
num_examples: 69
citation: >-
@dataset{tasdelen2026appsecbench,
title={AppSecBench: A Comprehensive Benchmark Dataset for Application Security Evaluation, Secure Code Review, AI Security Research, LLM Evaluation, and Secure Software Engineering},
author={Taşdelen, İsmail},
year={2026},
version={1.1.0},
publisher={Hugging Face}
}
task_categories:
- text-generation
- question-answering
- token-classification
- other
language:
- en
- code
tags:
- security
- application-security
- vulnerability-detection
- secure-code-review
- llm-evaluation
- sast
- owasp
- cwe
- ai-security
- benchmark
size_categories:
- 100-999
---
# AppSecBench Dataset Card
## Dataset Summary
AppSecBench is an original benchmark of 406 vulnerable/secure code pairs spanning 12 programming
languages, 18 frameworks, 34 vulnerability classes, and 5 difficulty levels. Each record is a
self-contained evaluation case: a vulnerable snippet, its secure counterpart, an exploit sketch,
and the "ground truth" a detector/model is expected to produce (CWE, OWASP, severity, CVSS 3.1,
explainability, fix, and false-positive/false-negative priors).
The dataset supports measuring whether an LLM or security tool can **detect**, **classify**,
**explain**, **score severity**, **recommend a fix**, and **generate secure code** for real-world
application-security weaknesses — including modern AI/LLM risks (prompt injection, RAG, MCP, agent
security) and infrastructure misconfigurations.
## Supported Tasks
| Task | Input | Expected output |
|------|-------|-----------------|
| Vulnerability detection | `vulnerable_code` | vulnerability flagged + location |
| CWE/OWASP mapping | code | `expected_cwe` / `expected_owasp` |
| Severity estimation | code | `expected_severity` + `expected_cvss_score` |
| Exploit explanation | code | `exploitability_explanation` |
| Secure fix / secure code gen | code | `expected_secure_code` |
| False-positive / false-negative analysis | code | `expected_false_positive_probability` / `expected_false_negative_probability` |
## Languages & Frameworks
Python, Java, JavaScript, TypeScript, Go, Rust, PHP, C#, Kotlin, Swift, C, C++ (code); plus
Infrastructure-as-Code in YAML / Dockerfile / Bash. Frameworks: Flask, FastAPI, Django, Spring
Boot, Express, NestJS, Next.js, Laravel, ASP.NET Core, Gin, Echo, Fiber, Android, iOS.
## Data Fields
Each record is a JSON object (see `README.md` for the field list). `metadata` carries
`difficulty`, `category`, `cwe`, `owasp`, `owasp_api`, `owasp_llm`, `cvss_vector`, `cvss_score`,
`source`, `license`, and `schema_version`.
## Distribution (v1.1.0)
- 17 languages, 18 frameworks, 27 unique CWEs, 9 unique OWASP Top-10 (2021) classes, 34 vulnerability types.
- Difficulty: Beginner, Intermediate, Advanced, Expert, Real-world enterprise.
- Source type: `synthetic` for all records (original, non-derived).
- Full per-dimension counts: `statistics/summary.json` and `statistics/statistics.md`.
## Methodology
Records are generated deterministically (`scripts/build.py`, `seed=42`) from an original catalog
(`scripts/vuln_catalog.py`) and per-language generators (`scripts/generators.py`). CVSS 3.1 base
scores are computed from the official FIRST formulas (`scripts/cvss.py`). See `docs/methodology.md`.
## Quality & Validation
An automated QA suite (`scripts/validate.py`) enforces: JSON validity, no duplicate IDs, required
field presence, enum conformance, CWE/OWASP/CVSS format + recomputation consistency, label
consistency vs the catalog, `vulnerable_code != secure_code`, reference well-formedness, and real
syntax/compile checks. Result for v1.1.0: **PASS (0 errors)** over 572 records. Report: `validation/validation_report.md`.
## Intended Uses
- Evaluating and comparing LLMs on secure-code understanding.
- Benchmarking SAST / SCA / secret-scanning / IaC-scanning tools.
- Training and fine-tuning secure-coding assistants (with proper licensing).
- Academic reproducible experiments in application security.
## Limitations & Out-of-Scope
- Snippets are minimal/synthetic, not full applications; they isolate one weakness at a time.
- Some languages are checked with heuristic balance (not compiled) when no toolchain is present.
- The benchmark measures *recognition/explanation*, not end-to-end offensive capability.
- Not a substitute for manual security review or threat modeling.
See `docs/LIMITATIONS.md` and `docs/INTENDED_USES.md`.
## Ethical Considerations & Responsible Disclosure
`docs/ETHICAL_CONSIDERATIONS.md` and `docs/RESPONSIBLE_DISCLOSURE.md`. The vulnerable code is
educational, synthetic, and non-weaponized.
## Licensing
MIT. Code snippets are original and provided for defensive use.
## Citation (BibTeX)
```bibtex
@dataset{tasdelen2026appsecbench,
title = {AppSecBench: A Comprehensive Benchmark Dataset for Application Security Evaluation, Secure Code Review, AI Security Research, LLM Evaluation, and Secure Software Engineering},
author = {Taşdelen, İsmail},
year = {2026},
version= {1.1.0},
publisher = {Hugging Face}
}
```
|