AppSecBench / CONTRIBUTING.md
ismailtasdelen's picture
Upload folder using huggingface_hub
8df6aa0 verified
|
Raw
History Blame Contribute Delete
1.65 kB
# Contributing to AppSecBench
Thanks for helping improve the benchmark. We welcome high-quality, original cases and fixes.
## How to add records
1. **Do not copy existing datasets or proprietary code.** Every snippet must be original, inspired
by public secure-coding principles (OWASP, CWE, ASVS).
2. Add or extend a generator in `scripts/generators.py`. Keep the vulnerable and secure snippets
*distinct*, idiomatic for the language/framework, and syntactically valid.
3. Register new vulnerability archetypes in `scripts/vuln_catalog.py` with correct CWE / OWASP /
OWASP-API / OWASP-LLM mappings and public references.
4. Update CVSS defaults in `scripts/cvss.py` if a new archetype needs a different vector profile.
5. Run the pipeline and the QA suite:
```bash
python scripts/build.py
python scripts/validate.py # must end with PASS, 0 errors
python scripts/statistics.py
```
6. Open a PR with: the change, the validation output, and a note on coverage added.
## Quality bar
- `vulnerable_code != secure_code` for 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_score` must 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.