-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathfinding.schema.json
More file actions
345 lines (345 loc) · 11.2 KB
/
Copy pathfinding.schema.json
File metadata and controls
345 lines (345 loc) · 11.2 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/UnitOneAI/SecuritySkills/schemas/finding.schema.json",
"title": "SecuritySkills Normalized Finding Output",
"description": "Machine-readable envelope for normalized security findings and remediation recommendations emitted by SecuritySkills workflows. This contract is independent of SARIF and may be mapped to downstream enterprise formats later.",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "run", "skill", "findings"],
"properties": {
"schema_version": {
"const": "1.0.0",
"description": "Version of this normalized SecuritySkills finding envelope."
},
"run": {
"$ref": "#/$defs/run",
"description": "Metadata for the analysis run that produced this output."
},
"skill": {
"$ref": "#/$defs/skill",
"description": "Metadata for the SecuritySkills entrypoint that produced this output."
},
"findings": {
"type": "array",
"items": {
"$ref": "#/$defs/finding"
},
"description": "Normalized findings produced by a skill run."
}
},
"$defs": {
"riskLevel": {
"type": "string",
"enum": ["low", "medium", "high"]
},
"nonEmptyString": {
"type": "string",
"minLength": 1
},
"uriString": {
"type": "string",
"format": "uri"
},
"run": {
"type": "object",
"additionalProperties": false,
"required": ["id", "timestamp"],
"properties": {
"id": {
"$ref": "#/$defs/nonEmptyString",
"description": "Stable run identifier supplied by the agent, CI job, or enterprise orchestrator."
},
"timestamp": {
"$ref": "#/$defs/nonEmptyString",
"description": "ISO 8601 timestamp for when the run output was produced."
},
"tool": {
"$ref": "#/$defs/nonEmptyString",
"description": "Agent, CLI, scanner, or workflow that executed the skill."
},
"target": {
"$ref": "#/$defs/nonEmptyString",
"description": "Repository, project, service, artifact, environment, or other target reviewed."
},
"source_ref": {
"$ref": "#/$defs/nonEmptyString",
"description": "Optional commit SHA, branch, image digest, build ID, ticket ID, or evidence package reference."
}
}
},
"skill": {
"type": "object",
"additionalProperties": false,
"required": ["name", "version"],
"properties": {
"name": {
"$ref": "#/$defs/nonEmptyString",
"description": "SecuritySkills skill name from SKILL.md frontmatter."
},
"version": {
"$ref": "#/$defs/nonEmptyString",
"description": "SecuritySkills skill version from SKILL.md frontmatter."
},
"path": {
"$ref": "#/$defs/nonEmptyString",
"description": "Path to the SKILL.md entrypoint used for the run."
},
"frameworks": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/nonEmptyString"
},
"description": "Framework identifiers declared by the skill frontmatter."
}
}
},
"finding": {
"type": "object",
"additionalProperties": false,
"required": ["id", "title", "severity", "status", "evidence", "remediations"],
"properties": {
"id": {
"$ref": "#/$defs/nonEmptyString",
"description": "Stable finding identifier within the output."
},
"fingerprint": {
"$ref": "#/$defs/nonEmptyString",
"description": "Stable deduplication key based on finding type, affected asset, and evidence location."
},
"title": {
"$ref": "#/$defs/nonEmptyString"
},
"description": {
"$ref": "#/$defs/nonEmptyString",
"description": "What the issue is and why it matters."
},
"severity": {
"type": "string",
"enum": ["info", "low", "medium", "high", "critical"]
},
"status": {
"type": "string",
"enum": ["open", "mitigated", "accepted_risk", "false_positive"]
},
"cwe": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^CWE-[0-9]+$"
},
"description": "Optional CWE mappings, when applicable."
},
"framework_refs": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/frameworkRef"
},
"description": "Framework/control references from the skill frontmatter frameworks."
},
"references": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/reference"
},
"description": "Optional advisory, standard, vendor, or knowledge-base references."
},
"evidence": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["location", "summary"],
"properties": {
"location": {
"$ref": "#/$defs/nonEmptyString",
"description": "File path, line range, asset ID, log source, policy path, or other concrete evidence location."
},
"summary": {
"$ref": "#/$defs/nonEmptyString"
},
"artifact_type": {
"type": "string",
"enum": ["source", "config", "policy", "log", "scan_result", "cloud_resource", "identity", "network", "document", "other"]
},
"snippet": {
"$ref": "#/$defs/nonEmptyString",
"description": "Minimal redacted snippet or observation needed to support the finding."
},
"redacted": {
"type": "boolean",
"description": "True when sensitive values were intentionally removed from this evidence."
}
}
}
},
"remediations": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/remediation"
},
"description": "Every fix recommendation for this finding. Each item must include remediation guidance, confidence, blast radius, behavior-change risk, and test strategy."
}
},
"anyOf": [
{
"required": ["cwe"]
},
{
"required": ["framework_refs"]
}
]
},
"frameworkRef": {
"type": "object",
"additionalProperties": false,
"required": ["framework", "control"],
"properties": {
"framework": {
"$ref": "#/$defs/nonEmptyString"
},
"control": {
"$ref": "#/$defs/nonEmptyString"
},
"name": {
"$ref": "#/$defs/nonEmptyString"
}
}
},
"reference": {
"type": "object",
"additionalProperties": false,
"required": ["type", "id"],
"properties": {
"type": {
"type": "string",
"enum": ["cve", "cwe", "framework", "advisory", "vendor", "documentation", "other"]
},
"id": {
"$ref": "#/$defs/nonEmptyString"
},
"url": {
"$ref": "#/$defs/uriString"
}
}
},
"remediation": {
"type": "object",
"additionalProperties": false,
"required": ["guidance", "confidence", "blast_radius", "behavior_change_risk", "test_strategy"],
"properties": {
"guidance": {
"$ref": "#/$defs/nonEmptyString",
"description": "Concrete remediation steps or patch guidance for the finding."
},
"confidence": {
"$ref": "#/$defs/riskLevel",
"description": "How confident the skill is that this recommendation is correct for the observed evidence."
},
"blast_radius": {
"$ref": "#/$defs/nonEmptyString",
"description": "Expected scope of systems, files, users, integrations, data, or workflows affected by the change."
},
"behavior_change_risk": {
"$ref": "#/$defs/riskLevel",
"description": "Risk that the remediation changes intended application or operational behavior."
},
"test_strategy": {
"$ref": "#/$defs/testStrategy",
"description": "Required validation strategy proving the remediation fixes the finding. Include recommended tests, generated tests, or both."
}
}
},
"testStrategy": {
"type": "object",
"additionalProperties": false,
"required": ["summary"],
"properties": {
"summary": {
"$ref": "#/$defs/nonEmptyString",
"description": "Concise explanation of what proves the remediation fixed the issue."
},
"recommended_tests": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/recommendedTest"
},
"description": "Tests the user or agent should run when tests are not generated directly."
},
"generated_tests": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/generatedTest"
},
"description": "Test files or cases produced as part of the remediation."
}
},
"anyOf": [
{
"required": ["recommended_tests"]
},
{
"required": ["generated_tests"]
}
]
},
"recommendedTest": {
"type": "object",
"additionalProperties": false,
"required": ["name", "type", "purpose", "command", "expected_result"],
"properties": {
"name": {
"$ref": "#/$defs/nonEmptyString"
},
"type": {
"type": "string",
"enum": ["static", "unit", "integration", "e2e", "regression", "manual"]
},
"purpose": {
"$ref": "#/$defs/nonEmptyString",
"description": "Behavior, vulnerability condition, or regression this test proves."
},
"command": {
"$ref": "#/$defs/nonEmptyString",
"description": "Command or manual check to execute for this test."
},
"expected_result": {
"$ref": "#/$defs/nonEmptyString"
}
}
},
"generatedTest": {
"type": "object",
"additionalProperties": false,
"required": ["path", "type", "purpose", "command", "expected_result"],
"properties": {
"path": {
"$ref": "#/$defs/nonEmptyString",
"description": "Path to the generated or modified test file."
},
"type": {
"type": "string",
"enum": ["static", "unit", "integration", "e2e", "regression"]
},
"purpose": {
"$ref": "#/$defs/nonEmptyString",
"description": "Behavior, vulnerability condition, or regression this generated test proves."
},
"command": {
"$ref": "#/$defs/nonEmptyString",
"description": "Command that runs the generated test."
},
"expected_result": {
"$ref": "#/$defs/nonEmptyString"
}
}
}
}
}