@lornatang/dsh-codex-security 0.1.10 → 0.1.12

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.
@@ -1,766 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "codex-security://schemas/tools/scan-draft.schema.json",
4
- "title": "Codex Security semantic scan draft",
5
- "$ref": "#/$defs/scanDraftInput",
6
- "$defs": {
7
- "text": {
8
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
9
- },
10
- "textList": {
11
- "type": "array",
12
- "items": {
13
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
14
- }
15
- },
16
- "scanId": {
17
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
18
- },
19
- "handoffClaimToken": {
20
- "type": "string",
21
- "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|recovery_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
22
- },
23
- "repositoryPath": {
24
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/repositoryPath"
25
- },
26
- "location": {
27
- "type": "object",
28
- "properties": {
29
- "path": {
30
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/repositoryPath"
31
- },
32
- "startLine": { "type": "integer", "minimum": 1 },
33
- "endLine": { "type": "integer", "minimum": 1 },
34
- "role": {
35
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
36
- }
37
- },
38
- "required": ["path", "startLine"],
39
- "additionalProperties": true
40
- },
41
- "identity": {
42
- "type": "object",
43
- "properties": {
44
- "anchor": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
45
- "instance": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" }
46
- },
47
- "required": ["anchor"],
48
- "additionalProperties": true
49
- },
50
- "severity": {
51
- "type": "object",
52
- "properties": {
53
- "level": {
54
- "enum": ["critical", "high", "medium", "low", "informational"]
55
- },
56
- "score": { "type": "number", "minimum": 0, "maximum": 10 },
57
- "scoringSystem": {
58
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
59
- },
60
- "vector": {
61
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
62
- },
63
- "rationale": {
64
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
65
- },
66
- "changeConditions": {
67
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
68
- }
69
- },
70
- "required": ["level"],
71
- "additionalProperties": true
72
- },
73
- "confidence": {
74
- "type": "object",
75
- "properties": {
76
- "level": { "enum": ["high", "medium", "low"] },
77
- "rationale": {
78
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
79
- }
80
- },
81
- "required": ["level", "rationale"],
82
- "additionalProperties": true
83
- },
84
- "taxonomy": {
85
- "type": "object",
86
- "properties": {
87
- "category": {
88
- "description": "The actual primary broken security control, not a CWE identifier.",
89
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
90
- },
91
- "cwe": {
92
- "description": "Copy the reviewed candidate's exact cwe_ids array. Use an empty array when no CWE is established; do not invent one.",
93
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
94
- }
95
- },
96
- "required": ["category", "cwe"],
97
- "additionalProperties": true
98
- },
99
- "codeEvidence": {
100
- "type": "object",
101
- "properties": {
102
- "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
103
- "label": {
104
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
105
- },
106
- "path": {
107
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/repositoryPath"
108
- },
109
- "startLine": { "type": "integer", "minimum": 1 },
110
- "endLine": { "type": "integer", "minimum": 1 },
111
- "language": {
112
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
113
- },
114
- "role": {
115
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
116
- },
117
- "code": {
118
- "description": "The genuine, nonempty source snippet at this evidence location.",
119
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
120
- },
121
- "explanation": {
122
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
123
- }
124
- },
125
- "required": ["id", "label", "path", "startLine", "code", "explanation"],
126
- "additionalProperties": true
127
- },
128
- "findingAssessment": {
129
- "anyOf": [
130
- {
131
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
132
- },
133
- {
134
- "type": "object",
135
- "properties": {
136
- "level": {
137
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
138
- },
139
- "rationale": {
140
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
141
- },
142
- "why": {
143
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
144
- }
145
- },
146
- "additionalProperties": true
147
- }
148
- ]
149
- },
150
- "textOrSummary": {
151
- "anyOf": [
152
- {
153
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
154
- },
155
- {
156
- "type": "object",
157
- "properties": {
158
- "summary": {
159
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
160
- },
161
- "source": {
162
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
163
- },
164
- "sink": {
165
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
166
- },
167
- "outcome": {
168
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
169
- },
170
- "transformations": {
171
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
172
- },
173
- "evidenceRefs": {
174
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
175
- },
176
- "evidence_refs": false
177
- },
178
- "additionalProperties": true
179
- }
180
- ]
181
- },
182
- "findingReachability": {
183
- "anyOf": [
184
- {
185
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
186
- },
187
- {
188
- "type": "object",
189
- "properties": {
190
- "summary": {
191
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
192
- },
193
- "attacker": {
194
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
195
- },
196
- "entrypoint": {
197
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
198
- },
199
- "source": {
200
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
201
- },
202
- "sink": {
203
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
204
- },
205
- "outcome": {
206
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
207
- },
208
- "preconditions": {
209
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
210
- },
211
- "evidenceRefs": {
212
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
213
- },
214
- "evidence_refs": false
215
- },
216
- "additionalProperties": true
217
- }
218
- ]
219
- },
220
- "findingValidation": {
221
- "type": "object",
222
- "properties": {
223
- "assertions": {
224
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
225
- },
226
- "counterEvidence": {
227
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
228
- },
229
- "evidence": {
230
- "anyOf": [
231
- {
232
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
233
- },
234
- {
235
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
236
- }
237
- ]
238
- },
239
- "evidenceRefs": {
240
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
241
- },
242
- "evidence_refs": false,
243
- "limitations": {
244
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
245
- },
246
- "method": {
247
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
248
- },
249
- "status": {
250
- "anyOf": [
251
- {
252
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
253
- },
254
- { "type": "null" }
255
- ]
256
- },
257
- "summary": {
258
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
259
- },
260
- "disposition": {
261
- "anyOf": [
262
- {
263
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
264
- },
265
- { "type": "null" }
266
- ]
267
- },
268
- "result": {
269
- "anyOf": [
270
- {
271
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
272
- },
273
- { "type": "null" }
274
- ]
275
- }
276
- },
277
- "additionalProperties": true
278
- },
279
- "findingAttackPath": {
280
- "type": "object",
281
- "properties": {
282
- "assumptions": {
283
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
284
- },
285
- "blindspots": {
286
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
287
- },
288
- "controls": {
289
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
290
- },
291
- "dataFlow": false,
292
- "data_flow": false,
293
- "dataflow": {
294
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textOrSummary"
295
- },
296
- "evidenceRefs": {
297
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
298
- },
299
- "evidence_refs": false,
300
- "impact": {
301
- "anyOf": [
302
- {
303
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingAssessment"
304
- },
305
- { "type": "null" }
306
- ]
307
- },
308
- "likelihood": {
309
- "anyOf": [
310
- {
311
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingAssessment"
312
- },
313
- { "type": "null" }
314
- ]
315
- },
316
- "limitations": {
317
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
318
- },
319
- "preconditions": {
320
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
321
- },
322
- "reachability": {
323
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingReachability"
324
- },
325
- "steps": {
326
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
327
- },
328
- "summary": {
329
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
330
- }
331
- },
332
- "additionalProperties": true
333
- },
334
- "finding": {
335
- "type": "object",
336
- "properties": {
337
- "findingId": false,
338
- "occurrenceId": false,
339
- "fingerprints": false,
340
- "ruleId": {
341
- "type": "string",
342
- "pattern": "^[a-z0-9][a-z0-9._/-]*$",
343
- "description": "A stable lowercase vulnerability-family slug, such as prototype-pollution.json-patch; a CWE is taxonomy, not a rule ID."
344
- },
345
- "identity": {
346
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/identity"
347
- },
348
- "title": {
349
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
350
- },
351
- "summary": {
352
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
353
- },
354
- "severity": {
355
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/severity"
356
- },
357
- "confidence": {
358
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/confidence"
359
- },
360
- "taxonomy": {
361
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/taxonomy"
362
- },
363
- "locations": {
364
- "minItems": 1,
365
- "type": "array",
366
- "items": {
367
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/location"
368
- }
369
- },
370
- "writeup": {
371
- "type": "object",
372
- "properties": {
373
- "reportPath": {
374
- "type": "string",
375
- "pattern": "^findings/([a-z0-9][a-z0-9._-]*)/\\1\\.md$"
376
- }
377
- },
378
- "required": ["reportPath"],
379
- "additionalProperties": true
380
- },
381
- "codeEvidence": {
382
- "type": "array",
383
- "items": {
384
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/codeEvidence"
385
- }
386
- },
387
- "code_evidence": false,
388
- "rootCause": {
389
- "anyOf": [
390
- {
391
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
392
- },
393
- {
394
- "type": "object",
395
- "properties": {
396
- "summary": {
397
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
398
- },
399
- "code": false,
400
- "language": false,
401
- "evidenceRefs": {
402
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
403
- },
404
- "evidence_refs": false
405
- },
406
- "required": ["summary"],
407
- "additionalProperties": true
408
- }
409
- ]
410
- },
411
- "root_cause": false,
412
- "remediation": {
413
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
414
- },
415
- "validation": {
416
- "anyOf": [
417
- {
418
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingValidation"
419
- },
420
- { "type": "null" }
421
- ]
422
- },
423
- "attackPath": {
424
- "anyOf": [
425
- {
426
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingAttackPath"
427
- },
428
- { "type": "null" }
429
- ]
430
- },
431
- "remediationTests": {
432
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
433
- },
434
- "preventiveControls": {
435
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
436
- },
437
- "provenance": {
438
- "type": "object",
439
- "properties": {
440
- "sourceFindingIds": {
441
- "type": "array",
442
- "items": {
443
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
444
- },
445
- "uniqueItems": true,
446
- "description": "IDs of the Standard scan findings grouped into this Deep scan finding."
447
- },
448
- "sourceFindings": {
449
- "type": "array",
450
- "items": {
451
- "type": "object",
452
- "properties": {
453
- "id": {
454
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
455
- },
456
- "finding": {
457
- "type": "object",
458
- "properties": {},
459
- "additionalProperties": true
460
- }
461
- },
462
- "required": ["id", "finding"],
463
- "additionalProperties": false
464
- },
465
- "description": "Original Standard scan findings retained by the host."
466
- },
467
- "source": {
468
- "description": "The actual finding producer. Use local_plugin only for a finding discovered by this plugin.",
469
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
470
- }
471
- },
472
- "required": ["source"],
473
- "additionalProperties": true
474
- },
475
- "extensions": {
476
- "type": "object",
477
- "properties": {},
478
- "additionalProperties": true
479
- }
480
- },
481
- "required": [
482
- "ruleId",
483
- "title",
484
- "summary",
485
- "severity",
486
- "confidence",
487
- "taxonomy",
488
- "locations",
489
- "remediation",
490
- "provenance"
491
- ],
492
- "additionalProperties": true
493
- },
494
- "scope": {
495
- "type": "object",
496
- "properties": {
497
- "includePaths": false,
498
- "excludePaths": false,
499
- "summary": {
500
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
501
- },
502
- "artifactsReviewed": {
503
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
504
- },
505
- "runtimeStatus": {
506
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
507
- },
508
- "validationMode": {
509
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
510
- },
511
- "context": {
512
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
513
- },
514
- "limitations": {
515
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
516
- }
517
- },
518
- "additionalProperties": true
519
- },
520
- "threatModel": {
521
- "anyOf": [
522
- {
523
- "type": "object",
524
- "properties": {
525
- "summary": {
526
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
527
- },
528
- "assets": {
529
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
530
- },
531
- "trustBoundaries": {
532
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
533
- },
534
- "attackerCapabilities": {
535
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
536
- },
537
- "securityObjectives": {
538
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
539
- },
540
- "assumptions": {
541
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
542
- }
543
- },
544
- "required": ["summary"],
545
- "additionalProperties": true
546
- },
547
- {
548
- "type": "object",
549
- "properties": {
550
- "format": { "const": "markdown" },
551
- "content": {
552
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
553
- },
554
- "scope": {
555
- "type": "object",
556
- "properties": {
557
- "includePaths": {
558
- "type": "array",
559
- "items": { "type": "string", "minLength": 1 }
560
- },
561
- "excludePaths": {
562
- "type": "array",
563
- "items": { "type": "string", "minLength": 1 }
564
- },
565
- "summary": { "type": "string", "minLength": 1 }
566
- },
567
- "required": ["includePaths"],
568
- "additionalProperties": true,
569
- "description": "The modeled source scope, which may differ from the scan scope. Omit when unknown."
570
- },
571
- "origin": {
572
- "enum": ["generated", "provided", "reconciled", "recovered"]
573
- }
574
- },
575
- "required": ["format", "content"],
576
- "additionalProperties": true
577
- }
578
- ],
579
- "description": "Retained threat-model content. Existing structured models remain supported; Markdown documents preserve their complete original body."
580
- },
581
- "surface": {
582
- "type": "object",
583
- "properties": {
584
- "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
585
- "label": {
586
- "description": "The meaningful name of the reviewed security surface.",
587
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
588
- },
589
- "disposition": {
590
- "enum": [
591
- "reported",
592
- "no_issue_found",
593
- "rejected",
594
- "not_applicable",
595
- "needs_follow_up"
596
- ],
597
- "description": "The evidence-supported review result for this surface."
598
- },
599
- "receiptRefs": {
600
- "type": "array",
601
- "items": {
602
- "type": "string",
603
- "minLength": 1,
604
- "pattern": "^(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)artifacts/.+$"
605
- }
606
- },
607
- "riskArea": {
608
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
609
- },
610
- "notes": {
611
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
612
- }
613
- },
614
- "required": ["label", "disposition"],
615
- "additionalProperties": true
616
- },
617
- "reviewState": {
618
- "type": "object",
619
- "properties": {
620
- "documentType": false,
621
- "schemaVersion": false,
622
- "scanId": false,
623
- "mode": false,
624
- "includePaths": false,
625
- "excludePaths": false,
626
- "receiptRefs": false,
627
- "inventoryStrategy": false,
628
- "surfaces": {
629
- "type": "array",
630
- "items": {
631
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/surface"
632
- }
633
- },
634
- "explicitExclusions": {
635
- "type": "array",
636
- "items": {
637
- "type": "object",
638
- "properties": {
639
- "pattern": {
640
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
641
- },
642
- "reason": {
643
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
644
- }
645
- },
646
- "required": ["pattern", "reason"],
647
- "additionalProperties": true
648
- }
649
- },
650
- "deferred": {
651
- "type": "array",
652
- "items": {
653
- "type": "object",
654
- "properties": {
655
- "id": {
656
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
657
- },
658
- "candidateId": {
659
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/candidateId"
660
- },
661
- "reason": {
662
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
663
- },
664
- "paths": {
665
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
666
- },
667
- "surfaceIds": {
668
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
669
- }
670
- },
671
- "required": ["reason"],
672
- "additionalProperties": true
673
- },
674
- "description": "Each supplied id identifies one task and must be unique within this draft. Reuse saved IDs in later updates."
675
- },
676
- "resolvedDeferred": {
677
- "type": "array",
678
- "items": {
679
- "type": "object",
680
- "properties": {
681
- "id": {
682
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
683
- },
684
- "reason": {
685
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
686
- }
687
- },
688
- "required": ["id", "reason"],
689
- "additionalProperties": false
690
- },
691
- "description": "On final Standard or diff drafts, close generic tasks by saved ID and completion reason. Reuse saved surface IDs for updates. Candidate tasks need findings or dispositions; redundant closure entries for those outcomes are ignored."
692
- },
693
- "openQuestions": {
694
- "type": "array",
695
- "items": {
696
- "anyOf": [
697
- {
698
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
699
- },
700
- {
701
- "type": "object",
702
- "properties": {
703
- "question": {
704
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
705
- },
706
- "followUpPrompt": {
707
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
708
- }
709
- },
710
- "required": ["question"],
711
- "additionalProperties": true
712
- }
713
- ]
714
- }
715
- }
716
- },
717
- "required": ["surfaces", "explicitExclusions", "deferred"],
718
- "additionalProperties": true
719
- },
720
- "scanDraftInput": {
721
- "type": "object",
722
- "properties": {
723
- "complete": {
724
- "type": "boolean",
725
- "description": "Set false to save progress without declaring this worker or parent audit finished. Omit or set true only for the terminal result. Put provisional candidates in reviewState.deferred, not findings."
726
- },
727
- "scanId": {
728
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
729
- },
730
- "handoffClaimToken": {
731
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/handoffClaimToken"
732
- },
733
- "scope": {
734
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/scope"
735
- },
736
- "threatModel": {
737
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/threatModel"
738
- },
739
- "findings": {
740
- "type": "array",
741
- "items": {
742
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/finding"
743
- }
744
- },
745
- "reviewState": {
746
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/reviewState"
747
- }
748
- },
749
- "required": ["scanId", "findings", "reviewState"],
750
- "additionalProperties": false
751
- },
752
- "completedScanInput": {
753
- "type": "object",
754
- "properties": {
755
- "scanId": {
756
- "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
757
- },
758
- "handoffClaimToken": {
759
- "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/handoffClaimToken"
760
- }
761
- },
762
- "required": ["scanId"],
763
- "additionalProperties": false
764
- }
765
- }
766
- }