Skip to content

Commit 398963a

Browse files
authored
Refactor namespaces (#791)
2 parents d7bb91a + 71ae526 commit 398963a

File tree

191 files changed

+2476
-1493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+2476
-1493
lines changed

Makefile

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ MKDOCS_PORT=8765
33
DOCKER_DIR=docker
44

55
# Targets
6-
.PHONY: all test docs docker_test clean help
6+
.PHONY: all test docs docker_test clean help mdlint_fix up down regenerate_json
77

88
all: help
99

@@ -31,6 +31,11 @@ down:
3131
@echo "Stopping Docker services..."
3232
pushd $(DOCKER_DIR) && docker-compose down
3333

34+
regenerate_json:
35+
@echo "Regenerating JSON files..."
36+
rm -rf data/json/decision_points
37+
export PYTHONPATH=$(PWD)/src && ./src/ssvc/doctools.py --jsondir=./data/json/decision_points --overwrite
38+
3439
clean:
3540
@echo "Cleaning up Docker resources..."
3641
pushd $(DOCKER_DIR) && docker-compose down --rmi local || true
@@ -40,9 +45,14 @@ help:
4045
@echo ""
4146
@echo "Targets:"
4247
@echo " all - Display this help message"
43-
@echo " mdlint_fix - Run markdownlint with --fix"
44-
@echo " test - Run the tests in a local shell"
45-
@echo " docs - Build and run the docs Docker service"
46-
@echo " docker_test - Run the tests in a Docker container"
47-
@echo " clean - Remove Docker containers and images"
48-
@echo " help - Display this help message"
48+
@echo " mdlint_fix - Run markdownlint with fix"
49+
@echo " test - Run tests locally"
50+
@echo " docker_test - Run tests in Docker"
51+
@echo " docs - Build and run documentation in Docker"
52+
@echo " up - Start Docker services"
53+
@echo " down - Stop Docker services"
54+
@echo " regenerate_json - Regenerate JSON files from python modules"
55+
@echo " clean - Clean up Docker resources"
56+
@echo " help - Display this help message"
57+
58+

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Options for running the test suite are provided below.
140140
| Make, ~~Docker~~ | `make test` | runs in host OS |
141141
| ~~Make~~, ~~Docker~~ | `pytest src/test` | runs in host OS |
142142

143-
144143
## Environment Variables
145144

146145
If you encounter a problem with the `ssvc` module not being found, you may need to set the `PYTHONPATH` environment variable.

data/json/outcomes/CISA.json renamed to data/json/decision_points/cisa/cisa_levels_1_0_0.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
2-
"version": "1.0.0",
3-
"schemaVersion": "1-0-1",
42
"name": "CISA Levels",
53
"description": "The CISA outcome group. CISA uses its own SSVC decision tree model to prioritize relevant vulnerabilities into four possible decisions: Track, Track*, Attend, and Act.",
6-
"outcomes": [
4+
"namespace": "cisa",
5+
"version": "1.0.0",
6+
"schemaVersion": "1-0-1",
7+
"key": "CISA",
8+
"values": [
79
{
810
"key": "T",
911
"name": "Track",
@@ -25,4 +27,4 @@
2527
"description": "The vulnerability requires attention from the organization's internal, supervisory-level and leadership-level individuals. Necessary actions include requesting assistance or information about the vulnerability, as well as publishing a notification either internally and/or externally. Typically, internal groups would meet to determine the overall response and then execute agreed upon actions. CISA recommends remediating Act vulnerabilities as soon as possible."
2628
}
2729
]
28-
}
30+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "Mission Prevalence",
3+
"description": "Prevalence of the mission essential functions",
4+
"namespace": "cisa",
5+
"version": "1.0.0",
6+
"schemaVersion": "1-0-1",
7+
"key": "MP",
8+
"values": [
9+
{
10+
"key": "M",
11+
"name": "Minimal",
12+
"description": "Neither Support nor Essential apply. The vulnerable component may be used within the entities, but it is not used as a mission-essential component, nor does it provide impactful support to mission-essential functions."
13+
},
14+
{
15+
"key": "S",
16+
"name": "Support",
17+
"description": "The vulnerable component only supports MEFs for two or more entities."
18+
},
19+
{
20+
"key": "E",
21+
"name": "Essential",
22+
"description": "The vulnerable component directly provides capabilities that constitute at least one MEF for at least one entity; component failure may (but does not necessarily) lead to overall mission failure."
23+
}
24+
]
25+
}

data/json/decision_points/cvss/availability_impact_2_0_1.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

data/json/decision_points/cvss/confidentiality_impact_2_0_1.json

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "CVSS Qualitative Severity Rating Scale",
3+
"description": "The CVSS Qualitative Severity Rating Scale group.",
4+
"namespace": "cvss",
5+
"version": "1.0.0",
6+
"schemaVersion": "1-0-1",
7+
"key": "CVSS",
8+
"values": [
9+
{
10+
"key": "N",
11+
"name": "None",
12+
"description": "None (0.0)"
13+
},
14+
{
15+
"key": "L",
16+
"name": "Low",
17+
"description": "Low (0.1-3.9)"
18+
},
19+
{
20+
"key": "M",
21+
"name": "Medium",
22+
"description": "Medium (4.0-6.9)"
23+
},
24+
{
25+
"key": "H",
26+
"name": "High",
27+
"description": "High (7.0-8.9)"
28+
},
29+
{
30+
"key": "C",
31+
"name": "Critical",
32+
"description": "Critical (9.0-10.0)"
33+
}
34+
]
35+
}

data/json/decision_points/cvss/integrity_impact_2_0_1.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

data/json/decision_points/cvss/integrity_requirement_1_0_1.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

data/json/decision_points/cvss/modified_availability_impact_2_0_1.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)