@openai/codex-security 0.1.5 → 0.1.6

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 (94) hide show
  1. package/README.md +79 -8
  2. package/_bundled_plugin/.codex-plugin/plugin.json +1 -1
  3. package/_bundled_plugin/.mcp.json +8 -1
  4. package/_bundled_plugin/mcp/mcp-app.html.br +0 -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/preflight/capability-profiles.toml +0 -57
  8. package/_bundled_plugin/references/config-preflight.md +1 -1
  9. package/_bundled_plugin/references/final-report.md +15 -7
  10. package/_bundled_plugin/references/scan-artifacts.md +11 -9
  11. package/_bundled_plugin/references/scan-contract.md +3 -1
  12. package/_bundled_plugin/schemas/definitions/artifact-common.schema.json +42 -0
  13. package/_bundled_plugin/schemas/definitions/discovery-candidate.schema.json +100 -0
  14. package/_bundled_plugin/schemas/tools/candidate-attack-paths.schema.json +181 -0
  15. package/_bundled_plugin/schemas/tools/candidate-validations.schema.json +166 -0
  16. package/_bundled_plugin/schemas/tools/deep-reducer.schema.json +120 -0
  17. package/_bundled_plugin/schemas/tools/discovery-candidates.schema.json +83 -0
  18. package/_bundled_plugin/schemas/tools/review-items.schema.json +80 -0
  19. package/_bundled_plugin/schemas/tools/scan-draft.schema.json +572 -0
  20. package/_bundled_plugin/schemas/tools/worker-threat-model.schema.json +18 -0
  21. package/_bundled_plugin/scripts/deep_scan_config.py +11 -3
  22. package/_bundled_plugin/scripts/deep_scan_workbench.py +153 -133
  23. package/_bundled_plugin/scripts/finalize_scan_contract.py +21 -0
  24. package/_bundled_plugin/scripts/generate_in_scope_files.py +134 -0
  25. package/_bundled_plugin/scripts/workbench_cli.py +33 -1
  26. package/_bundled_plugin/scripts/workbench_db.py +127 -117
  27. package/_bundled_plugin/scripts/workbench_feedback.py +2 -0
  28. package/_bundled_plugin/scripts/workbench_native_indexes.py +5 -49
  29. package/_bundled_plugin/scripts/workbench_progress.py +86 -3
  30. package/_bundled_plugin/scripts/workbench_remediation.py +19 -1
  31. package/_bundled_plugin/scripts/workbench_scan_history.py +7 -1
  32. package/_bundled_plugin/scripts/workbench_scan_start.py +11 -5
  33. package/_bundled_plugin/scripts/workbench_scan_usage.py +557 -0
  34. package/_bundled_plugin/scripts/workbench_schema.py +501 -0
  35. package/_bundled_plugin/scripts/workbench_validation.py +117 -13
  36. package/_bundled_plugin/skills/attack-path-analysis/SKILL.md +4 -4
  37. package/_bundled_plugin/skills/deep-security-scan/SKILL.md +34 -28
  38. package/_bundled_plugin/skills/finding-discovery/SKILL.md +1 -1
  39. package/_bundled_plugin/skills/security-diff-scan/SKILL.md +11 -8
  40. package/_bundled_plugin/skills/security-scan/SKILL.md +16 -9
  41. package/_bundled_plugin/skills/security-scan/references/repository-wide-scan.md +26 -14
  42. package/_bundled_plugin/skills/security-scan/references/scan-artifacts-and-ledger.md +1 -1
  43. package/_bundled_plugin/skills/threat-model/SKILL.md +2 -2
  44. package/_bundled_plugin/skills/validation/SKILL.md +5 -5
  45. package/_bundled_plugin/skills/vulnerability-writeup/SKILL.md +145 -227
  46. package/_bundled_plugin/skills/vulnerability-writeup/references/report-format.md +53 -68
  47. package/dist/api.d.ts +29 -7
  48. package/dist/api.d.ts.map +1 -1
  49. package/dist/api.js +323 -47
  50. package/dist/api.js.map +1 -1
  51. package/dist/auth.js +1 -1
  52. package/dist/auth.js.map +1 -1
  53. package/dist/cli.d.ts +3 -2
  54. package/dist/cli.d.ts.map +1 -1
  55. package/dist/cli.js +458 -40
  56. package/dist/cli.js.map +1 -1
  57. package/dist/config.d.ts +28 -0
  58. package/dist/config.d.ts.map +1 -1
  59. package/dist/config.js +39 -2
  60. package/dist/config.js.map +1 -1
  61. package/dist/cost.d.ts +7 -0
  62. package/dist/cost.d.ts.map +1 -1
  63. package/dist/cost.js +345 -17
  64. package/dist/cost.js.map +1 -1
  65. package/dist/index.d.ts +3 -2
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js.map +1 -1
  68. package/dist/multiscan.d.ts +1 -0
  69. package/dist/multiscan.d.ts.map +1 -1
  70. package/dist/multiscan.js +3 -0
  71. package/dist/multiscan.js.map +1 -1
  72. package/dist/runtime.d.ts +16 -0
  73. package/dist/runtime.d.ts.map +1 -1
  74. package/dist/runtime.js +540 -25
  75. package/dist/runtime.js.map +1 -1
  76. package/dist/scan-activity.d.ts +13 -0
  77. package/dist/scan-activity.d.ts.map +1 -0
  78. package/dist/scan-activity.js +319 -0
  79. package/dist/scan-activity.js.map +1 -0
  80. package/dist/scan-dashboard.d.ts +47 -0
  81. package/dist/scan-dashboard.d.ts.map +1 -0
  82. package/dist/scan-dashboard.js +444 -0
  83. package/dist/scan-dashboard.js.map +1 -0
  84. package/dist/scan-history-renderer.d.ts.map +1 -1
  85. package/dist/scan-history-renderer.js +4 -1
  86. package/dist/scan-history-renderer.js.map +1 -1
  87. package/dist/version.d.ts +1 -1
  88. package/dist/version.js +1 -1
  89. package/dist/version.js.map +1 -1
  90. package/dist/worker-progress.d.ts +7 -0
  91. package/dist/worker-progress.d.ts.map +1 -1
  92. package/dist/worker-progress.js +68 -0
  93. package/dist/worker-progress.js.map +1 -1
  94. package/package.json +3 -3
@@ -0,0 +1,572 @@
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
+ "$defs": {
6
+ "text": {
7
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
8
+ },
9
+ "textList": {
10
+ "type": "array",
11
+ "items": {
12
+ "$ref": "#/$defs/text"
13
+ }
14
+ },
15
+ "scanId": {
16
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
17
+ },
18
+ "handoffClaimToken": {
19
+ "type": "string",
20
+ "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})$"
21
+ },
22
+ "repositoryPath": {
23
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/repositoryPath"
24
+ },
25
+ "location": {
26
+ "type": "object",
27
+ "properties": {
28
+ "path": {
29
+ "$ref": "#/$defs/repositoryPath"
30
+ },
31
+ "startLine": {
32
+ "type": "integer",
33
+ "minimum": 1
34
+ },
35
+ "endLine": {
36
+ "type": "integer",
37
+ "minimum": 1
38
+ },
39
+ "role": {
40
+ "$ref": "#/$defs/text"
41
+ }
42
+ },
43
+ "required": [
44
+ "path",
45
+ "startLine"
46
+ ],
47
+ "additionalProperties": true
48
+ },
49
+ "identity": {
50
+ "type": "object",
51
+ "properties": {
52
+ "anchor": {
53
+ "type": "string",
54
+ "pattern": "^[a-z0-9][a-z0-9._/-]*$"
55
+ },
56
+ "instance": {
57
+ "type": "string",
58
+ "pattern": "^[a-z0-9][a-z0-9._/-]*$"
59
+ }
60
+ },
61
+ "required": [
62
+ "anchor"
63
+ ],
64
+ "additionalProperties": true
65
+ },
66
+ "severity": {
67
+ "type": "object",
68
+ "properties": {
69
+ "level": {
70
+ "enum": [
71
+ "critical",
72
+ "high",
73
+ "medium",
74
+ "low",
75
+ "informational"
76
+ ]
77
+ },
78
+ "score": {
79
+ "type": "number",
80
+ "minimum": 0,
81
+ "maximum": 10
82
+ },
83
+ "scoringSystem": {
84
+ "$ref": "#/$defs/text"
85
+ },
86
+ "vector": {
87
+ "$ref": "#/$defs/text"
88
+ },
89
+ "rationale": {
90
+ "$ref": "#/$defs/text"
91
+ },
92
+ "changeConditions": {
93
+ "$ref": "#/$defs/text"
94
+ }
95
+ },
96
+ "required": [
97
+ "level"
98
+ ],
99
+ "additionalProperties": true
100
+ },
101
+ "confidence": {
102
+ "type": "object",
103
+ "properties": {
104
+ "level": {
105
+ "enum": [
106
+ "high",
107
+ "medium",
108
+ "low"
109
+ ]
110
+ },
111
+ "rationale": {
112
+ "$ref": "#/$defs/text"
113
+ }
114
+ },
115
+ "required": [
116
+ "level",
117
+ "rationale"
118
+ ],
119
+ "additionalProperties": true
120
+ },
121
+ "taxonomy": {
122
+ "type": "object",
123
+ "properties": {
124
+ "category": {
125
+ "$ref": "#/$defs/text",
126
+ "description": "The actual primary broken security control, not a CWE identifier."
127
+ },
128
+ "cwe": {
129
+ "$ref": "#/$defs/textList",
130
+ "description": "Copy the reviewed candidate's exact cwe_ids array. Use an empty array when no CWE is established; do not invent one."
131
+ }
132
+ },
133
+ "required": [
134
+ "category",
135
+ "cwe"
136
+ ],
137
+ "additionalProperties": true
138
+ },
139
+ "codeEvidence": {
140
+ "type": "object",
141
+ "properties": {
142
+ "id": {
143
+ "type": "string",
144
+ "pattern": "^[a-z0-9][a-z0-9._/-]*$"
145
+ },
146
+ "label": {
147
+ "$ref": "#/$defs/text"
148
+ },
149
+ "path": {
150
+ "$ref": "#/$defs/repositoryPath"
151
+ },
152
+ "startLine": {
153
+ "type": "integer",
154
+ "minimum": 1
155
+ },
156
+ "endLine": {
157
+ "type": "integer",
158
+ "minimum": 1
159
+ },
160
+ "language": {
161
+ "$ref": "#/$defs/text"
162
+ },
163
+ "role": {
164
+ "$ref": "#/$defs/text"
165
+ },
166
+ "code": {
167
+ "$ref": "#/$defs/text",
168
+ "description": "The genuine, nonempty source snippet at this evidence location."
169
+ },
170
+ "explanation": {
171
+ "$ref": "#/$defs/text"
172
+ }
173
+ },
174
+ "required": [
175
+ "id",
176
+ "label",
177
+ "path",
178
+ "startLine",
179
+ "code",
180
+ "explanation"
181
+ ],
182
+ "additionalProperties": true
183
+ },
184
+ "finding": {
185
+ "type": "object",
186
+ "properties": {
187
+ "findingId": false,
188
+ "occurrenceId": false,
189
+ "fingerprints": false,
190
+ "ruleId": {
191
+ "type": "string",
192
+ "pattern": "^[a-z0-9][a-z0-9._/-]*$",
193
+ "description": "A stable lowercase vulnerability-family slug, such as prototype-pollution.json-patch; a CWE is taxonomy, not a rule ID."
194
+ },
195
+ "identity": {
196
+ "$ref": "#/$defs/identity"
197
+ },
198
+ "title": {
199
+ "$ref": "#/$defs/text"
200
+ },
201
+ "summary": {
202
+ "$ref": "#/$defs/text"
203
+ },
204
+ "severity": {
205
+ "$ref": "#/$defs/severity"
206
+ },
207
+ "confidence": {
208
+ "$ref": "#/$defs/confidence"
209
+ },
210
+ "taxonomy": {
211
+ "$ref": "#/$defs/taxonomy"
212
+ },
213
+ "locations": {
214
+ "type": "array",
215
+ "minItems": 1,
216
+ "items": {
217
+ "$ref": "#/$defs/location"
218
+ }
219
+ },
220
+ "writeup": {
221
+ "type": "object",
222
+ "properties": {
223
+ "reportPath": {
224
+ "type": "string",
225
+ "pattern": "^findings/([a-z0-9][a-z0-9._-]*)/\\1\\.md$"
226
+ }
227
+ },
228
+ "required": [
229
+ "reportPath"
230
+ ],
231
+ "additionalProperties": true
232
+ },
233
+ "codeEvidence": {
234
+ "type": "array",
235
+ "items": {
236
+ "$ref": "#/$defs/codeEvidence"
237
+ }
238
+ },
239
+ "rootCause": {
240
+ "anyOf": [
241
+ {
242
+ "$ref": "#/$defs/text"
243
+ },
244
+ {
245
+ "type": "object",
246
+ "properties": {
247
+ "summary": {
248
+ "$ref": "#/$defs/text"
249
+ },
250
+ "evidenceRefs": {
251
+ "$ref": "#/$defs/textList"
252
+ }
253
+ },
254
+ "required": [
255
+ "summary"
256
+ ],
257
+ "additionalProperties": true
258
+ }
259
+ ]
260
+ },
261
+ "remediation": {
262
+ "$ref": "#/$defs/text"
263
+ },
264
+ "validation": {
265
+ "anyOf": [
266
+ {
267
+ "type": "object",
268
+ "additionalProperties": true
269
+ },
270
+ {
271
+ "type": "null"
272
+ }
273
+ ]
274
+ },
275
+ "attackPath": {
276
+ "anyOf": [
277
+ {
278
+ "type": "object",
279
+ "additionalProperties": true
280
+ },
281
+ {
282
+ "type": "null"
283
+ }
284
+ ]
285
+ },
286
+ "remediationTests": {
287
+ "$ref": "#/$defs/textList"
288
+ },
289
+ "preventiveControls": {
290
+ "$ref": "#/$defs/textList"
291
+ },
292
+ "provenance": {
293
+ "type": "object",
294
+ "properties": {
295
+ "source": {
296
+ "$ref": "#/$defs/text",
297
+ "description": "The actual finding producer. Use local_plugin only for a finding discovered by this plugin."
298
+ }
299
+ },
300
+ "required": [
301
+ "source"
302
+ ],
303
+ "additionalProperties": true
304
+ },
305
+ "extensions": {
306
+ "type": "object",
307
+ "additionalProperties": true
308
+ }
309
+ },
310
+ "required": [
311
+ "ruleId",
312
+ "title",
313
+ "summary",
314
+ "severity",
315
+ "confidence",
316
+ "taxonomy",
317
+ "locations",
318
+ "remediation",
319
+ "provenance"
320
+ ],
321
+ "additionalProperties": true
322
+ },
323
+ "scope": {
324
+ "type": "object",
325
+ "properties": {
326
+ "includePaths": false,
327
+ "excludePaths": false,
328
+ "summary": {
329
+ "$ref": "#/$defs/text"
330
+ },
331
+ "artifactsReviewed": {
332
+ "$ref": "#/$defs/textList"
333
+ },
334
+ "runtimeStatus": {
335
+ "$ref": "#/$defs/text"
336
+ },
337
+ "validationMode": {
338
+ "$ref": "#/$defs/text"
339
+ },
340
+ "context": {
341
+ "$ref": "#/$defs/text"
342
+ },
343
+ "limitations": {
344
+ "$ref": "#/$defs/textList"
345
+ }
346
+ },
347
+ "additionalProperties": true
348
+ },
349
+ "threatModel": {
350
+ "type": "object",
351
+ "properties": {
352
+ "summary": {
353
+ "$ref": "#/$defs/text"
354
+ },
355
+ "assets": {
356
+ "$ref": "#/$defs/textList"
357
+ },
358
+ "trustBoundaries": {
359
+ "$ref": "#/$defs/textList"
360
+ },
361
+ "attackerCapabilities": {
362
+ "$ref": "#/$defs/textList"
363
+ },
364
+ "securityObjectives": {
365
+ "$ref": "#/$defs/textList"
366
+ },
367
+ "assumptions": {
368
+ "$ref": "#/$defs/textList"
369
+ }
370
+ },
371
+ "required": [
372
+ "summary"
373
+ ],
374
+ "additionalProperties": true
375
+ },
376
+ "surface": {
377
+ "type": "object",
378
+ "properties": {
379
+ "id": {
380
+ "type": "string",
381
+ "pattern": "^[a-z0-9][a-z0-9._/-]*$"
382
+ },
383
+ "label": {
384
+ "$ref": "#/$defs/text",
385
+ "description": "The meaningful name of the reviewed security surface."
386
+ },
387
+ "disposition": {
388
+ "description": "The evidence-supported review result for this surface.",
389
+ "enum": [
390
+ "reported",
391
+ "no_issue_found",
392
+ "rejected",
393
+ "not_applicable",
394
+ "needs_follow_up"
395
+ ]
396
+ },
397
+ "receiptRefs": {
398
+ "type": "array",
399
+ "items": {
400
+ "type": "string",
401
+ "minLength": 1,
402
+ "pattern": "^(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)artifacts/.+$"
403
+ }
404
+ },
405
+ "riskArea": {
406
+ "$ref": "#/$defs/text"
407
+ },
408
+ "notes": {
409
+ "$ref": "#/$defs/text"
410
+ }
411
+ },
412
+ "required": [
413
+ "label",
414
+ "disposition"
415
+ ],
416
+ "additionalProperties": true
417
+ },
418
+ "coverage": {
419
+ "type": "object",
420
+ "properties": {
421
+ "documentType": false,
422
+ "schemaVersion": false,
423
+ "scanId": false,
424
+ "mode": false,
425
+ "includePaths": false,
426
+ "excludePaths": false,
427
+ "receiptRefs": false,
428
+ "completeness": {
429
+ "description": "Use partial if any work is deferred or any surface needs follow-up; use complete only when no such work remains.",
430
+ "enum": [
431
+ "complete",
432
+ "partial",
433
+ "unknown"
434
+ ]
435
+ },
436
+ "inventoryStrategy": false,
437
+ "surfaces": {
438
+ "type": "array",
439
+ "items": {
440
+ "$ref": "#/$defs/surface"
441
+ }
442
+ },
443
+ "explicitExclusions": {
444
+ "type": "array",
445
+ "items": {
446
+ "type": "object",
447
+ "properties": {
448
+ "pattern": {
449
+ "$ref": "#/$defs/text"
450
+ },
451
+ "reason": {
452
+ "$ref": "#/$defs/text"
453
+ }
454
+ },
455
+ "required": [
456
+ "pattern",
457
+ "reason"
458
+ ],
459
+ "additionalProperties": true
460
+ }
461
+ },
462
+ "deferred": {
463
+ "type": "array",
464
+ "items": {
465
+ "type": "object",
466
+ "properties": {
467
+ "id": {
468
+ "$ref": "#/$defs/text"
469
+ },
470
+ "candidateId": {
471
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/candidateId"
472
+ },
473
+ "reason": {
474
+ "$ref": "#/$defs/text"
475
+ },
476
+ "paths": {
477
+ "$ref": "#/$defs/textList"
478
+ },
479
+ "surfaceIds": {
480
+ "$ref": "#/$defs/textList"
481
+ }
482
+ },
483
+ "required": [
484
+ "reason"
485
+ ],
486
+ "additionalProperties": true
487
+ }
488
+ },
489
+ "openQuestions": {
490
+ "type": "array",
491
+ "items": {
492
+ "anyOf": [
493
+ {
494
+ "$ref": "#/$defs/text"
495
+ },
496
+ {
497
+ "type": "object",
498
+ "properties": {
499
+ "question": {
500
+ "$ref": "#/$defs/text"
501
+ },
502
+ "followUpPrompt": {
503
+ "$ref": "#/$defs/text"
504
+ }
505
+ },
506
+ "required": [
507
+ "question"
508
+ ],
509
+ "additionalProperties": true
510
+ }
511
+ ]
512
+ }
513
+ }
514
+ },
515
+ "required": [
516
+ "completeness",
517
+ "surfaces",
518
+ "explicitExclusions",
519
+ "deferred"
520
+ ],
521
+ "additionalProperties": true
522
+ },
523
+ "scanDraftInput": {
524
+ "type": "object",
525
+ "properties": {
526
+ "scanId": {
527
+ "$ref": "#/$defs/scanId"
528
+ },
529
+ "handoffClaimToken": {
530
+ "$ref": "#/$defs/handoffClaimToken"
531
+ },
532
+ "scope": {
533
+ "$ref": "#/$defs/scope"
534
+ },
535
+ "threatModel": {
536
+ "$ref": "#/$defs/threatModel"
537
+ },
538
+ "findings": {
539
+ "type": "array",
540
+ "items": {
541
+ "$ref": "#/$defs/finding"
542
+ }
543
+ },
544
+ "coverage": {
545
+ "$ref": "#/$defs/coverage"
546
+ }
547
+ },
548
+ "required": [
549
+ "scanId",
550
+ "findings",
551
+ "coverage"
552
+ ],
553
+ "additionalProperties": false
554
+ },
555
+ "completedScanInput": {
556
+ "type": "object",
557
+ "properties": {
558
+ "scanId": {
559
+ "$ref": "#/$defs/scanId"
560
+ },
561
+ "handoffClaimToken": {
562
+ "$ref": "#/$defs/handoffClaimToken"
563
+ }
564
+ },
565
+ "required": [
566
+ "scanId"
567
+ ],
568
+ "additionalProperties": false
569
+ }
570
+ },
571
+ "$ref": "#/$defs/scanDraftInput"
572
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-security://schemas/tools/worker-threat-model.schema.json",
4
+ "$defs": {
5
+ "recordWorkerThreatModelInput": {
6
+ "type": "object",
7
+ "properties": {
8
+ "content": {
9
+ "type": "string",
10
+ "minLength": 1,
11
+ "pattern": "\\S"
12
+ }
13
+ },
14
+ "required": ["content"],
15
+ "additionalProperties": false
16
+ }
17
+ }
18
+ }
@@ -14,12 +14,14 @@ except ModuleNotFoundError: # pragma: no cover - Python 3.10 only
14
14
 
15
15
  DEFAULT_SUBAGENTS = 3
16
16
  DEFAULT_STOP_AFTER_NO_NEW = 6
17
+ DEFAULT_STOP_AFTER_CONSECUTIVE_ERRORS = 3
17
18
  DEFAULT_MAX_DISCOVERY_RUNS = 60
18
19
  MAX_AUTOMATIC_WORKERS = 6
19
20
  CONFIG_KEYS = {
20
21
  "workers",
21
22
  "subagents",
22
23
  "stop_after_no_new",
24
+ "stop_after_consecutive_errors",
23
25
  "max_discovery_runs",
24
26
  }
25
27
 
@@ -62,6 +64,11 @@ def resolve_deep_scan_config(available_parallelism: int) -> dict[str, int]:
62
64
  resolved_workers = min(max(available_parallelism // 2, 1), MAX_AUTOMATIC_WORKERS)
63
65
  else:
64
66
  resolved_workers = require_integer(workers, "deep_scan.workers", minimum=1)
67
+ stop_after_no_new = require_integer(
68
+ configured.get("stop_after_no_new", DEFAULT_STOP_AFTER_NO_NEW),
69
+ "deep_scan.stop_after_no_new",
70
+ minimum=1,
71
+ )
65
72
  return {
66
73
  "workers": resolved_workers,
67
74
  "subagents": require_integer(
@@ -69,9 +76,10 @@ def resolve_deep_scan_config(available_parallelism: int) -> dict[str, int]:
69
76
  "deep_scan.subagents",
70
77
  minimum=0,
71
78
  ),
72
- "stopAfterNoNew": require_integer(
73
- configured.get("stop_after_no_new", DEFAULT_STOP_AFTER_NO_NEW),
74
- "deep_scan.stop_after_no_new",
79
+ "stopAfterNoNew": stop_after_no_new,
80
+ "stopAfterConsecutiveErrors": require_integer(
81
+ configured.get("stop_after_consecutive_errors", DEFAULT_STOP_AFTER_CONSECUTIVE_ERRORS),
82
+ "deep_scan.stop_after_consecutive_errors",
75
83
  minimum=1,
76
84
  ),
77
85
  "maxDiscoveryRuns": require_integer(