Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
0ff5fe0
squash changes
bernhardreiter Aug 19, 2025
ba7ce14
add uv to manage pyproject.toml
ahouseholder Aug 19, 2025
e8547df
we don't use dataclasses-json anymore
ahouseholder Aug 19, 2025
d67b357
update require ments.txt
ahouseholder Aug 19, 2025
7de36b0
bump python version to 3.11
ahouseholder Aug 19, 2025
a1216f2
bump python to 3.12
ahouseholder Aug 19, 2025
e111f4f
add `make dev` environment target
ahouseholder Aug 19, 2025
c12f28a
add mkdocs-exec
ahouseholder Aug 19, 2025
1b23c9c
swap print() for logger.warning()
ahouseholder Aug 19, 2025
b277f90
uv --project=./src add "fastapi[standard]"
ahouseholder Aug 19, 2025
8df22d4
uv --project=./src add "fastapi[all]"
ahouseholder Aug 19, 2025
cac5665
add first pass at registry api
ahouseholder Aug 19, 2025
dbb8c2f
add docker ignore
ahouseholder Aug 20, 2025
86fd0ec
add api server to docker config
ahouseholder Aug 20, 2025
c9d3955
refactor
ahouseholder Aug 20, 2025
2bee844
add some basic 404s
ahouseholder Aug 20, 2025
cd8e584
add some basic 404s
ahouseholder Aug 20, 2025
e74dcfc
update requirements.txt
ahouseholder Aug 20, 2025
442afeb
Merge branch 'feature/fastapi' of https://github.com/CERTCC/SSVC into…
ahouseholder Aug 20, 2025
eec60b8
fix python-app.yml for uv
ahouseholder Aug 20, 2025
7fe43d8
Merge branch 'main' of https://github.com/CERTCC/SSVC into feature/fa…
ahouseholder Aug 20, 2025
1b27670
fix link_checker.yml for uv
ahouseholder Aug 20, 2025
85caa25
refactor api and add more routes
ahouseholder Aug 20, 2025
92b8cb9
add __init__.py to ssvc/decision_tables/cisa to fix importer
ahouseholder Aug 20, 2025
2534633
refactor
ahouseholder Aug 20, 2025
ef4a9b3
add lookup by id string
ahouseholder Aug 20, 2025
8a5788a
move api.py to ssvc.api package
ahouseholder Aug 20, 2025
8feaa47
refactor api into routers
ahouseholder Aug 20, 2025
58814ad
cleanup
ahouseholder Aug 20, 2025
4882983
Merge branch 'main' of https://github.com/CERTCC/SSVC into feature/fa…
ahouseholder Aug 21, 2025
e0843e7
add namespaces router
ahouseholder Aug 21, 2025
b735fc8
update registered objects
ahouseholder Aug 21, 2025
2627e57
move another route to namespaces router
ahouseholder Aug 21, 2025
2194f71
add keys router
ahouseholder Aug 21, 2025
d581188
add versions router, refactor types and response models
ahouseholder Aug 21, 2025
31025ab
refactoring
ahouseholder Aug 21, 2025
f20823e
add objects router, add summaries and descriptions, use `async def`
ahouseholder Aug 21, 2025
dc9c954
improve type defs
ahouseholder Aug 21, 2025
a031e48
validate expected dictionary keys
ahouseholder Aug 21, 2025
a99e4c7
add decision_points/namespace/key/latest/values route
ahouseholder Aug 21, 2025
c0d6956
reorganize type defs
ahouseholder Aug 21, 2025
4506211
add TypesDictType definition and update descriptions for clarity
ahouseholder Aug 21, 2025
1062ba9
add TypesDictResponse model and update response handling for object t…
ahouseholder Aug 21, 2025
141339c
add unit tests for Decision Points and Decision Tables APIs (+11 squa…
ahouseholder Aug 21, 2025
72f2c26
fix import path for _404_on_none helper in test_helpers.py
ahouseholder Aug 22, 2025
6cc7e02
add documentation for Decision Point and Decision Table objects
ahouseholder Aug 22, 2025
414bd20
add documentation for Human Impact and update navigation in mkdocs
ahouseholder Aug 22, 2025
c43d1fb
add Dockerfile and docker-compose updates for improved environment setup
ahouseholder Aug 22, 2025
b400eae
add SSVC Docker Containers documentation and update mkdocs.yml
ahouseholder Aug 22, 2025
9c63e71
Merge branch 'feature/fastapi' into add-docs-2
ahouseholder Aug 22, 2025
7badc29
add Public Safety Impact decision table, documentation, and related J…
ahouseholder Aug 22, 2025
f3f05aa
add code examples and fix filename for utility documentation
ahouseholder Aug 22, 2025
e704717
add subgraph structure for inputs and outputs in diagram generation
ahouseholder Aug 22, 2025
12abad3
add reference docs for SSVC and CVSS collections decision point groups.
ahouseholder Aug 25, 2025
6309262
Add Documentation for DecisionTable objects (#900)
ahouseholder Aug 25, 2025
d801c08
Merge branch 'main' of https://github.com/CERTCC/SSVC into feature/fa…
ahouseholder Aug 25, 2025
28d8755
catch pyproject.toml up to main
ahouseholder Aug 26, 2025
dfafbe2
Merge branch 'main' of https://github.com/CERTCC/SSVC into feature/fa…
ahouseholder Aug 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/link_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,14 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install linkchecker

- name: Install our python stuff
run: |
python -m pip install -e src
python -m pip install --upgrade pip uv
uv sync --dev --project src

- name: Build Site
run: |
mkdocs build --verbose --clean --config-file mkdocs.yml
uv run --project=src mkdocs build --verbose --clean --config-file mkdocs.yml

- name: Check links
run: |
linkchecker site/index.html
uv run --project=src linkchecker site/index.html

11 changes: 6 additions & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ jobs:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest build
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install --upgrade pip uv
uv sync --project=src --dev --frozen
# pip install pytest build
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - uses: psf/black@stable
- name: Test with pytest
run: |
pytest
uv run --project=src pytest
- name: Build
run: |
python -m build src
uv build --project=src
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
47 changes: 38 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,37 +1,56 @@
# Project-specific vars
MKDOCS_PORT=8765
DOCKER_DIR=docker
PROJECT_DIR = ./src
DOCKER_COMPOSE=docker-compose --project-directory $(DOCKER_DIR)
UV_RUN=uv run --project $(PROJECT_DIR)

# Targets
.PHONY: all test docs docker_test clean help mdlint_fix up down regenerate_json
.PHONY: all test docs api docker_test clean help mdlint_fix up down regenerate_json


all: help

dev:
@echo "Set up dev environment..."
uv sync --dev --project $(PROJECT_DIR)

mdlint_fix:
@echo "Running markdownlint..."
markdownlint --config .markdownlint.yml --fix .

test:
@echo "Running tests locally..."
pytest -v src/test
uv run --project $(PROJECT_DIR) pytest -v

docker_test:
@echo "Building the latest test image..."
pushd $(DOCKER_DIR) && docker-compose build test
$(DOCKER_COMPOSE) build test
@echo "Running tests in Docker..."
pushd $(DOCKER_DIR) && docker-compose run --rm test
$(DOCKER_COMPOSE) run --rm test

docs_local:
@echo "Building and running docs locally..."
$(UV_RUN) mkdocs serve

docs:
@echo "Building and running docs in Docker..."
pushd $(DOCKER_DIR) && docker-compose up docs
$(DOCKER_COMPOSE) up docs

api:
@echo "Building and running API in Docker..."
$(DOCKER_COMPOSE) up api

api_dev:
$(UV_RUN) uvicorn ssvc.api.main:app --reload

up:
@echo "Starting Docker services..."
pushd $(DOCKER_DIR) && docker-compose up -d
$(DOCKER_COMPOSE) up -d

down:
@echo "Stopping Docker services..."
pushd $(DOCKER_DIR) && docker-compose down
$(DOCKER_COMPOSE) down

regenerate_json:
@echo "Regenerating JSON files..."
Expand All @@ -40,20 +59,30 @@ regenerate_json:

clean:
@echo "Cleaning up Docker resources..."
pushd $(DOCKER_DIR) && docker-compose down --rmi local || true

$(DOCKER_COMPOSE) down --rmi local || true
rm -rf $(PROJECT_DIR)/.venv $(PROJECT_DIR)/uv.lock
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " all - Display this help message"

@echo " dev - Set up development environment"
@echo " mdlint_fix - Run markdownlint with fix"
@echo " test - Run tests locally"
@echo " docker_test - Run tests in Docker"

@echo " docs - Build and run documentation in Docker"
@echo " docs_local - Build and run documentation locally"

@echo " api - Build and run API in Docker"
@echo " api_dev - Run API locally with auto-reload"

@echo " up - Start Docker services"
@echo " down - Stop Docker services"

@echo " regenerate_json - Regenerate JSON files from python modules"

@echo " clean - Clean up Docker resources"
@echo " help - Display this help message"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"namespace": "x_com.yahooinc#prioritized-risk-remediation",
"key": "PARANOIDS",
"version": "1.0.0",
"name": "theParanoids",
"description": "PrioritizedRiskRemediation outcome group based on TheParanoids.",
"schemaVersion": "2.0.0",
"values": [
{
"key": "5",
"name": "Track 5",
"description": "Track"
},
{
"key": "4",
"name": "Track Closely 4",
"description": "Track Closely"
},
{
"key": "3",
"name": "Attend 3",
"description": "Attend"
},
{
"key": "2",
"name": "Attend 2",
"description": "Attend"
},
{
"key": "1",
"name": "Act 1",
"description": "Act"
},
{
"key": "0",
"name": "Act ASAP 0",
"description": "Act ASAP"
}
]
}
79 changes: 79 additions & 0 deletions data/json/decision_tables/ssvc/public_safety_impact_1_0_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"namespace": "ssvc",
"key": "DT_PSI",
"version": "1.0.0",
"name": "Public Safety Impact",
"description": "Public Safety Impact Decision Table",
"schemaVersion": "2.0.0",
"decision_points": {
"ssvc:SI:2.0.0": {
"namespace": "ssvc",
"key": "SI",
"version": "2.0.0",
"name": "Safety Impact",
"description": "The safety impact of the vulnerability. (based on IEC 61508)",
"schemaVersion": "2.0.0",
"values": [
{
"key": "N",
"name": "Negligible",
"description": "Any one or more of these conditions hold.<br/><br/>- *Physical harm*: Minor injuries at worst (IEC 61508 Negligible).<br/>- *Operator resiliency*: Requires action by system operator to maintain safe system state as a result of exploitation of the vulnerability where operator actions would be well within expected operator abilities; OR causes a minor occupational safety hazard.<br/>- *System resiliency*: Small reduction in built-in system safety margins; OR small reduction in system functional capabilities that support safe operation.<br/>- *Environment*: Minor externalities (property damage, environmental damage, etc.) imposed on other parties.<br/>- *Financial*: Financial losses, which are not readily absorbable, to multiple persons.<br/>- *Psychological*: Emotional or psychological harm, sufficient to be cause for counselling or therapy, to multiple persons."
},
{
"key": "M",
"name": "Marginal",
"description": "Any one or more of these conditions hold.<br/><br/>- *Physical harm*: Major injuries to one or more persons (IEC 61508 Marginal).<br/>- *Operator resiliency*: Requires action by system operator to maintain safe system state as a result of exploitation of the vulnerability where operator actions would be within their capabilities but the actions require their full attention and effort; OR significant distraction or discomfort to operators; OR causes significant occupational safety hazard.<br/>- *System resiliency*: System safety margin effectively eliminated but no actual harm; OR failure of system functional capabilities that support safe operation.<br/>- *Environment*: Major externalities (property damage, environmental damage, etc.) imposed on other parties.<br/>- *Financial*: Financial losses that likely lead to bankruptcy of multiple persons.<br/>- *Psychological*: Widespread emotional or psychological harm, sufficient to be cause for counselling or therapy, to populations of people."
},
{
"key": "R",
"name": "Critical",
"description": "Any one or more of these conditions hold.<br/><br/>- *Physical harm*: Loss of life (IEC 61508 Critical).<br/>- *Operator resiliency*: Actions that would keep the system in a safe state are beyond system operator capabilities, resulting in adverse conditions; OR great physical distress to system operators such that they cannot be expected to operate the system properly.<br/>- *System resiliency*: Parts of the cyber-physical system break; system’s ability to recover lost functionality remains intact.<br/>- *Environment*: Serious externalities (threat to life as well as property, widespread environmental damage, measurable public health risks, etc.) imposed on other parties.<br/>- *Financial*: Socio-technical system (elections, financial grid, etc.) of which the affected component is a part is actively destabilized and enters unsafe state.<br/>- *Psychological*: N/A."
},
{
"key": "C",
"name": "Catastrophic",
"description": "Any one or more of these conditions hold.<br/><br/>- *Physical harm*: Multiple loss of life (IEC 61508 Catastrophic).<br/>- *Operator resiliency*: Operator incapacitated (includes fatality or otherwise incapacitated).<br/>- *System resiliency*: Total loss of whole cyber-physical system, of which the software is a part.<br/>- *Environment*: Extreme externalities (immediate public health threat, environmental damage leading to small ecosystem collapse, etc.) imposed on other parties.<br/>- *Financial*: Social systems (elections, financial grid, etc.) supported by the software collapse.<br/>- *Psychological*: N/A."
}
]
},
"ssvc:PSI:2.0.1": {
"namespace": "ssvc",
"key": "PSI",
"version": "2.0.1",
"name": "Public Safety Impact",
"description": "A coarse-grained representation of impact to public safety.",
"schemaVersion": "2.0.0",
"values": [
{
"key": "M",
"name": "Minimal",
"description": "Safety Impact:Negligible"
},
{
"key": "S",
"name": "Significant",
"description": "Safety Impact:(Marginal OR Critical OR Catastrophic)"
}
]
}
},
"outcome": "ssvc:PSI:2.0.1",
"mapping": [
{
"ssvc:SI:2.0.0": "N",
"ssvc:PSI:2.0.1": "M"
},
{
"ssvc:SI:2.0.0": "M",
"ssvc:PSI:2.0.1": "S"
},
{
"ssvc:SI:2.0.0": "R",
"ssvc:PSI:2.0.1": "S"
},
{
"ssvc:SI:2.0.0": "C",
"ssvc:PSI:2.0.1": "S"
}
]
}
Loading