@openai/codex-security 0.1.14 → 0.1.15

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 (98) hide show
  1. package/README.md +74 -19
  2. package/_bundled_plugin/.app.json +5 -0
  3. package/_bundled_plugin/.codex-plugin/plugin.json +1 -1
  4. package/_bundled_plugin/examples/completed-scan/report.md +96 -0
  5. package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
  6. package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
  7. package/_bundled_plugin/references/config-preflight.md +5 -1
  8. package/_bundled_plugin/references/core-scan.md +6 -15
  9. package/_bundled_plugin/references/final-report.md +1 -1
  10. package/_bundled_plugin/references/scan-artifacts.md +1 -1
  11. package/_bundled_plugin/references/threat-model.md +64 -0
  12. package/_bundled_plugin/schemas/findings.schema.json +327 -2
  13. package/_bundled_plugin/schemas/tools/scan-draft.schema.json +286 -4
  14. package/_bundled_plugin/scripts/config_preflight.py +20 -1
  15. package/_bundled_plugin/scripts/deep_scan_workbench.py +12 -6
  16. package/_bundled_plugin/scripts/finalize_scan_contract.py +322 -33
  17. package/_bundled_plugin/scripts/finding_preview.py +81 -19
  18. package/_bundled_plugin/scripts/report_projection.py +253 -33
  19. package/_bundled_plugin/scripts/validate_scan_contract.py +5 -2
  20. package/_bundled_plugin/scripts/workbench_cli.py +7 -1
  21. package/_bundled_plugin/scripts/workbench_remediation.py +2 -0
  22. package/_bundled_plugin/skills/deep-security-scan/SKILL.md +4 -0
  23. package/_bundled_plugin/skills/security-diff-scan/SKILL.md +2 -2
  24. package/_bundled_plugin/skills/security-scan/SKILL.md +1 -1
  25. package/_bundled_plugin/skills/threat-model/SKILL.md +6 -49
  26. package/dist/api.d.ts +5 -73
  27. package/dist/api.d.ts.map +1 -1
  28. package/dist/api.js +259 -209
  29. package/dist/api.js.map +1 -1
  30. package/dist/bulk-scan-discovery.d.ts +3 -3
  31. package/dist/bulk-scan-discovery.d.ts.map +1 -1
  32. package/dist/bulk-scan-discovery.js +8 -7
  33. package/dist/bulk-scan-discovery.js.map +1 -1
  34. package/dist/cli.d.ts +18 -2
  35. package/dist/cli.d.ts.map +1 -1
  36. package/dist/cli.js +782 -120
  37. package/dist/cli.js.map +1 -1
  38. package/dist/codex-prompt.d.ts +4 -0
  39. package/dist/codex-prompt.d.ts.map +1 -0
  40. package/dist/codex-prompt.js +14 -0
  41. package/dist/codex-prompt.js.map +1 -0
  42. package/dist/contract.d.ts.map +1 -1
  43. package/dist/contract.js +198 -2
  44. package/dist/contract.js.map +1 -1
  45. package/dist/cost.d.ts +7 -0
  46. package/dist/cost.d.ts.map +1 -1
  47. package/dist/cost.js +68 -47
  48. package/dist/cost.js.map +1 -1
  49. package/dist/errors.d.ts +4 -0
  50. package/dist/errors.d.ts.map +1 -1
  51. package/dist/errors.js +9 -0
  52. package/dist/errors.js.map +1 -1
  53. package/dist/index.d.ts +2 -2
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +1 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/linear.d.ts +19 -0
  58. package/dist/linear.d.ts.map +1 -0
  59. package/dist/linear.js +106 -0
  60. package/dist/linear.js.map +1 -0
  61. package/dist/models.d.ts +89 -2
  62. package/dist/models.d.ts.map +1 -1
  63. package/dist/models.js.map +1 -1
  64. package/dist/multiscan.d.ts.map +1 -1
  65. package/dist/multiscan.js +7 -6
  66. package/dist/multiscan.js.map +1 -1
  67. package/dist/patch-tui.d.ts +28 -0
  68. package/dist/patch-tui.d.ts.map +1 -0
  69. package/dist/patch-tui.js +384 -0
  70. package/dist/patch-tui.js.map +1 -0
  71. package/dist/publish.d.ts +2 -2
  72. package/dist/publish.d.ts.map +1 -1
  73. package/dist/publish.js +4 -8
  74. package/dist/publish.js.map +1 -1
  75. package/dist/runtime.d.ts +10 -7
  76. package/dist/runtime.d.ts.map +1 -1
  77. package/dist/runtime.js +63 -35
  78. package/dist/runtime.js.map +1 -1
  79. package/dist/scan-comparison.d.ts +2 -1
  80. package/dist/scan-comparison.d.ts.map +1 -1
  81. package/dist/scan-comparison.js +17 -15
  82. package/dist/scan-comparison.js.map +1 -1
  83. package/dist/scan-dashboard.d.ts +2 -1
  84. package/dist/scan-dashboard.d.ts.map +1 -1
  85. package/dist/scan-dashboard.js +219 -11
  86. package/dist/scan-dashboard.js.map +1 -1
  87. package/dist/targets.d.ts +1 -0
  88. package/dist/targets.d.ts.map +1 -1
  89. package/dist/targets.js +4 -2
  90. package/dist/targets.js.map +1 -1
  91. package/dist/trusted-executable.d.ts.map +1 -1
  92. package/dist/trusted-executable.js +26 -11
  93. package/dist/trusted-executable.js.map +1 -1
  94. package/dist/version.d.ts +1 -1
  95. package/dist/version.js +1 -1
  96. package/dist/version.js.map +1 -1
  97. package/package.json +7 -3
  98. package/_bundled_plugin/skills/threat-model/references/threat-model-guidance.md +0 -48
@@ -263,6 +263,29 @@
263
263
  }
264
264
  }
265
265
  },
266
+ "code_evidence": {
267
+ "type": [
268
+ "array",
269
+ "null"
270
+ ],
271
+ "items": {
272
+ "type": "object",
273
+ "required": [
274
+ "id",
275
+ "code"
276
+ ],
277
+ "properties": {
278
+ "id": {
279
+ "type": "string",
280
+ "minLength": 1
281
+ },
282
+ "code": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ }
286
+ }
287
+ }
288
+ },
266
289
  "rootCause": {
267
290
  "type": [
268
291
  "object",
@@ -293,6 +316,41 @@
293
316
  }
294
317
  }
295
318
  },
319
+ "root_cause": {
320
+ "type": [
321
+ "object",
322
+ "string",
323
+ "null"
324
+ ],
325
+ "properties": {
326
+ "summary": {
327
+ "type": "string",
328
+ "minLength": 1
329
+ },
330
+ "evidenceRefs": {
331
+ "type": "array",
332
+ "items": {
333
+ "type": "string",
334
+ "minLength": 1
335
+ }
336
+ },
337
+ "evidence_refs": {
338
+ "type": "array",
339
+ "items": {
340
+ "type": "string",
341
+ "minLength": 1
342
+ }
343
+ },
344
+ "code": {
345
+ "type": "string",
346
+ "minLength": 1
347
+ },
348
+ "language": {
349
+ "type": "string",
350
+ "minLength": 1
351
+ }
352
+ }
353
+ },
296
354
  "remediation": {
297
355
  "type": "string",
298
356
  "minLength": 1
@@ -301,13 +359,280 @@
301
359
  "type": [
302
360
  "object",
303
361
  "null"
304
- ]
362
+ ],
363
+ "properties": {
364
+ "assertions": {
365
+ "type": "array",
366
+ "items": {
367
+ "type": "string",
368
+ "minLength": 1
369
+ }
370
+ },
371
+ "counterEvidence": {
372
+ "type": "array",
373
+ "items": {
374
+ "type": "string",
375
+ "minLength": 1
376
+ }
377
+ },
378
+ "evidence": {
379
+ "type": [
380
+ "string",
381
+ "array"
382
+ ],
383
+ "minLength": 1,
384
+ "items": {
385
+ "type": "string",
386
+ "minLength": 1
387
+ }
388
+ },
389
+ "evidenceRefs": {
390
+ "type": "array",
391
+ "items": {
392
+ "type": "string",
393
+ "minLength": 1
394
+ }
395
+ },
396
+ "evidence_refs": {
397
+ "type": "array",
398
+ "items": {
399
+ "type": "string",
400
+ "minLength": 1
401
+ }
402
+ },
403
+ "limitations": {
404
+ "type": "array",
405
+ "items": {
406
+ "type": "string",
407
+ "minLength": 1
408
+ }
409
+ },
410
+ "method": {
411
+ "type": "string",
412
+ "minLength": 1
413
+ },
414
+ "status": {
415
+ "type": [
416
+ "string",
417
+ "null"
418
+ ],
419
+ "minLength": 1
420
+ },
421
+ "summary": {
422
+ "type": "string",
423
+ "minLength": 1
424
+ },
425
+ "disposition": {
426
+ "type": [
427
+ "string",
428
+ "null"
429
+ ],
430
+ "minLength": 1
431
+ },
432
+ "result": {
433
+ "type": [
434
+ "string",
435
+ "null"
436
+ ],
437
+ "minLength": 1
438
+ }
439
+ }
305
440
  },
306
441
  "attackPath": {
307
442
  "type": [
308
443
  "object",
309
444
  "null"
310
- ]
445
+ ],
446
+ "properties": {
447
+ "assumptions": {
448
+ "type": "array",
449
+ "items": {
450
+ "type": "string",
451
+ "minLength": 1
452
+ }
453
+ },
454
+ "blindspots": {
455
+ "type": "array",
456
+ "items": {
457
+ "type": "string",
458
+ "minLength": 1
459
+ }
460
+ },
461
+ "controls": {
462
+ "type": "array",
463
+ "items": {
464
+ "type": "string",
465
+ "minLength": 1
466
+ }
467
+ },
468
+ "dataFlow": {
469
+ "type": [
470
+ "string",
471
+ "object"
472
+ ],
473
+ "minLength": 1,
474
+ "properties": {
475
+ "summary": { "type": "string", "minLength": 1 },
476
+ "source": { "type": "string", "minLength": 1 },
477
+ "sink": { "type": "string", "minLength": 1 },
478
+ "outcome": { "type": "string", "minLength": 1 },
479
+ "transformations": {
480
+ "type": "array",
481
+ "items": { "type": "string", "minLength": 1 }
482
+ },
483
+ "evidenceRefs": {
484
+ "type": "array",
485
+ "items": { "type": "string", "minLength": 1 }
486
+ },
487
+ "evidence_refs": {
488
+ "type": "array",
489
+ "items": { "type": "string", "minLength": 1 }
490
+ }
491
+ }
492
+ },
493
+ "data_flow": {
494
+ "type": [
495
+ "string",
496
+ "object"
497
+ ],
498
+ "minLength": 1,
499
+ "properties": {
500
+ "summary": { "type": "string", "minLength": 1 },
501
+ "source": { "type": "string", "minLength": 1 },
502
+ "sink": { "type": "string", "minLength": 1 },
503
+ "outcome": { "type": "string", "minLength": 1 },
504
+ "transformations": {
505
+ "type": "array",
506
+ "items": { "type": "string", "minLength": 1 }
507
+ },
508
+ "evidenceRefs": {
509
+ "type": "array",
510
+ "items": { "type": "string", "minLength": 1 }
511
+ },
512
+ "evidence_refs": {
513
+ "type": "array",
514
+ "items": { "type": "string", "minLength": 1 }
515
+ }
516
+ }
517
+ },
518
+ "dataflow": {
519
+ "type": [
520
+ "string",
521
+ "object"
522
+ ],
523
+ "minLength": 1,
524
+ "properties": {
525
+ "summary": { "type": "string", "minLength": 1 },
526
+ "source": { "type": "string", "minLength": 1 },
527
+ "sink": { "type": "string", "minLength": 1 },
528
+ "outcome": { "type": "string", "minLength": 1 },
529
+ "transformations": {
530
+ "type": "array",
531
+ "items": { "type": "string", "minLength": 1 }
532
+ },
533
+ "evidenceRefs": {
534
+ "type": "array",
535
+ "items": { "type": "string", "minLength": 1 }
536
+ },
537
+ "evidence_refs": {
538
+ "type": "array",
539
+ "items": { "type": "string", "minLength": 1 }
540
+ }
541
+ }
542
+ },
543
+ "evidenceRefs": {
544
+ "type": "array",
545
+ "items": {
546
+ "type": "string",
547
+ "minLength": 1
548
+ }
549
+ },
550
+ "evidence_refs": {
551
+ "type": "array",
552
+ "items": {
553
+ "type": "string",
554
+ "minLength": 1
555
+ }
556
+ },
557
+ "impact": {
558
+ "type": [
559
+ "string",
560
+ "object",
561
+ "null"
562
+ ],
563
+ "minLength": 1,
564
+ "properties": {
565
+ "level": { "type": "string", "minLength": 1 },
566
+ "rationale": { "type": "string", "minLength": 1 },
567
+ "why": { "type": "string", "minLength": 1 }
568
+ }
569
+ },
570
+ "likelihood": {
571
+ "type": [
572
+ "string",
573
+ "object",
574
+ "null"
575
+ ],
576
+ "minLength": 1,
577
+ "properties": {
578
+ "level": { "type": "string", "minLength": 1 },
579
+ "rationale": { "type": "string", "minLength": 1 },
580
+ "why": { "type": "string", "minLength": 1 }
581
+ }
582
+ },
583
+ "limitations": {
584
+ "type": "array",
585
+ "items": {
586
+ "type": "string",
587
+ "minLength": 1
588
+ }
589
+ },
590
+ "preconditions": {
591
+ "type": "array",
592
+ "items": {
593
+ "type": "string",
594
+ "minLength": 1
595
+ }
596
+ },
597
+ "reachability": {
598
+ "type": [
599
+ "string",
600
+ "object"
601
+ ],
602
+ "minLength": 1,
603
+ "properties": {
604
+ "summary": { "type": "string", "minLength": 1 },
605
+ "attacker": { "type": "string", "minLength": 1 },
606
+ "entrypoint": { "type": "string", "minLength": 1 },
607
+ "source": { "type": "string", "minLength": 1 },
608
+ "sink": { "type": "string", "minLength": 1 },
609
+ "outcome": { "type": "string", "minLength": 1 },
610
+ "preconditions": {
611
+ "type": "array",
612
+ "items": { "type": "string", "minLength": 1 }
613
+ },
614
+ "evidenceRefs": {
615
+ "type": "array",
616
+ "items": { "type": "string", "minLength": 1 }
617
+ },
618
+ "evidence_refs": {
619
+ "type": "array",
620
+ "items": { "type": "string", "minLength": 1 }
621
+ }
622
+ }
623
+ },
624
+ "steps": {
625
+ "type": "array",
626
+ "items": {
627
+ "type": "string",
628
+ "minLength": 1
629
+ }
630
+ },
631
+ "summary": {
632
+ "type": "string",
633
+ "minLength": 1
634
+ }
635
+ }
311
636
  },
312
637
  "remediationTests": {
313
638
  "type": "array",
@@ -181,6 +181,250 @@
181
181
  ],
182
182
  "additionalProperties": true
183
183
  },
184
+ "legacyCodeEvidence": {
185
+ "type": "object",
186
+ "properties": {
187
+ "id": {
188
+ "$ref": "#/$defs/text"
189
+ },
190
+ "code": {
191
+ "$ref": "#/$defs/text"
192
+ }
193
+ },
194
+ "required": [
195
+ "id",
196
+ "code"
197
+ ],
198
+ "additionalProperties": true
199
+ },
200
+ "findingAssessment": {
201
+ "anyOf": [
202
+ {
203
+ "$ref": "#/$defs/text"
204
+ },
205
+ {
206
+ "type": "object",
207
+ "properties": {
208
+ "level": {
209
+ "$ref": "#/$defs/text"
210
+ },
211
+ "rationale": {
212
+ "$ref": "#/$defs/text"
213
+ },
214
+ "why": {
215
+ "$ref": "#/$defs/text"
216
+ }
217
+ },
218
+ "additionalProperties": true
219
+ }
220
+ ]
221
+ },
222
+ "textOrSummary": {
223
+ "anyOf": [
224
+ {
225
+ "$ref": "#/$defs/text"
226
+ },
227
+ {
228
+ "type": "object",
229
+ "properties": {
230
+ "summary": {
231
+ "$ref": "#/$defs/text"
232
+ },
233
+ "source": {
234
+ "$ref": "#/$defs/text"
235
+ },
236
+ "sink": {
237
+ "$ref": "#/$defs/text"
238
+ },
239
+ "outcome": {
240
+ "$ref": "#/$defs/text"
241
+ },
242
+ "transformations": {
243
+ "$ref": "#/$defs/textList"
244
+ },
245
+ "evidenceRefs": {
246
+ "$ref": "#/$defs/textList"
247
+ },
248
+ "evidence_refs": {
249
+ "$ref": "#/$defs/textList"
250
+ }
251
+ },
252
+ "additionalProperties": true
253
+ }
254
+ ]
255
+ },
256
+ "findingReachability": {
257
+ "anyOf": [
258
+ {
259
+ "$ref": "#/$defs/text"
260
+ },
261
+ {
262
+ "type": "object",
263
+ "properties": {
264
+ "summary": {
265
+ "$ref": "#/$defs/text"
266
+ },
267
+ "attacker": {
268
+ "$ref": "#/$defs/text"
269
+ },
270
+ "entrypoint": {
271
+ "$ref": "#/$defs/text"
272
+ },
273
+ "source": {
274
+ "$ref": "#/$defs/text"
275
+ },
276
+ "sink": {
277
+ "$ref": "#/$defs/text"
278
+ },
279
+ "outcome": {
280
+ "$ref": "#/$defs/text"
281
+ },
282
+ "preconditions": {
283
+ "$ref": "#/$defs/textList"
284
+ },
285
+ "evidenceRefs": {
286
+ "$ref": "#/$defs/textList"
287
+ },
288
+ "evidence_refs": {
289
+ "$ref": "#/$defs/textList"
290
+ }
291
+ },
292
+ "additionalProperties": true
293
+ }
294
+ ]
295
+ },
296
+ "findingValidation": {
297
+ "type": "object",
298
+ "properties": {
299
+ "assertions": {
300
+ "$ref": "#/$defs/textList"
301
+ },
302
+ "counterEvidence": {
303
+ "$ref": "#/$defs/textList"
304
+ },
305
+ "evidence": {
306
+ "anyOf": [
307
+ {
308
+ "$ref": "#/$defs/text"
309
+ },
310
+ {
311
+ "$ref": "#/$defs/textList"
312
+ }
313
+ ]
314
+ },
315
+ "evidenceRefs": {
316
+ "$ref": "#/$defs/textList"
317
+ },
318
+ "evidence_refs": {
319
+ "$ref": "#/$defs/textList"
320
+ },
321
+ "limitations": {
322
+ "$ref": "#/$defs/textList"
323
+ },
324
+ "method": {
325
+ "$ref": "#/$defs/text"
326
+ },
327
+ "status": {
328
+ "anyOf": [
329
+ {
330
+ "$ref": "#/$defs/text"
331
+ },
332
+ {
333
+ "type": "null"
334
+ }
335
+ ]
336
+ },
337
+ "summary": {
338
+ "$ref": "#/$defs/text"
339
+ },
340
+ "disposition": {
341
+ "anyOf": [
342
+ {
343
+ "$ref": "#/$defs/text"
344
+ },
345
+ {
346
+ "type": "null"
347
+ }
348
+ ]
349
+ },
350
+ "result": {
351
+ "anyOf": [
352
+ {
353
+ "$ref": "#/$defs/text"
354
+ },
355
+ {
356
+ "type": "null"
357
+ }
358
+ ]
359
+ }
360
+ },
361
+ "additionalProperties": true
362
+ },
363
+ "findingAttackPath": {
364
+ "type": "object",
365
+ "properties": {
366
+ "assumptions": {
367
+ "$ref": "#/$defs/textList"
368
+ },
369
+ "blindspots": {
370
+ "$ref": "#/$defs/textList"
371
+ },
372
+ "controls": {
373
+ "$ref": "#/$defs/textList"
374
+ },
375
+ "dataFlow": {
376
+ "$ref": "#/$defs/textOrSummary"
377
+ },
378
+ "data_flow": {
379
+ "$ref": "#/$defs/textOrSummary"
380
+ },
381
+ "dataflow": {
382
+ "$ref": "#/$defs/textOrSummary"
383
+ },
384
+ "evidenceRefs": {
385
+ "$ref": "#/$defs/textList"
386
+ },
387
+ "evidence_refs": {
388
+ "$ref": "#/$defs/textList"
389
+ },
390
+ "impact": {
391
+ "anyOf": [
392
+ {
393
+ "$ref": "#/$defs/findingAssessment"
394
+ },
395
+ {
396
+ "type": "null"
397
+ }
398
+ ]
399
+ },
400
+ "likelihood": {
401
+ "anyOf": [
402
+ {
403
+ "$ref": "#/$defs/findingAssessment"
404
+ },
405
+ {
406
+ "type": "null"
407
+ }
408
+ ]
409
+ },
410
+ "limitations": {
411
+ "$ref": "#/$defs/textList"
412
+ },
413
+ "preconditions": {
414
+ "$ref": "#/$defs/textList"
415
+ },
416
+ "reachability": {
417
+ "$ref": "#/$defs/findingReachability"
418
+ },
419
+ "steps": {
420
+ "$ref": "#/$defs/textList"
421
+ },
422
+ "summary": {
423
+ "$ref": "#/$defs/text"
424
+ }
425
+ },
426
+ "additionalProperties": true
427
+ },
184
428
  "finding": {
185
429
  "type": "object",
186
430
  "properties": {
@@ -236,6 +480,12 @@
236
480
  "$ref": "#/$defs/codeEvidence"
237
481
  }
238
482
  },
483
+ "code_evidence": {
484
+ "type": "array",
485
+ "items": {
486
+ "$ref": "#/$defs/legacyCodeEvidence"
487
+ }
488
+ },
239
489
  "rootCause": {
240
490
  "anyOf": [
241
491
  {
@@ -247,6 +497,12 @@
247
497
  "summary": {
248
498
  "$ref": "#/$defs/text"
249
499
  },
500
+ "code": {
501
+ "$ref": "#/$defs/text"
502
+ },
503
+ "language": {
504
+ "$ref": "#/$defs/text"
505
+ },
250
506
  "evidenceRefs": {
251
507
  "$ref": "#/$defs/textList"
252
508
  }
@@ -258,14 +514,41 @@
258
514
  }
259
515
  ]
260
516
  },
517
+ "root_cause": {
518
+ "anyOf": [
519
+ {
520
+ "$ref": "#/$defs/text"
521
+ },
522
+ {
523
+ "type": "object",
524
+ "properties": {
525
+ "summary": {
526
+ "$ref": "#/$defs/text"
527
+ },
528
+ "code": {
529
+ "$ref": "#/$defs/text"
530
+ },
531
+ "language": {
532
+ "$ref": "#/$defs/text"
533
+ },
534
+ "evidenceRefs": {
535
+ "$ref": "#/$defs/textList"
536
+ },
537
+ "evidence_refs": {
538
+ "$ref": "#/$defs/textList"
539
+ }
540
+ },
541
+ "additionalProperties": true
542
+ }
543
+ ]
544
+ },
261
545
  "remediation": {
262
546
  "$ref": "#/$defs/text"
263
547
  },
264
548
  "validation": {
265
549
  "anyOf": [
266
550
  {
267
- "type": "object",
268
- "additionalProperties": true
551
+ "$ref": "#/$defs/findingValidation"
269
552
  },
270
553
  {
271
554
  "type": "null"
@@ -275,8 +558,7 @@
275
558
  "attackPath": {
276
559
  "anyOf": [
277
560
  {
278
- "type": "object",
279
- "additionalProperties": true
561
+ "$ref": "#/$defs/findingAttackPath"
280
562
  },
281
563
  {
282
564
  "type": "null"