-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrule.schema.json
More file actions
105 lines (99 loc) · 3.31 KB
/
Copy pathrule.schema.json
File metadata and controls
105 lines (99 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://devsecblueprint.com/schema/rule.schema.json",
"title": "DSB Rule",
"type": "object",
"additionalProperties": false,
"required": [
"id", "title", "family", "phase", "capability",
"requirement", "rationale", "applicability",
"framework_mappings", "enforcement", "tooling",
"dsb_curriculum", "status"
],
"$defs": {
"atom": {
"type": "object",
"minProperties": 1,
"maxProperties": 1,
"additionalProperties": {
"oneOf": [
{ "type": ["string", "boolean", "number"] },
{
"type": "object",
"additionalProperties": false,
"properties": {
"in": { "type": "array", "minItems": 1 },
"exists": { "type": "boolean" }
},
"minProperties": 1,
"maxProperties": 1
}
]
}
}
},
"properties": {
"id": {
"type": "string",
"pattern": "^DSB-(BUILD|TEST|SCAN|DEPLOY|ID|SRC|SC|ART|IAC|EVD|EXC)-[0-9]{3}$"
},
"title": { "type": "string", "minLength": 5 },
"family": {
"type": "string",
"enum": ["BUILD", "TEST", "SCAN", "DEPLOY", "ID", "SRC", "SC", "ART", "IAC", "EVD", "EXC"]
},
"phase": {
"type": "string",
"enum": ["build", "test", "scan", "deploy", "post-deploy", "cross-cutting"]
},
"capability": { "type": "string" },
"requirement": { "type": "string", "minLength": 20 },
"rationale": { "type": "string", "minLength": 20 },
"applicability": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"all_of": { "type": "array", "items": { "$ref": "#/$defs/atom" }, "minItems": 1 },
"any_of": { "type": "array", "items": { "$ref": "#/$defs/atom" }, "minItems": 1 },
"none_of": { "type": "array", "items": { "$ref": "#/$defs/atom" }, "minItems": 1 }
}
},
"framework_mappings": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"ssdf": { "type": "array", "items": { "type": "string" } },
"slsa": { "type": "array", "items": { "type": "string" } },
"owasp_cicd": { "type": "array", "items": { "type": "string" } },
"owasp_samm": { "type": "array", "items": { "type": "string" } },
"cncf_supply_chain": { "type": "array", "items": { "type": "string" } }
}
},
"enforcement": {
"type": "object",
"additionalProperties": false,
"required": ["default_level", "automatable"],
"properties": {
"default_level": { "type": "string", "enum": ["BLOCK", "WARN", "REPORT"] },
"automatable": { "type": "boolean" },
"overridable_by": { "type": "string", "pattern": "^DSB-EXC-[0-9]{3}$" }
}
},
"tooling": {
"type": "object",
"additionalProperties": false,
"required": ["prefer_existing_tool"],
"properties": {
"examples": { "type": "array", "items": { "type": "string" } },
"prefer_existing_tool": { "type": "boolean" }
}
},
"dsb_curriculum": {
"type": "array",
"items": { "type": "string", "pattern": "^module-[0-9]+-[0-9]+$" }
},
"status": { "type": "string", "enum": ["active", "draft", "deprecated"] }
}
}