@openai/codex-security 0.3.0 → 0.4.0

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.
Files changed (118) hide show
  1. package/_bundled_plugin/.codex-plugin/plugin.json +5 -5
  2. package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
  3. package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
  4. package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
  5. package/_bundled_plugin/mcp/permission-profile-preflight.mjs +13 -20
  6. package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
  7. package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
  8. package/_bundled_plugin/references/final-report.md +1 -1
  9. package/_bundled_plugin/schemas/coverage.schema.json +45 -126
  10. package/_bundled_plugin/schemas/findings.schema.json +140 -427
  11. package/_bundled_plugin/schemas/patch-risk-assessment.schema.json +106 -119
  12. package/_bundled_plugin/schemas/scan-manifest.schema.json +73 -188
  13. package/_bundled_plugin/scripts/finalize_scan_contract.py +7 -6
  14. package/_bundled_plugin/scripts/generate_rank_input.py +25 -106
  15. package/_bundled_plugin/scripts/report_projection.py +35 -13
  16. package/_bundled_plugin/scripts/workbench_cli.py +9 -6
  17. package/_bundled_plugin/scripts/workbench_db.py +51 -16
  18. package/_bundled_plugin/scripts/workbench_publication.py +216 -247
  19. package/_bundled_plugin/scripts/workbench_scan_usage.py +173 -10
  20. package/_bundled_plugin/scripts/workbench_validation.py +15 -1
  21. package/_bundled_plugin/shared/workbench-migrations.json +17 -0
  22. package/_bundled_plugin/skills/deep-security-scan/SKILL.md +1 -1
  23. package/_bundled_plugin/skills/deep-security-scan/agents/openai.yaml +1 -1
  24. package/_bundled_plugin/skills/security-diff-scan/agents/openai.yaml +1 -1
  25. package/_bundled_plugin/skills/security-scan/SKILL.md +1 -1
  26. package/_bundled_plugin/skills/security-scan/agents/openai.yaml +1 -1
  27. package/_bundled_plugin/skills/security-scan/references/desktop-scan.md +1 -1
  28. package/_bundled_plugin/skills/security-scan/references/scan-artifacts-and-ledger.md +2 -0
  29. package/_bundled_plugin/skills/track-findings/SKILL.md +8 -4
  30. package/_bundled_plugin/skills/track-findings/agents/openai.yaml +1 -1
  31. package/_bundled_plugin/skills/track-findings/references/github-security-advisories.md +1 -1
  32. package/dist/api.d.ts +3 -0
  33. package/dist/api.d.ts.map +1 -1
  34. package/dist/api.js +212 -3
  35. package/dist/api.js.map +1 -1
  36. package/dist/cli.d.ts.map +1 -1
  37. package/dist/cli.js +15 -5
  38. package/dist/cli.js.map +1 -1
  39. package/dist/component-plan.js +1 -1
  40. package/dist/component-plan.js.map +1 -1
  41. package/dist/component-scan.d.ts.map +1 -1
  42. package/dist/component-scan.js +5 -4
  43. package/dist/component-scan.js.map +1 -1
  44. package/dist/contract.d.ts +1 -0
  45. package/dist/contract.d.ts.map +1 -1
  46. package/dist/contract.js +4 -3
  47. package/dist/contract.js.map +1 -1
  48. package/dist/custom-validation-prompt.js +1 -1
  49. package/dist/custom-validation-prompt.js.map +1 -1
  50. package/dist/deduplication/codex-review.d.ts +1 -5
  51. package/dist/deduplication/codex-review.d.ts.map +1 -1
  52. package/dist/deduplication/codex-review.js +2 -2
  53. package/dist/deduplication/codex-review.js.map +1 -1
  54. package/dist/deduplication/deduplication-reviewer.d.ts +1 -1
  55. package/dist/deduplication/deduplication-reviewer.d.ts.map +1 -1
  56. package/dist/deduplication/deduplication-reviewer.js +1 -1
  57. package/dist/deduplication/deduplication-reviewer.js.map +1 -1
  58. package/dist/deduplication/records-protocol.d.ts +3 -8
  59. package/dist/deduplication/records-protocol.d.ts.map +1 -1
  60. package/dist/deduplication/records-protocol.js +11 -171
  61. package/dist/deduplication/records-protocol.js.map +1 -1
  62. package/dist/deep-progress.d.ts +15 -1
  63. package/dist/deep-progress.d.ts.map +1 -1
  64. package/dist/deep-progress.js +15 -16
  65. package/dist/deep-progress.js.map +1 -1
  66. package/dist/executable-path.d.ts +2 -0
  67. package/dist/executable-path.d.ts.map +1 -0
  68. package/dist/executable-path.js +12 -0
  69. package/dist/executable-path.js.map +1 -0
  70. package/dist/feedback.d.ts +1 -4
  71. package/dist/feedback.d.ts.map +1 -1
  72. package/dist/feedback.js +1 -1
  73. package/dist/feedback.js.map +1 -1
  74. package/dist/host-protocol.d.ts +19 -0
  75. package/dist/host-protocol.d.ts.map +1 -0
  76. package/dist/host-protocol.js +270 -0
  77. package/dist/host-protocol.js.map +1 -0
  78. package/dist/hosted-scan-protocol.d.ts +4 -0
  79. package/dist/hosted-scan-protocol.d.ts.map +1 -0
  80. package/dist/hosted-scan-protocol.js +25 -0
  81. package/dist/hosted-scan-protocol.js.map +1 -0
  82. package/dist/hosted-scan.d.ts +117 -0
  83. package/dist/hosted-scan.d.ts.map +1 -0
  84. package/dist/hosted-scan.js +260 -0
  85. package/dist/hosted-scan.js.map +1 -0
  86. package/dist/index.d.ts +3 -0
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +1 -0
  89. package/dist/index.js.map +1 -1
  90. package/dist/multiscan.d.ts.map +1 -1
  91. package/dist/multiscan.js +47 -9
  92. package/dist/multiscan.js.map +1 -1
  93. package/dist/publication-store.d.ts.map +1 -1
  94. package/dist/publication-store.js +73 -63
  95. package/dist/publication-store.js.map +1 -1
  96. package/dist/publication.d.ts +0 -2
  97. package/dist/publication.d.ts.map +1 -1
  98. package/dist/publication.js +0 -5
  99. package/dist/publication.js.map +1 -1
  100. package/dist/runtime.d.ts +5 -2
  101. package/dist/runtime.d.ts.map +1 -1
  102. package/dist/runtime.js +5 -38
  103. package/dist/runtime.js.map +1 -1
  104. package/dist/scan-executor.d.ts +104 -0
  105. package/dist/scan-executor.d.ts.map +1 -0
  106. package/dist/scan-executor.js +62 -0
  107. package/dist/scan-executor.js.map +1 -0
  108. package/dist/targets.d.ts.map +1 -1
  109. package/dist/targets.js +17 -25
  110. package/dist/targets.js.map +1 -1
  111. package/dist/worker-progress.d.ts +43 -11
  112. package/dist/worker-progress.d.ts.map +1 -1
  113. package/dist/worker-progress.js +21 -37
  114. package/dist/worker-progress.js.map +1 -1
  115. package/docs/cli.md +12 -2
  116. package/docs/hosted-scans.md +242 -0
  117. package/package.json +9 -7
  118. package/schemas/hosted-scan-v2.fixture.json +145 -0
@@ -1,62 +1,22 @@
1
1
  {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
2
  "$id": "https://openai.com/codex-security/schemas/findings.schema.json",
4
3
  "title": "Codex Security findings",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
5
  "type": "object",
6
- "required": [
7
- "documentType",
8
- "schemaVersion",
9
- "scanId",
10
- "findings"
11
- ],
12
6
  "properties": {
13
- "documentType": {
14
- "const": "codex-security.findings"
15
- },
16
- "schemaVersion": {
17
- "const": "1.0"
18
- },
19
- "scanId": {
20
- "type": "string",
21
- "minLength": 1
22
- },
7
+ "documentType": { "const": "codex-security.findings" },
8
+ "schemaVersion": { "const": "1.0" },
9
+ "scanId": { "type": "string", "minLength": 1 },
23
10
  "findings": {
24
11
  "type": "array",
25
12
  "items": {
26
13
  "type": "object",
27
- "required": [
28
- "findingId",
29
- "occurrenceId",
30
- "ruleId",
31
- "identity",
32
- "fingerprints",
33
- "title",
34
- "summary",
35
- "severity",
36
- "confidence",
37
- "taxonomy",
38
- "locations",
39
- "remediation",
40
- "provenance"
41
- ],
42
14
  "properties": {
43
- "findingId": {
44
- "type": "string",
45
- "pattern": "^csf_[a-f0-9]{24}$"
46
- },
47
- "occurrenceId": {
48
- "type": "string",
49
- "pattern": "^occ_[a-f0-9]{24}$"
50
- },
51
- "ruleId": {
52
- "type": "string",
53
- "pattern": "^[a-z0-9][a-z0-9._/-]*$"
54
- },
15
+ "findingId": { "type": "string", "pattern": "^csf_[a-f0-9]{24}$" },
16
+ "occurrenceId": { "type": "string", "pattern": "^occ_[a-f0-9]{24}$" },
17
+ "ruleId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
55
18
  "identity": {
56
19
  "type": "object",
57
- "required": [
58
- "anchor"
59
- ],
60
20
  "properties": {
61
21
  "anchor": {
62
22
  "type": "string",
@@ -66,151 +26,94 @@
66
26
  "type": "string",
67
27
  "pattern": "^[a-z0-9][a-z0-9._/-]*$"
68
28
  }
69
- }
29
+ },
30
+ "required": ["anchor"]
70
31
  },
71
32
  "fingerprints": {
72
33
  "type": "object",
73
- "required": [
74
- "algorithm",
75
- "primary"
76
- ],
77
34
  "properties": {
78
- "algorithm": {
79
- "const": "codex-security/v1"
80
- },
35
+ "algorithm": { "const": "codex-security/v1" },
81
36
  "primary": {
82
37
  "type": "string",
83
38
  "pattern": "^codex-security/v1:sha256:[a-f0-9]{64}$"
84
39
  }
85
- }
86
- },
87
- "title": {
88
- "type": "string",
89
- "minLength": 1
90
- },
91
- "summary": {
92
- "type": "string",
93
- "minLength": 1
40
+ },
41
+ "required": ["algorithm", "primary"]
94
42
  },
43
+ "title": { "type": "string", "minLength": 1 },
44
+ "summary": { "type": "string", "minLength": 1 },
95
45
  "severity": {
96
46
  "type": "object",
97
- "required": [
98
- "level"
99
- ],
100
47
  "properties": {
101
48
  "level": {
102
- "enum": [
103
- "critical",
104
- "high",
105
- "medium",
106
- "low",
107
- "informational"
108
- ]
109
- },
110
- "score": {
111
- "type": "number",
112
- "minimum": 0,
113
- "maximum": 10
114
- },
115
- "scoringSystem": {
116
- "type": "string",
117
- "minLength": 1
118
- },
119
- "vector": {
120
- "type": "string",
121
- "minLength": 1
122
- },
123
- "rationale": {
124
- "type": "string",
125
- "minLength": 1
126
- },
127
- "changeConditions": {
128
- "type": "string",
129
- "minLength": 1
130
- }
131
- }
49
+ "enum": ["critical", "high", "medium", "low", "informational"]
50
+ },
51
+ "score": { "type": "number", "minimum": 0, "maximum": 10 },
52
+ "scoringSystem": { "type": "string", "minLength": 1 },
53
+ "vector": { "type": "string", "minLength": 1 },
54
+ "rationale": { "type": "string", "minLength": 1 },
55
+ "changeConditions": { "type": "string", "minLength": 1 }
56
+ },
57
+ "required": ["level"]
132
58
  },
133
59
  "confidence": {
134
60
  "type": "object",
135
- "required": [
136
- "level",
137
- "rationale"
138
- ],
139
61
  "properties": {
140
- "level": {
141
- "enum": [
142
- "high",
143
- "medium",
144
- "low"
145
- ]
146
- },
147
- "rationale": {
148
- "type": "string",
149
- "minLength": 1
150
- }
151
- }
62
+ "level": { "enum": ["high", "medium", "low"] },
63
+ "rationale": { "type": "string", "minLength": 1 }
64
+ },
65
+ "required": ["level", "rationale"]
152
66
  },
153
67
  "taxonomy": {
154
68
  "type": "object",
155
- "required": [
156
- "category",
157
- "cwe"
158
- ],
159
69
  "properties": {
160
- "category": {
161
- "type": "string",
162
- "minLength": 1
163
- },
164
- "cwe": {
165
- "$ref": "#/$defs/stringList"
166
- }
167
- }
70
+ "category": { "type": "string", "minLength": 1 },
71
+ "cwe": { "$ref": "#/$defs/stringList" }
72
+ },
73
+ "required": ["category", "cwe"]
168
74
  },
169
75
  "locations": {
170
- "type": "array",
171
76
  "minItems": 1,
77
+ "type": "array",
172
78
  "items": {
173
79
  "type": "object",
174
- "required": [
175
- "path",
176
- "startLine"
177
- ],
178
80
  "properties": {
179
- "path": {
180
- "type": "string",
181
- "minLength": 1
182
- },
183
- "startLine": {
184
- "type": "integer",
185
- "minimum": 1
186
- },
187
- "endLine": {
188
- "type": "integer",
189
- "minimum": 1
190
- },
191
- "role": {
192
- "type": "string",
193
- "minLength": 1
194
- }
195
- }
81
+ "path": { "type": "string", "minLength": 1 },
82
+ "startLine": { "type": "integer", "minimum": 1 },
83
+ "endLine": { "type": "integer", "minimum": 1 },
84
+ "role": { "type": "string", "minLength": 1 }
85
+ },
86
+ "required": ["path", "startLine"]
196
87
  }
197
88
  },
198
89
  "writeup": {
199
90
  "type": "object",
200
- "required": [
201
- "reportPath"
202
- ],
203
91
  "properties": {
204
92
  "reportPath": {
205
93
  "type": "string",
206
94
  "pattern": "^findings/([a-z0-9][a-z0-9._-]*)/\\1\\.md$"
207
95
  }
208
- }
96
+ },
97
+ "required": ["reportPath"]
209
98
  },
210
99
  "codeEvidence": {
211
100
  "type": "array",
212
101
  "items": {
213
102
  "type": "object",
103
+ "properties": {
104
+ "id": {
105
+ "type": "string",
106
+ "pattern": "^[a-z0-9][a-z0-9._/-]*$"
107
+ },
108
+ "label": { "type": "string", "minLength": 1 },
109
+ "path": { "type": "string", "minLength": 1 },
110
+ "startLine": { "type": "integer", "minimum": 1 },
111
+ "endLine": { "type": "integer", "minimum": 1 },
112
+ "language": { "type": "string", "minLength": 1 },
113
+ "role": { "type": "string", "minLength": 1 },
114
+ "code": { "type": "string", "minLength": 1 },
115
+ "explanation": { "type": "string", "minLength": 1 }
116
+ },
214
117
  "required": [
215
118
  "id",
216
119
  "label",
@@ -218,237 +121,78 @@
218
121
  "startLine",
219
122
  "code",
220
123
  "explanation"
221
- ],
222
- "properties": {
223
- "id": {
224
- "type": "string",
225
- "pattern": "^[a-z0-9][a-z0-9._/-]*$"
226
- },
227
- "label": {
228
- "type": "string",
229
- "minLength": 1
230
- },
231
- "path": {
232
- "type": "string",
233
- "minLength": 1
234
- },
235
- "startLine": {
236
- "type": "integer",
237
- "minimum": 1
238
- },
239
- "endLine": {
240
- "type": "integer",
241
- "minimum": 1
242
- },
243
- "language": {
244
- "type": "string",
245
- "minLength": 1
246
- },
247
- "role": {
248
- "type": "string",
249
- "minLength": 1
250
- },
251
- "code": {
252
- "type": "string",
253
- "minLength": 1
254
- },
255
- "explanation": {
256
- "type": "string",
257
- "minLength": 1
258
- }
259
- }
124
+ ]
260
125
  }
261
126
  },
262
127
  "code_evidence": {
263
- "type": [
264
- "array",
265
- "null"
266
- ],
128
+ "type": ["array", "null"],
267
129
  "items": {
268
130
  "type": "object",
269
- "required": [
270
- "id",
271
- "code"
272
- ],
273
131
  "properties": {
274
- "id": {
275
- "type": "string",
276
- "minLength": 1
277
- },
278
- "code": {
279
- "type": "string",
280
- "minLength": 1
281
- }
282
- }
132
+ "id": { "type": "string", "minLength": 1 },
133
+ "code": { "type": "string", "minLength": 1 }
134
+ },
135
+ "required": ["id", "code"]
283
136
  }
284
137
  },
285
138
  "rootCause": {
286
- "type": [
287
- "object",
288
- "string"
289
- ],
290
- "required": [
291
- "summary"
292
- ],
139
+ "type": ["object", "string"],
293
140
  "properties": {
294
- "summary": {
295
- "type": "string",
296
- "minLength": 1
297
- },
298
- "evidenceRefs": {
299
- "$ref": "#/$defs/stringList"
300
- },
301
- "code": {
302
- "type": "string",
303
- "minLength": 1
304
- },
305
- "language": {
306
- "type": "string",
307
- "minLength": 1
308
- }
309
- }
141
+ "summary": { "type": "string", "minLength": 1 },
142
+ "evidenceRefs": { "$ref": "#/$defs/stringList" },
143
+ "code": { "type": "string", "minLength": 1 },
144
+ "language": { "type": "string", "minLength": 1 }
145
+ },
146
+ "required": ["summary"]
310
147
  },
311
148
  "root_cause": {
312
- "type": [
313
- "object",
314
- "string",
315
- "null"
316
- ],
149
+ "type": ["object", "string", "null"],
317
150
  "properties": {
318
- "summary": {
319
- "type": "string",
320
- "minLength": 1
321
- },
322
- "evidenceRefs": {
323
- "$ref": "#/$defs/stringList"
324
- },
325
- "evidence_refs": {
326
- "$ref": "#/$defs/stringList"
327
- },
328
- "code": {
329
- "type": "string",
330
- "minLength": 1
331
- },
332
- "language": {
333
- "type": "string",
334
- "minLength": 1
335
- }
151
+ "summary": { "type": "string", "minLength": 1 },
152
+ "evidenceRefs": { "$ref": "#/$defs/stringList" },
153
+ "evidence_refs": { "$ref": "#/$defs/stringList" },
154
+ "code": { "type": "string", "minLength": 1 },
155
+ "language": { "type": "string", "minLength": 1 }
336
156
  }
337
157
  },
338
- "remediation": {
339
- "type": "string",
340
- "minLength": 1
341
- },
158
+ "remediation": { "type": "string", "minLength": 1 },
342
159
  "validation": {
343
- "type": [
344
- "object",
345
- "null"
346
- ],
160
+ "type": ["object", "null"],
347
161
  "properties": {
348
- "assertions": {
349
- "$ref": "#/$defs/stringList"
350
- },
351
- "counterEvidence": {
352
- "$ref": "#/$defs/stringList"
353
- },
162
+ "assertions": { "$ref": "#/$defs/stringList" },
163
+ "counterEvidence": { "$ref": "#/$defs/stringList" },
354
164
  "evidence": {
355
- "type": [
356
- "string",
357
- "array"
358
- ],
165
+ "type": ["string", "array"],
359
166
  "minLength": 1,
360
- "items": {
361
- "type": "string",
362
- "minLength": 1
363
- }
364
- },
365
- "evidenceRefs": {
366
- "$ref": "#/$defs/stringList"
367
- },
368
- "evidence_refs": {
369
- "$ref": "#/$defs/stringList"
370
- },
371
- "limitations": {
372
- "$ref": "#/$defs/stringList"
373
- },
374
- "method": {
375
- "type": "string",
376
- "minLength": 1
377
- },
378
- "status": {
379
- "type": [
380
- "string",
381
- "null"
382
- ],
383
- "minLength": 1
384
- },
385
- "summary": {
386
- "type": "string",
387
- "minLength": 1
388
- },
389
- "disposition": {
390
- "type": [
391
- "string",
392
- "null"
393
- ],
394
- "minLength": 1
395
- },
396
- "result": {
397
- "type": [
398
- "string",
399
- "null"
400
- ],
401
- "minLength": 1
402
- }
167
+ "items": { "type": "string", "minLength": 1 }
168
+ },
169
+ "evidenceRefs": { "$ref": "#/$defs/stringList" },
170
+ "evidence_refs": { "$ref": "#/$defs/stringList" },
171
+ "limitations": { "$ref": "#/$defs/stringList" },
172
+ "method": { "type": "string", "minLength": 1 },
173
+ "status": { "type": ["string", "null"], "minLength": 1 },
174
+ "summary": { "type": "string", "minLength": 1 },
175
+ "disposition": { "type": ["string", "null"], "minLength": 1 },
176
+ "result": { "type": ["string", "null"], "minLength": 1 }
403
177
  }
404
178
  },
405
179
  "attackPath": {
406
- "type": [
407
- "object",
408
- "null"
409
- ],
180
+ "type": ["object", "null"],
410
181
  "properties": {
411
- "assumptions": {
412
- "$ref": "#/$defs/stringList"
413
- },
414
- "blindspots": {
415
- "$ref": "#/$defs/stringList"
416
- },
417
- "controls": {
418
- "$ref": "#/$defs/stringList"
419
- },
420
- "dataFlow": {
421
- "$ref": "#/$defs/dataFlow"
422
- },
423
- "data_flow": {
424
- "$ref": "#/$defs/dataFlow"
425
- },
426
- "dataflow": {
427
- "$ref": "#/$defs/dataFlow"
428
- },
429
- "evidenceRefs": {
430
- "$ref": "#/$defs/stringList"
431
- },
432
- "evidence_refs": {
433
- "$ref": "#/$defs/stringList"
434
- },
435
- "impact": {
436
- "$ref": "#/$defs/assessment"
437
- },
438
- "likelihood": {
439
- "$ref": "#/$defs/assessment"
440
- },
441
- "limitations": {
442
- "$ref": "#/$defs/stringList"
443
- },
444
- "preconditions": {
445
- "$ref": "#/$defs/stringList"
446
- },
182
+ "assumptions": { "$ref": "#/$defs/stringList" },
183
+ "blindspots": { "$ref": "#/$defs/stringList" },
184
+ "controls": { "$ref": "#/$defs/stringList" },
185
+ "dataFlow": { "$ref": "#/$defs/dataFlow" },
186
+ "data_flow": { "$ref": "#/$defs/dataFlow" },
187
+ "dataflow": { "$ref": "#/$defs/dataFlow" },
188
+ "evidenceRefs": { "$ref": "#/$defs/stringList" },
189
+ "evidence_refs": { "$ref": "#/$defs/stringList" },
190
+ "impact": { "$ref": "#/$defs/assessment" },
191
+ "likelihood": { "$ref": "#/$defs/assessment" },
192
+ "limitations": { "$ref": "#/$defs/stringList" },
193
+ "preconditions": { "$ref": "#/$defs/stringList" },
447
194
  "reachability": {
448
- "type": [
449
- "string",
450
- "object"
451
- ],
195
+ "type": ["string", "object"],
452
196
  "minLength": 1,
453
197
  "properties": {
454
198
  "summary": { "type": "string", "minLength": 1 },
@@ -457,107 +201,76 @@
457
201
  "source": { "type": "string", "minLength": 1 },
458
202
  "sink": { "type": "string", "minLength": 1 },
459
203
  "outcome": { "type": "string", "minLength": 1 },
460
- "preconditions": {
461
- "$ref": "#/$defs/stringList"
462
- },
463
- "evidenceRefs": {
464
- "$ref": "#/$defs/stringList"
465
- },
466
- "evidence_refs": {
467
- "$ref": "#/$defs/stringList"
468
- }
204
+ "preconditions": { "$ref": "#/$defs/stringList" },
205
+ "evidenceRefs": { "$ref": "#/$defs/stringList" },
206
+ "evidence_refs": { "$ref": "#/$defs/stringList" }
469
207
  }
470
208
  },
471
- "steps": {
472
- "$ref": "#/$defs/stringList"
473
- },
474
- "summary": {
475
- "type": "string",
476
- "minLength": 1
477
- }
209
+ "steps": { "$ref": "#/$defs/stringList" },
210
+ "summary": { "type": "string", "minLength": 1 }
478
211
  }
479
212
  },
480
- "remediationTests": {
481
- "$ref": "#/$defs/stringList"
482
- },
483
- "preventiveControls": {
484
- "$ref": "#/$defs/stringList"
485
- },
213
+ "remediationTests": { "$ref": "#/$defs/stringList" },
214
+ "preventiveControls": { "$ref": "#/$defs/stringList" },
486
215
  "provenance": {
487
216
  "type": "object",
488
- "required": [
489
- "source"
490
- ],
491
- "properties": {
492
- "source": {
493
- "type": "string",
494
- "minLength": 1
495
- }
496
- }
217
+ "properties": { "source": { "type": "string", "minLength": 1 } },
218
+ "required": ["source"]
497
219
  },
498
220
  "extensions": {
499
221
  "type": "object",
500
222
  "properties": {
501
- "candidateId": {
502
- "type": "string",
503
- "minLength": 1
504
- },
505
- "ledgerRowId": {
506
- "type": "string",
507
- "minLength": 1
508
- },
509
- "reportId": {
510
- "type": "string",
511
- "minLength": 1
512
- }
223
+ "candidateId": { "type": "string", "minLength": 1 },
224
+ "ledgerRowId": { "type": "string", "minLength": 1 },
225
+ "reportId": { "type": "string", "minLength": 1 }
513
226
  }
514
227
  }
515
- }
228
+ },
229
+ "required": [
230
+ "findingId",
231
+ "occurrenceId",
232
+ "ruleId",
233
+ "identity",
234
+ "fingerprints",
235
+ "title",
236
+ "summary",
237
+ "severity",
238
+ "confidence",
239
+ "taxonomy",
240
+ "locations",
241
+ "remediation",
242
+ "provenance"
243
+ ]
516
244
  }
517
245
  }
518
246
  },
247
+ "required": ["documentType", "schemaVersion", "scanId", "findings"],
519
248
  "$defs": {
249
+ "stringList": {
250
+ "type": "array",
251
+ "items": { "type": "string", "minLength": 1 }
252
+ },
520
253
  "dataFlow": {
521
- "type": [
522
- "string",
523
- "object"
524
- ],
254
+ "type": ["string", "object"],
525
255
  "minLength": 1,
526
256
  "properties": {
527
257
  "summary": { "type": "string", "minLength": 1 },
528
258
  "source": { "type": "string", "minLength": 1 },
529
259
  "sink": { "type": "string", "minLength": 1 },
530
260
  "outcome": { "type": "string", "minLength": 1 },
531
- "transformations": {
532
- "$ref": "#/$defs/stringList"
533
- },
534
- "evidenceRefs": {
535
- "$ref": "#/$defs/stringList"
536
- },
537
- "evidence_refs": {
538
- "$ref": "#/$defs/stringList"
539
- }
261
+ "transformations": { "$ref": "#/$defs/stringList" },
262
+ "evidenceRefs": { "$ref": "#/$defs/stringList" },
263
+ "evidence_refs": { "$ref": "#/$defs/stringList" }
540
264
  }
541
265
  },
542
266
  "assessment": {
543
- "type": [
544
- "string",
545
- "object",
546
- "null"
547
- ],
267
+ "type": ["string", "object", "null"],
548
268
  "minLength": 1,
549
269
  "properties": {
550
270
  "level": { "type": "string", "minLength": 1 },
551
271
  "rationale": { "type": "string", "minLength": 1 },
552
272
  "why": { "type": "string", "minLength": 1 }
553
273
  }
554
- },
555
- "stringList": {
556
- "type": "array",
557
- "items": {
558
- "type": "string",
559
- "minLength": 1
560
- }
561
274
  }
562
275
  }
563
276
  }