reqthread 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:evidence-bundle:schema:cause-file:0.2.0",
4
+ "title": "Cause file front matter (*.cause.md)",
5
+ "description": "One cause per file: an STPA unsafe control action or an FMEA failure mode that leads to one or more hazards.",
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "type",
10
+ "hazards",
11
+ "status"
12
+ ],
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "id": {
16
+ "$ref": "#/$defs/key"
17
+ },
18
+ "type": {
19
+ "enum": [
20
+ "uca",
21
+ "failure_mode"
22
+ ]
23
+ },
24
+ "hazards": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "items": {
28
+ "$ref": "#/$defs/key"
29
+ },
30
+ "uniqueItems": true
31
+ },
32
+ "component": {
33
+ "$ref": "#/$defs/key",
34
+ "description": "Architecture element key where the cause originates."
35
+ },
36
+ "accepted": {
37
+ "type": "object",
38
+ "description": "Residual-risk acceptance for a cause with no mitigating requirement.",
39
+ "required": [
40
+ "justification",
41
+ "approved_by",
42
+ "approved_at"
43
+ ],
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "justification": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "approved_by": {
51
+ "type": "string",
52
+ "description": "Person id from the config, without the person: prefix."
53
+ },
54
+ "approved_at": {
55
+ "type": "string",
56
+ "format": "date-time"
57
+ }
58
+ }
59
+ },
60
+ "status": {
61
+ "enum": [
62
+ "draft",
63
+ "approved",
64
+ "retired"
65
+ ]
66
+ }
67
+ },
68
+ "$defs": {
69
+ "key": {
70
+ "type": "string",
71
+ "pattern": "^[A-Z][A-Z0-9]*-[A-Z0-9][A-Z0-9._-]*$"
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,368 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:evidence-bundle:schema:config:0.1.0",
4
+ "title": "Project configuration",
5
+ "description": "Paths are relative to the directory containing the config file.",
6
+ "type": "object",
7
+ "required": [
8
+ "version",
9
+ "project",
10
+ "standard",
11
+ "requirements"
12
+ ],
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "version": {
16
+ "const": 1
17
+ },
18
+ "project": {
19
+ "type": "object",
20
+ "required": [
21
+ "id",
22
+ "name",
23
+ "integrity_claim"
24
+ ],
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "id": {
28
+ "type": "string",
29
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
30
+ },
31
+ "name": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "integrity_claim": {
36
+ "type": "string"
37
+ }
38
+ }
39
+ },
40
+ "standard": {
41
+ "type": "string",
42
+ "description": "Path to the standard-data YAML."
43
+ },
44
+ "requirements": {
45
+ "$ref": "#/$defs/item_dirs"
46
+ },
47
+ "architecture": {
48
+ "$ref": "#/$defs/item_dirs"
49
+ },
50
+ "design": {
51
+ "$ref": "#/$defs/item_dirs"
52
+ },
53
+ "sources": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "object",
57
+ "required": [
58
+ "glob",
59
+ "language"
60
+ ],
61
+ "additionalProperties": false,
62
+ "properties": {
63
+ "glob": {
64
+ "type": "string"
65
+ },
66
+ "language": {
67
+ "enum": [
68
+ "c",
69
+ "cpp",
70
+ "python"
71
+ ]
72
+ }
73
+ }
74
+ }
75
+ },
76
+ "tests": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "required": [
81
+ "glob",
82
+ "language",
83
+ "level"
84
+ ],
85
+ "additionalProperties": false,
86
+ "properties": {
87
+ "glob": {
88
+ "type": "string"
89
+ },
90
+ "language": {
91
+ "enum": [
92
+ "c",
93
+ "cpp",
94
+ "python"
95
+ ]
96
+ },
97
+ "level": {
98
+ "type": "string",
99
+ "description": "Test level id from the standard data."
100
+ }
101
+ }
102
+ }
103
+ },
104
+ "environments": {
105
+ "type": "array",
106
+ "items": {
107
+ "type": "object",
108
+ "required": [
109
+ "id",
110
+ "name",
111
+ "env_type"
112
+ ],
113
+ "additionalProperties": false,
114
+ "properties": {
115
+ "id": {
116
+ "type": "string",
117
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
118
+ },
119
+ "name": {
120
+ "type": "string"
121
+ },
122
+ "env_type": {
123
+ "enum": [
124
+ "host",
125
+ "simulator",
126
+ "target"
127
+ ]
128
+ },
129
+ "board": {
130
+ "type": "string"
131
+ },
132
+ "description": {
133
+ "type": "string"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "ingest": {
139
+ "type": "array",
140
+ "items": {
141
+ "type": "object",
142
+ "required": [
143
+ "type",
144
+ "path",
145
+ "section"
146
+ ],
147
+ "additionalProperties": false,
148
+ "properties": {
149
+ "type": {
150
+ "enum": [
151
+ "junit",
152
+ "lcov",
153
+ "cobertura",
154
+ "sarif"
155
+ ]
156
+ },
157
+ "path": {
158
+ "type": "string"
159
+ },
160
+ "section": {
161
+ "type": "string",
162
+ "description": "Package section id this input is filed under."
163
+ },
164
+ "environment": {
165
+ "type": "string",
166
+ "description": "Environment id; required for junit, lcov, cobertura."
167
+ },
168
+ "test_level": {
169
+ "type": "string",
170
+ "description": "Test level id; required for lcov and cobertura."
171
+ },
172
+ "optional": {
173
+ "type": "boolean",
174
+ "description": "Skip silently if the file is absent."
175
+ }
176
+ },
177
+ "allOf": [
178
+ {
179
+ "if": {
180
+ "properties": {
181
+ "type": {
182
+ "enum": [
183
+ "junit",
184
+ "lcov",
185
+ "cobertura"
186
+ ]
187
+ }
188
+ }
189
+ },
190
+ "then": {
191
+ "required": [
192
+ "environment"
193
+ ]
194
+ }
195
+ },
196
+ {
197
+ "if": {
198
+ "properties": {
199
+ "type": {
200
+ "enum": [
201
+ "lcov",
202
+ "cobertura"
203
+ ]
204
+ }
205
+ }
206
+ },
207
+ "then": {
208
+ "required": [
209
+ "test_level"
210
+ ]
211
+ }
212
+ }
213
+ ]
214
+ }
215
+ },
216
+ "deviations": {
217
+ "type": "object",
218
+ "required": [
219
+ "path",
220
+ "section"
221
+ ],
222
+ "additionalProperties": false,
223
+ "properties": {
224
+ "path": {
225
+ "type": "string"
226
+ },
227
+ "section": {
228
+ "type": "string"
229
+ }
230
+ }
231
+ },
232
+ "people": {
233
+ "type": "array",
234
+ "items": {
235
+ "type": "object",
236
+ "required": [
237
+ "id",
238
+ "name",
239
+ "roles"
240
+ ],
241
+ "additionalProperties": false,
242
+ "properties": {
243
+ "id": {
244
+ "type": "string",
245
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
246
+ },
247
+ "name": {
248
+ "type": "string"
249
+ },
250
+ "roles": {
251
+ "type": "array",
252
+ "items": {
253
+ "type": "string"
254
+ }
255
+ },
256
+ "competence_record": {
257
+ "type": "string"
258
+ }
259
+ }
260
+ }
261
+ },
262
+ "tools": {
263
+ "type": "array",
264
+ "items": {
265
+ "type": "object",
266
+ "required": [
267
+ "id",
268
+ "name",
269
+ "version",
270
+ "class"
271
+ ],
272
+ "additionalProperties": false,
273
+ "properties": {
274
+ "id": {
275
+ "type": "string",
276
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
277
+ },
278
+ "name": {
279
+ "type": "string"
280
+ },
281
+ "version": {
282
+ "type": "string"
283
+ },
284
+ "class": {
285
+ "type": [
286
+ "string",
287
+ "null"
288
+ ]
289
+ },
290
+ "evidence": {
291
+ "type": "array",
292
+ "items": {
293
+ "type": "string"
294
+ }
295
+ }
296
+ }
297
+ }
298
+ },
299
+ "preexisting": {
300
+ "type": "array",
301
+ "items": {
302
+ "type": "object",
303
+ "required": [
304
+ "id",
305
+ "name",
306
+ "version",
307
+ "route"
308
+ ],
309
+ "additionalProperties": false,
310
+ "properties": {
311
+ "id": {
312
+ "type": "string",
313
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
314
+ },
315
+ "name": {
316
+ "type": "string"
317
+ },
318
+ "version": {
319
+ "type": "string"
320
+ },
321
+ "origin": {
322
+ "type": "string"
323
+ },
324
+ "route": {
325
+ "type": [
326
+ "string",
327
+ "null"
328
+ ]
329
+ },
330
+ "justification": {
331
+ "type": "array",
332
+ "items": {
333
+ "type": "string"
334
+ }
335
+ }
336
+ }
337
+ }
338
+ },
339
+ "hazards": {
340
+ "$ref": "#/$defs/item_dirs"
341
+ },
342
+ "causes": {
343
+ "$ref": "#/$defs/item_dirs"
344
+ }
345
+ },
346
+ "$defs": {
347
+ "item_dirs": {
348
+ "type": "object",
349
+ "required": [
350
+ "paths",
351
+ "section"
352
+ ],
353
+ "additionalProperties": false,
354
+ "properties": {
355
+ "paths": {
356
+ "type": "array",
357
+ "minItems": 1,
358
+ "items": {
359
+ "type": "string"
360
+ }
361
+ },
362
+ "section": {
363
+ "type": "string"
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:evidence-bundle:schema:design-file:0.1.0",
4
+ "title": "Design element file front matter (*.design.md)",
5
+ "type": "object",
6
+ "required": ["id"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "id": { "$ref": "#/$defs/key" },
10
+ "derives_from": { "$ref": "#/$defs/keys", "description": "Architecture element keys." },
11
+ "satisfies": { "$ref": "#/$defs/keys", "description": "Requirement keys." }
12
+ },
13
+ "$defs": {
14
+ "key": { "type": "string", "pattern": "^[A-Z][A-Z0-9]*-[A-Z0-9][A-Z0-9._-]*$" },
15
+ "keys": { "type": "array", "items": { "$ref": "#/$defs/key" }, "uniqueItems": true }
16
+ }
17
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:evidence-bundle:schema:deviations-file:0.1.0",
4
+ "title": "Deviation register",
5
+ "type": "array",
6
+ "items": {
7
+ "type": "object",
8
+ "required": ["key", "match", "justification", "approved_by", "approved_at", "expires_at"],
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "key": { "type": "string", "pattern": "^[A-Z][A-Z0-9]*-[A-Z0-9][A-Z0-9._-]*$" },
12
+ "match": {
13
+ "type": "object",
14
+ "description": "Which findings this deviation covers. Omitted fields match anything; at least tool and rule are required.",
15
+ "required": ["tool", "rule"],
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "tool": { "type": "string" },
19
+ "rule": { "type": "string" },
20
+ "path": { "type": "string" },
21
+ "line": { "type": "integer", "minimum": 1 },
22
+ "fingerprint": { "type": "string" }
23
+ }
24
+ },
25
+ "justification": { "type": "string", "minLength": 1 },
26
+ "scope": { "type": "string" },
27
+ "approved_by": { "type": "string", "description": "Person id from the config, without the person: prefix." },
28
+ "approved_at": { "type": "string", "format": "date-time" },
29
+ "expires_at": { "type": ["string", "null"], "format": "date" }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:evidence-bundle:schema:hazard-file:0.2.0",
4
+ "title": "Hazard file front matter (*.hazard.md)",
5
+ "description": "One hazard per file: a system-level condition that can lead to harm. The first H1 is the title; the body is the description.",
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "status"
10
+ ],
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "id": {
14
+ "type": "string",
15
+ "pattern": "^[A-Z][A-Z0-9]*-[A-Z0-9][A-Z0-9._-]*$"
16
+ },
17
+ "severity": {
18
+ "type": "string",
19
+ "description": "Free text or an id from the standard data's severity scale, if it has one."
20
+ },
21
+ "status": {
22
+ "enum": [
23
+ "draft",
24
+ "approved",
25
+ "retired"
26
+ ]
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:evidence-bundle:schema:requirement-file:0.1.0",
4
+ "title": "Requirement file front matter",
5
+ "description": "YAML front matter of a *.req.md file. The first H1 of the body is the title; body text up to an optional '## Rationale' heading is the requirement text.",
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "level",
10
+ "type",
11
+ "status"
12
+ ],
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "id": {
16
+ "$ref": "#/$defs/key"
17
+ },
18
+ "level": {
19
+ "enum": [
20
+ "system",
21
+ "software",
22
+ "derived"
23
+ ]
24
+ },
25
+ "type": {
26
+ "enum": [
27
+ "functional",
28
+ "integrity"
29
+ ]
30
+ },
31
+ "integrity_level": {
32
+ "type": "string"
33
+ },
34
+ "derives_from": {
35
+ "$ref": "#/$defs/keys"
36
+ },
37
+ "allocated_to": {
38
+ "$ref": "#/$defs/keys"
39
+ },
40
+ "supersedes": {
41
+ "$ref": "#/$defs/keys"
42
+ },
43
+ "verification": {
44
+ "type": "array",
45
+ "items": {
46
+ "enum": [
47
+ "test",
48
+ "analysis",
49
+ "review",
50
+ "inspection",
51
+ "demonstration"
52
+ ]
53
+ },
54
+ "uniqueItems": true
55
+ },
56
+ "test_levels": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "string"
60
+ },
61
+ "uniqueItems": true
62
+ },
63
+ "status": {
64
+ "enum": [
65
+ "draft",
66
+ "approved",
67
+ "retired"
68
+ ]
69
+ },
70
+ "mitigates": {
71
+ "$ref": "#/$defs/keys",
72
+ "description": "Hazard or cause keys this requirement mitigates."
73
+ }
74
+ },
75
+ "$defs": {
76
+ "key": {
77
+ "type": "string",
78
+ "pattern": "^[A-Z][A-Z0-9]*-[A-Z0-9][A-Z0-9._-]*$"
79
+ },
80
+ "keys": {
81
+ "type": "array",
82
+ "items": {
83
+ "$ref": "#/$defs/key"
84
+ },
85
+ "uniqueItems": true
86
+ }
87
+ }
88
+ }