Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
585 commits
Select commit Hold shift + click to select a range
1ba6510
Update src/test/test_namespaces.py
bernhardreiter Aug 19, 2025
4108860
Update src/test/test_namespaces_pattern.py
bernhardreiter Aug 19, 2025
72c3f7e
fix typo in comment of test_namespaces_pattern.py
bernhardreiter Aug 19, 2025
24713a0
Update src/test/test_namespaces_pattern.py
bernhardreiter Aug 19, 2025
c12f28a
add mkdocs-exec
ahouseholder Aug 19, 2025
1b23c9c
swap print() for logger.warning()
ahouseholder Aug 19, 2025
1c199b4
change test case for namespace
bernhardreiter Aug 19, 2025
b277f90
uv --project=./src add "fastapi[standard]"
ahouseholder Aug 19, 2025
27b468c
add test if NS_PATTERN is anchored
bernhardreiter 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
ed27a96
Update src/test/test_namespaces_pattern.py
bernhardreiter Aug 19, 2025
74f5456
Update src/test/test_namespaces_pattern.py
bernhardreiter Aug 19, 2025
6a0bc7e
adjust documentation for new namespace rules
bernhardreiter Aug 19, 2025
026b84c
Namespace ABNF
tschmidtb51 Aug 19, 2025
b81144f
fix relative link in namespaces.md documentation
bernhardreiter Aug 20, 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
9db3aa6
Removed old namespace test and link to abnf file in data folder
sei-vsarvepalli Aug 20, 2025
8feaa47
refactor api into routers
ahouseholder Aug 20, 2025
58814ad
cleanup
ahouseholder Aug 20, 2025
e3b806d
Distinguish resource from references in Selections #833
sei-vsarvepalli Aug 20, 2025
646b947
Updated tests and selections schema
sei-vsarvepalli Aug 20, 2025
0209e5b
Distinguish resource from references in Selections #833 (#897)
ahouseholder Aug 21, 2025
c0f1bc9
since we decided to make `test` an officially registered namespace, w…
ahouseholder Aug 21, 2025
0c1e2a4
Update Namespace pattern derived from ABNF (#898)
ahouseholder Aug 21, 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
9d9a140
Add discussion on 'scope' concept in Selection Schema
ahouseholder Aug 23, 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
b8e054a
change "policy" to "decision table" in relevant docs
ahouseholder Aug 25, 2025
d801c08
Merge branch 'main' of https://github.com/CERTCC/SSVC into feature/fa…
ahouseholder Aug 25, 2025
4b00587
Bump the mkdocs group with 2 updates
dependabot[bot] Aug 26, 2025
19ed9d4
Bump jsonschema from 4.25.0 to 4.25.1
dependabot[bot] Aug 26, 2025
833deef
Bump actions/upload-pages-artifact from 3 to 4
dependabot[bot] Aug 26, 2025
74168a8
Bump actions/upload-pages-artifact from 3 to 4 (#913)
ahouseholder Aug 26, 2025
0eac380
Bump jsonschema from 4.25.0 to 4.25.1 (#912)
ahouseholder Aug 26, 2025
66ef3fd
Bump the mkdocs group with 2 updates (#911)
ahouseholder Aug 26, 2025
2c3d476
Bump pandas from 2.3.1 to 2.3.2
dependabot[bot] Aug 26, 2025
3b9a7ea
Bump pandas from 2.3.1 to 2.3.2 (#910)
ahouseholder Aug 26, 2025
28d8755
catch pyproject.toml up to main
ahouseholder Aug 26, 2025
773470e
Update CVE items to be unique and update tests see #905
sei-vsarvepalli Aug 26, 2025
328620a
Update CVE items to be unique and update tests see #905 (#914)
ahouseholder Aug 26, 2025
dfafbe2
Merge branch 'main' of https://github.com/CERTCC/SSVC into feature/fa…
ahouseholder Aug 26, 2025
d114ec9
Add FastAPI for SsvcObjectRegistry, including docker container. Also …
ahouseholder Aug 26, 2025
0b2840f
change "policy" to "decision table" in relevant docs (#906)
ahouseholder Aug 26, 2025
6e2cdce
avoid mounting volume containing .venv in docker containers, it's cau…
ahouseholder Aug 27, 2025
c61ad0d
mark `ssvc.dp_groups.base` as deprecated
ahouseholder Aug 27, 2025
14e65d0
fix namespace ABNF and resulting pattern
bernhardreiter Aug 27, 2025
f3c81db
fix namespace ABNF and resulting pattern (#921)
ahouseholder Aug 27, 2025
cc1028c
fix JSON schema pattern for namespace
bernhardreiter Aug 27, 2025
c6cd44b
rename "description" attribute to "definition" in all the things
ahouseholder Aug 27, 2025
b9b5f54
Merge branch '903-avoidreplace-json-key-description' of https://githu…
ahouseholder Aug 27, 2025
7bcd925
improve json schema pattern
bernhardreiter Aug 27, 2025
8a41c99
Remove default volume mount in docker-compose config (#917)
ahouseholder Aug 27, 2025
664d51c
fix JSON schema pattern for namespace (#925)
ahouseholder Aug 27, 2025
a7da9af
relocate obsolete stuff
ahouseholder Aug 27, 2025
eed5c60
add readme to explain this dir
ahouseholder Aug 27, 2025
6b0286f
add ssvc_doctools as script
ahouseholder Aug 27, 2025
456a2cd
ignore $project/tmp
ahouseholder Aug 27, 2025
c5be80f
add csv dumper to doctools.py
ahouseholder Aug 27, 2025
9313182
update readme
ahouseholder Aug 27, 2025
82ca757
this `main` method was useful originally for development, but it's be…
ahouseholder Aug 27, 2025
2f85f81
Updates to deprecate more main() methods
sei-vsarvepalli Aug 28, 2025
e5417cc
Rename `description` attribute to `definition` (#926)
ahouseholder Aug 28, 2025
7501dc0
Mark `ssvc.dp_groups.base` as deprecated (#919)
ahouseholder Aug 28, 2025
1987f53
Merge branch 'main' into 890-add-csv-generation-to-doctoolspy
ahouseholder Aug 28, 2025
12b76e9
Automate CSV example generation with doctools.py (#929)
ahouseholder Aug 28, 2025
4806f08
Housekeeping obsolete stuff (#928)
ahouseholder Aug 28, 2025
2f555c8
add decision points to cover probability ranges and quantiles
ahouseholder Aug 28, 2025
c8f107e
add "near boundary" decision point
ahouseholder Aug 28, 2025
944de89
add "near boundary" decision point
ahouseholder Aug 28, 2025
12ed6e8
reverse extraneous changes
ahouseholder Aug 28, 2025
e7fb333
Merge branch 'main' of https://github.com/CERTCC/SSVC into probability
ahouseholder Aug 28, 2025
eca3ebe
add "just below" and "just above" to "near boundary"
ahouseholder Aug 28, 2025
f2aae3d
first draft of epss example docs
ahouseholder Aug 28, 2025
435660a
markdownlint --fix
ahouseholder Aug 29, 2025
b3b53f2
Add probability- and quantile-bin based decision points (#931)
ahouseholder Sep 2, 2025
65b3bff
allow base namespaces to have fragments (e.g., `ssvc#example`)
ahouseholder Sep 8, 2025
427fc16
Merge branch 'main' into epss_howto
ahouseholder Sep 8, 2025
df4e6cf
add links to EPSS at https://www.first.org/epss
ahouseholder Sep 8, 2025
45c5bdc
Bump actions/setup-python from 5 to 6
dependabot[bot] Sep 8, 2025
26e3268
Bump actions/setup-python from 5 to 6 (#935)
ahouseholder Sep 8, 2025
286a81b
Add "Using EPSS in SSVC" How-To docs (#933)
ahouseholder Sep 8, 2025
0fd6e52
Allow base namespaces to have fragments (e.g., `ssvc#example`) (#934)
ahouseholder Sep 8, 2025
efd8d88
add `invalid` and `x_invalid` as RESERVED namespaces.
ahouseholder Sep 9, 2025
55ce12b
fix #907 add reserved ns warning to docs
ahouseholder Sep 9, 2025
f229a41
resolves #908 - add explanation of `example`, `test`, and similar res…
ahouseholder Sep 9, 2025
bb54d4b
Updates to SSVC-Calculator and SSVC-Explorer
sei-vsarvepalli Sep 9, 2025
067b19b
refactor NIST-based decision point into its own namespace & fragment
ahouseholder Sep 9, 2025
59b46ab
Remove empty line
sei-vsarvepalli Sep 9, 2025
b6779f1
Remove -e in uv exported file
sei-vsarvepalli Sep 9, 2025
91890d6
Added SSVC Explorer to menu
sei-vsarvepalli Sep 9, 2025
308ea9e
added --no-editable to uv
sei-vsarvepalli Sep 9, 2025
6e6c81a
Removed extranous code for information_gain
sei-vsarvepalli Sep 9, 2025
483d129
clean up namespace extension diagram for readability
ahouseholder Sep 9, 2025
25913b7
minor edits
ahouseholder Sep 9, 2025
bd88d20
copy edit
ahouseholder Sep 9, 2025
e78c84a
copy edit
ahouseholder Sep 9, 2025
450be26
Fix for Schema Errors in Value Selection
sei-vsarvepalli Sep 9, 2025
76184cc
Updates to fix definition vs description
sei-vsarvepalli Sep 9, 2025
2bb0edc
Fixes for schema errors in Value Selection Schema
sei-vsarvepalli Sep 9, 2025
7910834
Added SSVC Calculator and fixed uv editable requirements.txt file. (#…
ahouseholder Sep 10, 2025
25637c3
Update namespace documentation (#938)
ahouseholder Sep 10, 2025
d6bc5c6
Add hyperlinks to SSVC card titles
sei-renae Sep 10, 2025
12b064d
Change heading bar height to not be too small when scrolling
sei-renae Sep 10, 2025
e2ffb44
Change heading bar height to not be too small when scrolling (#942)
ahouseholder Sep 11, 2025
2711967
Add hyperlinks to SSVC card titles (#941)
ahouseholder Sep 11, 2025
d60284f
Selection scheme error (#940)
ahouseholder Sep 11, 2025
80744e6
Fix for Issue #944
sei-vsarvepalli Sep 11, 2025
aa545b4
Fix for Issue #944 remove logging
sei-vsarvepalli Sep 11, 2025
4ac1895
add todo placeholders for #901
ahouseholder Sep 11, 2025
3356020
add first pass schema override methods (+1 squashed commit)
ahouseholder Sep 11, 2025
e7922a9
refactor filename_friendly into ssvc.utils.misc
ahouseholder Sep 11, 2025
c11c6d8
tweaking decision points schema generation in preparation for refacto…
ahouseholder Sep 11, 2025
5cccca6
pull model_json_schema up to _SchemaVersioned mixin
ahouseholder Sep 11, 2025
b46bdda
Added default namespace for trees
sei-vsarvepalli Sep 11, 2025
e1ae073
adds a `_schema_version` class var that provides a way to stash diffe…
ahouseholder Sep 11, 2025
4b69c4d
refactor how we generate schema `$id` in prep for changing `doctools.py`
ahouseholder Sep 11, 2025
8813fa8
revise doctools.py to use new _schemaVersioned mixin features.
ahouseholder Sep 11, 2025
39a26c7
remove obsoleted overrides in selection list schema generation
ahouseholder Sep 11, 2025
c00c68d
fix tests
ahouseholder Sep 11, 2025
7083284
put deprecation warning back in description of dp groups
ahouseholder Sep 11, 2025
87676eb
update deprecation warning
ahouseholder Sep 11, 2025
cd47ec7
Update misc.py
ahouseholder Sep 11, 2025
ad2ea1d
Update test_schema.py
ahouseholder Sep 11, 2025
b906d51
Bugfix 943 (#945)
sei-vsarvepalli Sep 12, 2025
1aa368e
Refactor JSON schema generation for consistency (#946)
ahouseholder Sep 12, 2025
82edff4
update workflows for uv
ahouseholder Sep 12, 2025
d920747
update workflows for uv
ahouseholder Sep 12, 2025
36939a1
Update deploy_site.yml
ahouseholder Sep 12, 2025
ce92626
Update deploy_site.yml
ahouseholder Sep 12, 2025
8537cba
fix soft links
ahouseholder Sep 12, 2025
872057d
Merge commit 'ce926265222d98a36786b2cf0b5802d234fc62f9' into use-uv-i…
ahouseholder Sep 12, 2025
b97f926
add a few explanatory question callouts in epss howtos
ahouseholder Sep 12, 2025
c932655
fix soft links
ahouseholder Sep 12, 2025
93b7ca3
add readme to explain softlinks in data/schema/v2 dir
ahouseholder Sep 12, 2025
8169c04
Improve consistency of `uv` use in worfklows (#948)
ahouseholder Sep 12, 2025
e65288e
Merge branch 'main' into update-epss-howto
ahouseholder Sep 12, 2025
fd232a0
Add a few explanatory callouts to EPSS howtos (#949)
ahouseholder Sep 12, 2025
8b7bb36
Updated files to send to pypi project format with examples
sei-vsarvepalli Sep 12, 2025
055fa15
Testing with uv.lock updated
sei-vsarvepalli Sep 13, 2025
33385b6
Updates to add ascii art to trees method
sei-vsarvepalli Sep 14, 2025
c1a20da
prefix all api routes with `/v1/` to allow future increments
ahouseholder Sep 15, 2025
a7c5f10
update docstring
ahouseholder Sep 15, 2025
af6f0ac
refactor api modules into v1 package
ahouseholder Sep 15, 2025
ce4d811
Merge branch 'main' into reference
ahouseholder Sep 15, 2025
3a51d13
add safety v2.0.1 with updated definitions that do not include HTML
ahouseholder Sep 15, 2025
263020e
update decision tables to use SI v2.0.1
ahouseholder Sep 15, 2025
74061bc
update json and csv examples
ahouseholder Sep 15, 2025
2126a60
Make value key its own column when rendering decision point examples …
ahouseholder Sep 15, 2025
b2e9b14
fix tests
ahouseholder Sep 15, 2025
edf771d
Remove HTML from Safety Decision Point value definitions (#953)
ahouseholder Sep 15, 2025
46c8dcc
Prefix all api routes with `/v1/` to allow future increments (#952)
ahouseholder Sep 15, 2025
51710ea
Make value key its own column when rendering decision point examples …
ahouseholder Sep 15, 2025
0a1ac7a
Bump tj-actions/changed-files from 46.0.5 to 47.0.0
dependabot[bot] Sep 15, 2025
f9a2825
Bump tj-actions/changed-files from 46.0.5 to 47.0.0 (#955)
ahouseholder Sep 15, 2025
ecb3835
draft ADR for SSVC project versioning
ahouseholder Sep 15, 2025
72d9dea
tighten up the project versioning ADR
ahouseholder Sep 15, 2025
ce93740
add PyPI note
ahouseholder Sep 15, 2025
6dc9231
add calver adr to index.md
ahouseholder Sep 15, 2025
7fd1697
Updated files to send to pypi project format with examples (#951)
ahouseholder Sep 15, 2025
5673bba
fix link
ahouseholder Sep 15, 2025
6e1cc93
Merge branch 'main' into calver_adr
ahouseholder Sep 15, 2025
4ae9b62
Add links from Reference/DP pages to Howto/GI pages. Add versioning t…
sei-renae Sep 15, 2025
8af1615
Add howto/GI index page
sei-renae Sep 15, 2025
3ef73ed
Reword
sei-renae Sep 15, 2025
fe2ead3
reorder pages in navigation. Gathering info should come after we intr…
ahouseholder Sep 15, 2025
8529877
add cards & icons to list
ahouseholder Sep 15, 2025
4c144a5
render the correct decision points in examples
ahouseholder Sep 15, 2025
fb459e1
Add ADR about use of CalVer for main project releases (#956)
ahouseholder Sep 15, 2025
98cc241
use pattern string instead of compiled pattern in pydantic object
ahouseholder Sep 15, 2025
fd299ab
revise pattern spec in pydantic to use the pattern string rather than…
ahouseholder Sep 15, 2025
61f2e3d
Updates and small fixes, move ascii_tree to helpers
sei-vsarvepalli Sep 15, 2025
ba10598
Use pattern string instead of compiled pattern in field_specs.py (#967)
ahouseholder Sep 16, 2025
4d1249c
Updates and small fixes, move ascii_tree to helpers (#969)
ahouseholder Sep 16, 2025
b5a0fbb
use registered example namespace for examples
ahouseholder Sep 16, 2025
bcfa1f6
regenerate/update requirements.txt
ahouseholder Sep 16, 2025
587c21a
create an Optional version of the Base class
ahouseholder Sep 16, 2025
7cfaeb3
changes to schema based on use of optional base class
ahouseholder Sep 16, 2025
2add020
Clean up examples (#970)
ahouseholder Sep 16, 2025
052a8df
try directly modifying schema
ahouseholder Sep 16, 2025
b67371b
add strip_nullable_anyof function
ahouseholder Sep 16, 2025
e41035f
refactor strip_nullable_anyof to utils.misc
ahouseholder Sep 16, 2025
0861725
create utils.schema module and refactor functions into it
ahouseholder Sep 16, 2025
1314bff
remove duplicate license comment
ahouseholder Sep 16, 2025
309dba4
remove duplicate license comment
ahouseholder Sep 16, 2025
d4dead8
Merge branch 'main' into try-834
ahouseholder Sep 16, 2025
1977b22
add / update docstrings
ahouseholder Sep 16, 2025
119830e
Merge remote-tracking branch 'gh_pub/try-834' into try-834
ahouseholder Sep 16, 2025
d1a20f4
Merge branch 'publish' into main
ahouseholder Sep 16, 2025
518eccf
set minlength on _Base fields
ahouseholder Sep 16, 2025
5eabe47
update schemas
ahouseholder Sep 16, 2025
b9c3c20
use more pydantic-native field construction
ahouseholder Sep 16, 2025
9f92378
Merge branch 'main' into try-834
ahouseholder Sep 16, 2025
a220ed4
Add `minLength` to `name` and `definition` in `SelectionList` `$defs`…
ahouseholder Sep 16, 2025
79a23b6
Fixes per github feedback
sei-renae Sep 16, 2025
6aab460
Merge branch 'main' into reference
sei-renae Sep 16, 2025
0988d95
merge main
sei-renae Sep 16, 2025
9acd01c
Fix broken link
sei-renae Sep 16, 2025
a879ddb
Change footnote citations to hyperlinks.
sei-renae Sep 17, 2025
cfacee9
refactor outcome documentation and group imports for clarity
ahouseholder Sep 17, 2025
c98abd0
refactor outcome docs into decision point docs folder since they're t…
ahouseholder Sep 17, 2025
b829b3a
rearrange the old "Learning SSVC" page back into the "overview" section
ahouseholder Sep 17, 2025
6400c98
fix links to pdfs
ahouseholder Sep 17, 2025
e924c1b
black formatter
ahouseholder Sep 17, 2025
31af4af
markdownlint --fix
ahouseholder Sep 17, 2025
e5c4fb1
Replace accidentally removed line
sei-renae Sep 17, 2025
d437264
fix broken links
ahouseholder Sep 17, 2025
55b9e9f
Requested fixes
sei-renae Sep 17, 2025
67c8a4a
Minor refactor of Outcome and Overview documentation (#972)
ahouseholder Sep 17, 2025
d4b3d61
Refactor question admonition callout box
sei-renae Sep 17, 2025
96034d6
Merge branch 'main' into reference
ahouseholder Sep 17, 2025
d99e641
Separating how-to guides ('gathering info' sections) from reference d…
ahouseholder Sep 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 6 additions & 5 deletions .github/workflows/deploy_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install uv
uv sync --project=src --no-dev

- name: Setup Pages
uses: actions/configure-pages@v5

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

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
# Upload entire repository
path: 'site'
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/link_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- .github/workflows/linkchecker.yml
# run on any PR that changes the pip requirements
- requirements.txt
- src/pyproject.toml
# let us trigger it manually
workflow_dispatch:

Expand All @@ -20,28 +21,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.12'

- 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

4 changes: 2 additions & 2 deletions .github/workflows/lint_md_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c
- uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62
id: changed-files
with:
files: '**/*.md'
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-tags: true
- name: Set up Python 3.12
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
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
# - 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,4 @@ dmypy.json
ssvc2-applier-wip.xlsx
_version.py
node_modules
tmp
69 changes: 55 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,48 +1,89 @@
# 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
.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..."
$(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..."
rm -rf data/json/decision_points
export PYTHONPATH=$(PWD)/src && ./src/ssvc/doctools.py --datadir=./data --overwrite

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 " mdlint_fix - Run markdownlint with --fix"
@echo " test - Run the tests in a local shell"
@echo " docs - Build and run the docs Docker service"
@echo " docker_test - Run the tests in a Docker container"
@echo " clean - Remove Docker containers and images"
@echo " help - 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"


22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,22 @@ The data folder contains detailed data files that define suggested prioritizatio

There are both `.csv` and `.json` files in this directory.

### `/data/csvs/*`
### `/data/csv/*`

The `.csv` files are the primary data files used by the `ssvc.py` module.
The `.csv` files are generated from the python `ssvc` module.

Also included in data are the lookup tables as csv files which `ssvc_v2.py` reads in.
These files define one row per possible path through the trees as described in the documentation.
These files define one row per possible path through the decision tables as described in the documentation.
Customizing the "outcome" column in this csv is the primary recommended way that stakeholders might adapt SSVC to their environment.

### `/data/json/*`

These json files are generated examples from the python `ssvc` module.
These json files are generated examples from the python `ssvc` module,
which uses `pydantic` to define the data models.

### `/data/schema/*` and `/data/schema_examples/*`

These json schema files are used to validate the structure of the `.json` files in `/data/json/*`.
They are generated from the python `ssvc` module, which uses `pydantic` to define the data models.
These files are used by the `ssvc-calc` module.

## `/docker/*`
Expand All @@ -85,15 +87,6 @@ These modules are used to generate documentation for various [Decision Points](h

Documentation for the `ssvc` module can be found at [https://certcc.github.io/SSVC/reference/code/](https://certcc.github.io/SSVC/reference/code/)

### `src/ssvc_v2.py`

A basic Python module for interacting with the SSVC trees. `ssvc_v2.py` has
two methods: `applier_tree()` and `developer_tree()`

The two methods just loop through their respective lookup tables until
they hit a match, then return the outcome. Maybe not the best implementation,
but it worked well enough for what was needed at the time.

## Local development

The simplest way to get started with local development is to use Docker.
Expand Down Expand Up @@ -140,7 +133,6 @@ Options for running the test suite are provided below.
| Make, ~~Docker~~ | `make test` | runs in host OS |
| ~~Make~~, ~~Docker~~ | `pytest src/test` | runs in host OS |


## Environment Variables

If you encounter a problem with the `ssvc` module not being found, you may need to set the `PYTHONPATH` environment variable.
Expand Down
1 change: 1 addition & 0 deletions data/abnf/ssvc_namespace_pattern.abnf
37 changes: 37 additions & 0 deletions data/csv/cisa/cisa_coordinator_2_0_3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
row,Exploitation v1.1.0,Automatable v2.0.0,Technical Impact v1.0.0,Mission and Well-Being Impact v1.0.0,CISA Levels v1.1.0 (cisa)
0,none,no,partial,low,track
1,none,no,partial,medium,track
2,none,no,partial,high,track
3,none,no,total,low,track
4,none,no,total,medium,track
5,none,no,total,high,track*
6,none,yes,partial,low,track
7,none,yes,partial,medium,track
8,none,yes,partial,high,attend
9,none,yes,total,low,track
10,none,yes,total,medium,track
11,none,yes,total,high,attend
12,public poc,no,partial,low,track
13,public poc,no,partial,medium,track
14,public poc,no,partial,high,track*
15,public poc,no,total,low,track
16,public poc,no,total,medium,track*
17,public poc,no,total,high,attend
18,public poc,yes,partial,low,track
19,public poc,yes,partial,medium,track
20,public poc,yes,partial,high,attend
21,public poc,yes,total,low,track
22,public poc,yes,total,medium,track*
23,public poc,yes,total,high,attend
24,active,no,partial,low,track
25,active,no,partial,medium,track
26,active,no,partial,high,attend
27,active,no,total,low,track
28,active,no,total,medium,attend
29,active,no,total,high,act
30,active,yes,partial,low,attend
31,active,yes,partial,medium,attend
32,active,yes,partial,high,act
33,active,yes,total,low,attend
34,active,yes,total,medium,act
35,active,yes,total,high,act
Loading
Loading