A tool to validate CSAF (Common Security Advisory Framework) files against the CSAF 2.0 schema.
uv pip install .Validate a CSAF file:
uv run csaf-validator /path/to/your/csaf.jsonSpecify a schema version (e.g., 2.0):
csaf-validator --schema-version 2.0 /path/to/your/csaf.jsonTo validate sample CSAF JSON files, place them in the csaf_validator/samples/ directory and run:
make validateSet up your development environment:
uv venv .venv
source .venv/bin/activate
uv pip install -e .uv run pytestAlternatively, use the Makefile:
make testThis project uses uv for dependency management, with requirements.txt ensuring reproducible builds.
To update dependencies (e.g., when a new version of a package is needed):
- Update
pyproject.toml: Modify the version specifier for the desired package. - Generate
requirements.txt: Runuv pip compile pyproject.toml -o requirements.txtto re-generate the lock file based onpyproject.toml. - Sync environment: Run
uv pip sync requirements.txtto install the updated dependencies into your virtual environment. - Commit changes: Commit both
pyproject.tomlandrequirements.txtto version control.