This repository contains the Stakeholder-Specific Vulnerability Categorization (SSVC) project, which provides a system for prioritizing actions during vulnerability management.
SSVC is a modular decision-making framework for vulnerability management that includes:
- Python modules for decision points, decision tables, and outcomes
- MkDocs-based documentation website
- Interactive calculators and policy explorers
- JSON/CSV data files for decision tables
- Docker and Make-based development and deployment
- Primary Language: Python 3.x
- Package Management: uv (package and project manager)
- Build Tool: Make
- Documentation: MkDocs with Material theme
- Testing: pytest
- Data Models: Pydantic for JSON schema validation
- Scientific Computing: NumPy, SciPy, scikit-learn
- Web Framework: FastAPI (for API endpoints)
- Containerization: Docker and Docker Compose
/src/ssvc/- Core Python modules for SSVC functionalitydecision_points/- Decision point definitionsdecision_tables/- Decision table implementationsapi/- FastAPI applicationoutcomes/- Outcome definitionsdp_groups/- Decision point groupsregistry/- Registry functionality
/docs/- Markdown documentation source files/data/- JSON and CSV data files for decision tables/src/test/- Unit tests/docker/- Docker configurations/obsolete/- Deprecated code (do not modify)
Use make help to see all available commands. Common targets include:
make dev- Set up development environmentmake test- Run tests locallymake docker_test- Run tests in Dockermake docs_local- Serve documentation locally (http://localhost:8000/SSVC/)make docs- Build and run documentation in Dockermake api_dev- Run API locally with auto-reloadmake api- Build and run API in Dockermake mdlint_fix- Run markdown linting with auto-fixmake regenerate_json- Regenerate JSON files from Python modules
- Follow PEP 8 style guidelines
- Use type hints for function signatures and return types
- Use Pydantic models for data validation
- Document classes and functions with docstrings
- Prefer explicit imports over wildcard imports
- Module structure uses absolute imports from
ssvcpackage
- Python files:
snake_case.py - Classes:
PascalCase - Functions/variables:
snake_case - Constants:
UPPER_SNAKE_CASE
- Unit tests use pytest framework
- Tests are located in
/src/test/ - Test files follow pattern:
test_*.py - Run tests with:
make testoruv run pytest -v
- Write tests for new Python modules
- Ensure decision points and tables have corresponding tests
- Test JSON schema validation
- Validate data model serialization/deserialization
- Run all tests:
make test - Ensure no test failures
- Fix any linting issues:
make mdlint_fix - Verify documentation builds:
make docs_local
- Documentation uses MkDocs with Material theme
- Files are in Markdown format in
/docs/ - Use Python exec blocks for dynamic content generation
- Include examples and code snippets
- Follow existing documentation structure
- Automatic API documentation via mkdocstrings
- Python module imports for dynamic content generation
- BibTeX citations via mkdocs-bibtex
- Add markdown files to site navigation by specifying them in
mkdocs.yml - Include markdown files in other markdown files with
mkdocs-include-markdown-plugin - Dynamically generate content from python code blocks using the
markdown-execplugin
- Located in
/data/json/ - Generated from Python Pydantic models
- Use JSON schema validation
- Located in
/data/csv/ - Define decision table outcomes
- Generated from python modules (The python data objects are authoritative)
- Allows users to explore customizing SSVC for specific environments
- Import Paths: Use absolute imports like
from ssvc.module import Class, not relative imports - PYTHONPATH: When running scripts directly, set
export PYTHONPATH=$PYTHONPATH:$(pwd)/src - JSON Regeneration: After modifying decision points/tables, regenerate JSON with
make regenerate_json - Docker Context: Some make targets use Docker, others run locally - check the Makefile
- Package Management: Use
makecommands oruvdirectly, not pip - Obsolete Code and Documentation: Never modify files in
/obsolete/,/doc/, or/pdfs/directories
- FastAPI application is in
/src/ssvc/api/ - Run locally with auto-reload:
make api_dev(serves on http://127.0.0.1:8000/docs) - Run in Docker:
make api(serves on http://127.0.0.1:8001/SSVC/)
- Create feature branches for new work
- Write descriptive commit messages
- Reference issue numbers in commits when applicable
- Keep commits focused and atomic
- Run tests before pushing
- Main documentation: https://certcc.github.io/SSVC/
- Source repository: https://github.com/CERTCC/SSVC
- SSVC Calculator: https://certcc.github.io/SSVC/ssvc-calc/
- Contributing guide: See CONTRIBUTING.md
- Project wiki: https://github.com/CERTCC/SSVC/wiki
- This project uses a MIT (SEI)-style license with Carnegie Mellon University copyright (see LICENSE file)
- Decision points and tables follow SSVC specification
- Backward compatibility is important for existing data files
- Documentation changes should be reflected in both
/docs/and/src/README.mdwhen applicable