Datasets:
Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
tags:
|
| 6 |
+
- security
|
| 7 |
+
- api-security
|
| 8 |
+
- vulnerability-detection
|
| 9 |
+
- code
|
| 10 |
+
- owasp
|
| 11 |
+
task_categories:
|
| 12 |
+
- text-classification
|
| 13 |
+
- text-generation
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1K<n<10K
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# API Vulnerability Dataset (10K)
|
| 19 |
+
|
| 20 |
+
A dataset of **10,000 API-specific vulnerability samples** used to fine-tune [harsharajkumar273/api-security-qlora](https://huggingface.co/harsharajkumar273/api-security-qlora) — a QLoRA adapter on CodeLlama-7b for automated API security analysis.
|
| 21 |
+
|
| 22 |
+
## Dataset Summary
|
| 23 |
+
|
| 24 |
+
Each sample contains a vulnerable or clean API endpoint code snippet paired with a structured security analysis covering vulnerability type, severity, CWE ID, and a remediated version.
|
| 25 |
+
|
| 26 |
+
## Language & Framework Distribution
|
| 27 |
+
|
| 28 |
+
| Language | Share | Frameworks |
|
| 29 |
+
|---|---|---|
|
| 30 |
+
| Python | 46% | Flask, FastAPI, Django |
|
| 31 |
+
| JavaScript | 25% | Express.js, NestJS |
|
| 32 |
+
| Java | 15% | Spring Boot |
|
| 33 |
+
| PHP / Go / Ruby / C# | 14% | Laravel, Gin, Rails, ASP.NET |
|
| 34 |
+
|
| 35 |
+
## Vulnerability Distribution
|
| 36 |
+
|
| 37 |
+
| Vulnerability | Samples | CWE |
|
| 38 |
+
|---|---|---|
|
| 39 |
+
| SQL Injection | 2,425 | CWE-89 |
|
| 40 |
+
| Mass Assignment | 1,307 | CWE-915 |
|
| 41 |
+
| Path Traversal | 943 | CWE-22 |
|
| 42 |
+
| IDOR | 860 | CWE-639 |
|
| 43 |
+
| Broken Authorization | 792 | CWE-285 |
|
| 44 |
+
| Command Injection | 600 | CWE-78 |
|
| 45 |
+
|
| 46 |
+
## Severity Breakdown
|
| 47 |
+
|
| 48 |
+
- **Critical (43%)**: RCE, SQLi, unauthorized admin access
|
| 49 |
+
- **High (41%)**: Data leaks, IDOR, authorization bypass
|
| 50 |
+
- **Medium / Clean (16%)**: XSS, input validation warnings, baseline clean samples
|
| 51 |
+
|
| 52 |
+
## Usage
|
| 53 |
+
|
| 54 |
+
This dataset was used to fine-tune the [api-security-qlora](https://huggingface.co/harsharajkumar273/api-security-qlora) adapter and is also consumed directly by the [API Security Scanner](https://github.com/harsharajkumar/api-security) rules engine.
|
| 55 |
+
|
| 56 |
+
## Credits
|
| 57 |
+
|
| 58 |
+
**CS6380 — API Security Project**
|
| 59 |
+
Authors: Siddhanth Nilesh Jagtap · Tanuj Kenchannavar · Harsha Raj Kumar
|