Skip to main content

A Python implementation of the Stakeholder-Specific Vulnerability Categorization framework.

Project description

Python implementation of SSVC (Stakeholder-Specific Vulnerability Categorization)

A comprehensive Python library implementing the Stakeholder-Specific Vulnerability Categorization (SSVC) framework with a plugin-based architecture supporting multiple decision methodologies.

The SSVC framework was developed by the CERT/CC Software Engineering Institute at Carnegie Mellon University. More information can be found at https://certcc.github.io/SSVC/

Installation

Via Package Managers

# Using pip
pip install ssvc

# Using uv (recommended)
uv add ssvc

# Using Poetry
poetry add ssvc

# Using Pipenv
pipenv install ssvc

# Using Conda
conda install -c conda-forge ssvc

From Source

# Clone and install from GitHub
git clone https://github.com/Vulnetix/python-ssvc.git
cd python-ssvc
uv sync
uv run python -m pip install -e .

Available Methodologies

This library supports multiple SSVC methodologies through a plugin-based architecture:

Methodology Description Documentation Official Source
CISA CISA Stakeholder-Specific Vulnerability Categorization docs/cisa.md CISA SSVC
Coordinator Triage CERT/CC Coordinator Triage Decision Model docs/coordinator_triage.md CERT/CC Coordinator Triage
Coordinator Publication CERT/CC Coordinator Publication Decision Model docs/coordinator_publication.md CERT/CC Publication Decision
Supplier CERT/CC Supplier Decision Model docs/supplier.md CERT/CC Supplier Tree
Deployer CERT/CC Deployer Decision Model docs/deployer.md CERT/CC Deployer Tree

Quick Start

import ssvc

# List available methodologies
print("Available methodologies:", ssvc.list_methodologies())

# Use CISA methodology
decision = ssvc.Decision(
    methodology='cisa',
    exploitation='active',
    automatable='no',
    technical_impact='total',
    mission_wellbeing_impact='high'
)
print(f"CISA Decision: {decision.outcome.action.value} (Priority: {decision.outcome.priority.value})")

# Use Coordinator Triage methodology
decision = ssvc.Decision(
    methodology='coordinator_triage',
    report_public='no',
    supplier_contacted='yes', 
    report_credibility='credible',
    supplier_cardinality='multiple',
    utility='super_effective',
    public_safety_impact='significant'
)
print(f"Coordinator Triage Decision: {decision.outcome.action.value} (Priority: {decision.outcome.priority.value})")

Key Features

SSVC Vector Strings

All methodologies support vector strings for compact representation:

import ssvc

# Generate vector string
decision = ssvc.Decision('cisa',
    exploitation='active',
    automatable='yes', 
    technical_impact='total',
    mission_wellbeing_impact='high'
)
vector = decision.to_vector()
# Output: CISAv1/E:A/A:Y/T:T/M:H/2024-07-23T20:34:21.000000/

# Parse vector string
parsed = ssvc.Decision.from_vector(vector)
outcome = parsed.evaluate()

Schema Validation

All methodology definitions are validated against a JSON schema:

# Methodologies are defined in YAML and validated against schema.json
# See: src/ssvc/methodologies/schema.json

Plugin System

Create custom methodologies using YAML definitions:

  1. Define methodology in YAML format
  2. Place in src/ssvc/methodologies/
  3. Run python scripts/generate_plugins.py
  4. Generated plugin becomes available via ssvc.Decision(methodology='custom')

Language Implementations

SSVC is available in multiple programming languages:

Contributing

We welcome contributions! To add new methodologies or improve the library:

Adding New Methodologies

  1. Fork the repository on GitHub
  2. Create YAML definition following the schema structure
  3. Generate plugin using the built-in generator
  4. Add comprehensive tests with 100% coverage
  5. Submit Pull Request with:
    • YAML methodology definition
    • Generated plugin code
    • Complete test suite
    • Documentation updates
    • Links to official methodology sources

Plugin Development

The plugin system supports extensible methodologies through YAML:

name: "Your Methodology"
description: "Description of your methodology"
version: "1.0"
url: "https://example.com/methodology-docs"

enums:
  DecisionPoint:
    - VALUE_ONE
    - VALUE_TWO
  ActionType:
    - ACTION_ONE
    - ACTION_TWO

priorityMap:
  ACTION_ONE: LOW
  ACTION_TWO: HIGH

decisionTree:
  type: DecisionPoint
  children:
    VALUE_ONE: ACTION_ONE
    VALUE_TWO: ACTION_TWO

defaultAction: ACTION_ONE

Development Setup

git clone https://github.com/Vulnetix/python-ssvc.git
cd python-ssvc
uv sync
uv run python -c "import ssvc; print('SSVC ready for development!')"

Testing

# Run tests
uv run pytest --cov

# Validate YAML files
uv run python scripts/validate_methodologies.py

# Generate plugins
uv run python scripts/generate_plugins.py

Links

License

Licensed under the Apache License 2.0. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssvc-1.2.2.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssvc-1.2.2-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file ssvc-1.2.2.tar.gz.

File metadata

  • Download URL: ssvc-1.2.2.tar.gz
  • Upload date:
  • Size: 29.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for ssvc-1.2.2.tar.gz
Algorithm Hash digest
SHA256 74f5a3444981c58f0feab3a6cee543caa4feb669df867955ba7a9764df91dafc
MD5 a94c0b82e3de0c2cfed2ea157a12ff94
BLAKE2b-256 08ea8b81e5fa8c59b15ad58a2269b8bc86eb5b5a45ddf0c20ac6a079068c7396

See more details on using hashes here.

File details

Details for the file ssvc-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: ssvc-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for ssvc-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9afc5ccac45d70c3bbee2cbae026672262c6735b0612e778679d065d903d58ca
MD5 f3527b14e8bfa5a72eec1b0b4c76668c
BLAKE2b-256 e85d8599ff3984dcc019d41480c3224024b5d9e96e487005c19a77ee1b0a8c85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page