Contributing to AppSecBench
Thanks for helping improve the benchmark. We welcome high-quality, original cases and fixes.
How to add records
- Do not copy existing datasets or proprietary code. Every snippet must be original, inspired by public secure-coding principles (OWASP, CWE, ASVS).
- Add or extend a generator in
scripts/generators.py. Keep the vulnerable and secure snippets distinct, idiomatic for the language/framework, and syntactically valid. - Register new vulnerability archetypes in
scripts/vuln_catalog.pywith correct CWE / OWASP / OWASP-API / OWASP-LLM mappings and public references. - Update CVSS defaults in
scripts/cvss.pyif a new archetype needs a different vector profile. - Run the pipeline and the QA suite:
python scripts/build.py python scripts/validate.py # must end with PASS, 0 errors python scripts/statistics.py - Open a PR with: the change, the validation output, and a note on coverage added.
Quality bar
vulnerable_code != secure_codefor every record.- Real syntax/compile check must pass for Python/JS/TS/Go/YAML/Bash when the toolchain is present.
- Labels (
expected_cwe,expected_owasp) must match the catalog. expected_cvss_scoremust equal the recomputed CVSS 3.1 base score.
Code style
- Python 3.9+;
black-friendly formatting; type hints appreciated. - Keep generators deterministic (seeded RNG only).
Reporting issues
See SECURITY.md for vulnerability/disclosure handling and docs/RESPONSIBLE_DISCLOSURE.md.
License
By contributing, you agree your contributions are released under the MIT License.