@openai/codex-security 0.1.11 → 0.1.13

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 (111) hide show
  1. package/README.md +195 -49
  2. package/_bundled_plugin/.codex-plugin/plugin.json +1 -1
  3. package/_bundled_plugin/.mcp.json +2 -0
  4. package/_bundled_plugin/examples/completed-scan/coverage.json +1 -1
  5. package/_bundled_plugin/examples/completed-scan/scan-manifest.json +2 -2
  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/preflight/capability-profiles.toml +1 -34
  9. package/_bundled_plugin/references/config-preflight.md +11 -13
  10. package/_bundled_plugin/references/core-scan.md +94 -0
  11. package/_bundled_plugin/references/final-report.md +6 -6
  12. package/_bundled_plugin/references/scan-artifacts.md +15 -14
  13. package/_bundled_plugin/references/scan-prologue.md +27 -0
  14. package/_bundled_plugin/schemas/tools/deep-reducer.schema.json +1 -106
  15. package/_bundled_plugin/scripts/config_preflight.py +40 -3
  16. package/_bundled_plugin/scripts/deep_scan_config.py +8 -5
  17. package/_bundled_plugin/scripts/deep_scan_workbench.py +103 -35
  18. package/_bundled_plugin/scripts/finalize_scan_contract.py +29 -17
  19. package/_bundled_plugin/scripts/finding_preview.py +122 -6
  20. package/_bundled_plugin/scripts/generate_in_scope_files.py +39 -17
  21. package/_bundled_plugin/scripts/generate_rank_input.py +21 -3
  22. package/_bundled_plugin/scripts/normalize_candidates.py +5 -5
  23. package/_bundled_plugin/scripts/report_projection.py +1 -19
  24. package/_bundled_plugin/scripts/workbench_cli.py +4 -0
  25. package/_bundled_plugin/scripts/workbench_db.py +280 -29
  26. package/_bundled_plugin/scripts/workbench_progress.py +0 -5
  27. package/_bundled_plugin/scripts/workbench_scan_usage.py +69 -8
  28. package/_bundled_plugin/scripts/workbench_schema.py +41 -20
  29. package/_bundled_plugin/skills/attack-path-analysis/SKILL.md +8 -11
  30. package/_bundled_plugin/skills/deep-security-scan/SKILL.md +24 -110
  31. package/_bundled_plugin/skills/security-scan/SKILL.md +5 -88
  32. package/_bundled_plugin/skills/threat-model/SKILL.md +4 -2
  33. package/_bundled_plugin/skills/track-findings/SKILL.md +1 -1
  34. package/_bundled_plugin/skills/triage-finding/SKILL.md +5 -6
  35. package/_bundled_plugin/skills/triage-finding/references/github-rest-intake.md +6 -7
  36. package/_bundled_plugin/skills/validation/SKILL.md +9 -12
  37. package/_bundled_plugin/skills/vulnerability-writeup/SKILL.md +3 -2
  38. package/_bundled_plugin/skills/vulnerability-writeup/references/report-format.md +1 -1
  39. package/dist/api.d.ts +1 -0
  40. package/dist/api.d.ts.map +1 -1
  41. package/dist/api.js +195 -59
  42. package/dist/api.js.map +1 -1
  43. package/dist/bulk-scan-discovery.d.ts +5 -1
  44. package/dist/bulk-scan-discovery.d.ts.map +1 -1
  45. package/dist/bulk-scan-discovery.js +38 -9
  46. package/dist/bulk-scan-discovery.js.map +1 -1
  47. package/dist/cli.d.ts +9 -3
  48. package/dist/cli.d.ts.map +1 -1
  49. package/dist/cli.js +764 -60
  50. package/dist/cli.js.map +1 -1
  51. package/dist/config.d.ts.map +1 -1
  52. package/dist/config.js +1 -0
  53. package/dist/config.js.map +1 -1
  54. package/dist/contract.d.ts +12 -0
  55. package/dist/contract.d.ts.map +1 -1
  56. package/dist/contract.js +30 -2
  57. package/dist/contract.js.map +1 -1
  58. package/dist/cost.d.ts.map +1 -1
  59. package/dist/cost.js +10 -1
  60. package/dist/cost.js.map +1 -1
  61. package/dist/index.d.ts +2 -0
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +1 -0
  64. package/dist/index.js.map +1 -1
  65. package/dist/knowledge-base.d.ts.map +1 -1
  66. package/dist/knowledge-base.js +10 -3
  67. package/dist/knowledge-base.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 +77 -18
  71. package/dist/multiscan.js.map +1 -1
  72. package/dist/publication-events.d.ts +16 -0
  73. package/dist/publication-events.d.ts.map +1 -0
  74. package/dist/publication-events.js +141 -0
  75. package/dist/publication-events.js.map +1 -0
  76. package/dist/publication-store.d.ts +5 -0
  77. package/dist/publication-store.d.ts.map +1 -0
  78. package/dist/publication-store.js +102 -0
  79. package/dist/publication-store.js.map +1 -0
  80. package/dist/publication.d.ts +27 -0
  81. package/dist/publication.d.ts.map +1 -0
  82. package/dist/publication.js +207 -0
  83. package/dist/publication.js.map +1 -0
  84. package/dist/publish.d.ts +77 -0
  85. package/dist/publish.d.ts.map +1 -0
  86. package/dist/publish.js +748 -0
  87. package/dist/publish.js.map +1 -0
  88. package/dist/runtime.d.ts.map +1 -1
  89. package/dist/runtime.js +15 -44
  90. package/dist/runtime.js.map +1 -1
  91. package/dist/scan-dashboard.d.ts +7 -1
  92. package/dist/scan-dashboard.d.ts.map +1 -1
  93. package/dist/scan-dashboard.js +86 -20
  94. package/dist/scan-dashboard.js.map +1 -1
  95. package/dist/scan-logs.d.ts +2 -0
  96. package/dist/scan-logs.d.ts.map +1 -1
  97. package/dist/scan-logs.js +97 -37
  98. package/dist/scan-logs.js.map +1 -1
  99. package/dist/targets.d.ts.map +1 -1
  100. package/dist/targets.js +20 -11
  101. package/dist/targets.js.map +1 -1
  102. package/dist/trusted-executable.js +1 -1
  103. package/dist/trusted-executable.js.map +1 -1
  104. package/dist/version.d.ts +3 -3
  105. package/dist/version.d.ts.map +1 -1
  106. package/dist/version.js +6 -4
  107. package/dist/version.js.map +1 -1
  108. package/package.json +5 -4
  109. package/_bundled_plugin/references/shared-hard-rules.md +0 -15
  110. package/_bundled_plugin/scripts/validate_report_format.py +0 -138
  111. package/_bundled_plugin/skills/security-scan/references/repository-wide-scan.md +0 -33
package/README.md CHANGED
@@ -16,10 +16,11 @@ npx @openai/codex-security --version
16
16
  ```
17
17
 
18
18
  The package supports macOS, Linux, and Windows and requires Node.js 22.13.0 or
19
- later in the 22.x release line, Node.js 24.x, or Node.js 26.x. Scanning and
20
- exporting findings also require Python 3.10 or later. If you use Python 3.10,
21
- install the `tomli` package. Select another interpreter with `--python`,
22
- `pythonPath`, or `PYTHON` when needed.
19
+ later in the 22.x release line, Node.js 24.x, or Node.js 26.x. Scans, bulk
20
+ scans, exports, scan history, and saved findings also require Python 3.10 or
21
+ later. Python 3.10 also requires `tomli`. Use `--python` with `scan`,
22
+ `bulk-scan`, or `export`; use `pythonPath` with the SDK. Set `PYTHON` to select
23
+ an interpreter for any Python-backed command.
23
24
 
24
25
  When a newer version is available, the CLI shows the update command for your
25
26
  installation method. Set `CODEX_SECURITY_NO_UPDATE_NOTICE=1` to hide the
@@ -199,6 +200,7 @@ Trusted Access for Cyber. To apply or check your access, visit
199
200
  ## CLI
200
201
 
201
202
  ```bash
203
+ npx @openai/codex-security scan
202
204
  npx @openai/codex-security scan /path/to/repository
203
205
  npx @openai/codex-security scan /path/to/repository --headless
204
206
  npx @openai/codex-security scan /path/to/repository --model gpt-5.6-terra
@@ -217,22 +219,31 @@ npx @openai/codex-security scan /path/to/repository --mode deep --workers 2 --su
217
219
  npx @openai/codex-security install-hook
218
220
  npx @openai/codex-security bulk-scan
219
221
  npx @openai/codex-security bulk-scan --model gpt-5.6-terra --effort high
220
- npx @openai/codex-security bulk-scan --workers 4 --mode deep --max-attempts 3
222
+ npx @openai/codex-security bulk-scan --workers 4 --mode deep --max-attempts 3 --max-cost 25
221
223
  npx @openai/codex-security bulk-scan repositories.csv --output-dir /path/outside/repositories/security-scans --workers 4 --knowledge-base /path/to/threat-models --knowledge-base /path/to/architecture.pdf
222
224
  npx @openai/codex-security bulk-scan repositories.csv --output-dir /path/outside/repositories/security-scans --scan-prompt-file scan.md --post-scan-prompt-file follow-up.md
223
225
  npx @openai/codex-security scans list /path/to/repository
224
226
  npx @openai/codex-security scans list --scan-root /path/outside/repository/results
227
+ npx @openai/codex-security scans show
225
228
  npx @openai/codex-security scans show SCAN_ID
229
+ npx @openai/codex-security scans logs
226
230
  npx @openai/codex-security scans logs SCAN_ID
231
+ npx @openai/codex-security scans rerun
227
232
  npx @openai/codex-security scans rerun SCAN_ID
228
233
  npx @openai/codex-security scans match PREVIOUS_SCAN_ID CURRENT_SCAN_ID
229
234
  npx @openai/codex-security scans match --all
235
+ npx @openai/codex-security scans compare
236
+ npx @openai/codex-security scans compare PREVIOUS_SCAN_ID
230
237
  npx @openai/codex-security scans compare PREVIOUS_SCAN_ID CURRENT_SCAN_ID
238
+ npx @openai/codex-security findings
231
239
  npx @openai/codex-security findings list /path/to/repository
232
240
  npx @openai/codex-security findings false-positive OCCURRENCE_ID --reason "The route already checks permissions"
241
+ npx @openai/codex-security export
233
242
  npx @openai/codex-security export /path/outside/repository/results --export-format sarif --output /path/outside/repository/results.sarif
234
243
  npx @openai/codex-security export /path/outside/repository/results --export-format csv --output /path/outside/repository/findings.csv
235
244
  npx @openai/codex-security export /path/outside/repository/results --export-format json --output /path/outside/repository/findings.json
245
+ npx @openai/codex-security publish scan /path/outside/repository/results --to linear --linear-team TEAM_ID
246
+ npx @openai/codex-security publish scan --to linear --linear-team TEAM_ID
236
247
  npx @openai/codex-security validate /path/outside/repository/findings.json "Possible SQL injection in src/query.ts:42"
237
248
  npx @openai/codex-security validate "Possible SQL injection" --effort high
238
249
  npx @openai/codex-security patch /path/outside/repository/findings.json "Missing authorization check in src/routes.ts:18"
@@ -256,6 +267,10 @@ directory and any enclosing Git worktree. When SARIF is produced, it is written
256
267
  to
257
268
  `<scan-dir>/exports/results.sarif`.
258
269
 
270
+ Working-tree snapshots include files from untracked nested Git repositories.
271
+ Initialized submodules must be clean and checked out at the commit recorded by
272
+ the parent repository.
273
+
259
274
  Repeat `--knowledge-base PATH` for multiple files or directories; `bulk-scan`
260
275
  shares them with every repository. Directories are searched recursively for
261
276
  Markdown, text, PDF, and Word (`.docx`) files.
@@ -317,7 +332,7 @@ mode.
317
332
 
318
333
  Scans use `gpt-5.6-sol` with extra-high reasoning effort by default. OpenAI is
319
334
  the implied provider. Use `--model gpt-5.6-terra` to switch models and
320
- `--effort minimal|low|medium|high|xhigh` to set reasoning effort. Repeat
335
+ `--effort minimal|low|medium|high|xhigh|max` to set reasoning effort. Repeat
321
336
  `--codex KEY=VALUE` for other Codex settings; existing
322
337
  `--codex 'model_reasoning_effort="high"'` overrides remain supported.
323
338
 
@@ -328,7 +343,8 @@ configuration. Each scan starts with a private runtime and these Codex
328
343
  defaults:
329
344
 
330
345
  ```toml
331
- cli_auth_credentials_store = "file"
346
+ approval_policy = "never"
347
+ cli_auth_credentials_store = "auto"
332
348
  model = "gpt-5.6-sol"
333
349
  model_reasoning_effort = "xhigh"
334
350
  model_reasoning_summary = "detailed"
@@ -382,32 +398,34 @@ permissions. See [Local security model](#local-security-model).
382
398
 
383
399
  ### Deep-scan engine configuration
384
400
 
385
- When the bundled plugin runs in a normal Codex host, its repeated-discovery
386
- engine reads `$CODEX_HOME/codex-security/config.toml`, defaulting to
401
+ Deep scans read `$CODEX_HOME/codex-security/config.toml`, defaulting to
387
402
  `~/.codex/codex-security/config.toml`:
388
403
 
389
404
  ```toml
390
405
  [deep_scan]
391
- workers = "auto"
406
+ workers = 4
392
407
  subagents = 3
393
- stop_after_no_new = 6
394
- max_discovery_runs = 60
408
+ stop_after_no_new = 4
409
+ stop_after_consecutive_errors = 3
410
+ max_discovery_runs = 40
395
411
  max_time_hours = 96
396
412
  ```
397
413
 
398
- `workers = "auto"` uses half the available parallelism, with a minimum of one
399
- and a maximum of six discovery workers. Set `workers` to a positive integer to
400
- choose an explicit count. `subagents` must be a nonnegative integer;
401
- `stop_after_no_new` and `max_discovery_runs` must be positive integers.
402
- `max_time_hours` must be a positive finite number no greater than 96; fractional
403
- hours are supported. Unknown `[deep_scan]` keys are rejected.
414
+ The default is four discovery workers; the legacy `workers = "auto"` setting
415
+ also resolves to four. Set `workers` to a positive integer to choose an explicit
416
+ count. `subagents` must be a nonnegative integer;
417
+ `stop_after_no_new`, `stop_after_consecutive_errors`, and `max_discovery_runs`
418
+ must be positive integers. `max_time_hours` must be a positive finite number no
419
+ greater than 96; fractional hours are supported. Unknown `[deep_scan]` keys are
420
+ rejected.
404
421
 
405
422
  These settings are separate from Codex's
406
423
  `features.multi_agent_v2.max_concurrent_threads_per_session` and
407
424
  `bulk-scan --workers`. Standalone CLI and SDK scans create an isolated
408
425
  `CODEX_HOME`, import the ambient `[deep_scan]` configuration, and apply explicit
409
- CLI or SDK options on top. Use `--codex` to adjust the Codex session thread
410
- limit, not to set `[deep_scan]` values.
426
+ CLI or SDK options on top. Set `stop_after_consecutive_errors` in the
427
+ configuration file. Use `--codex` to adjust the Codex session thread limit, not
428
+ to set `[deep_scan]` values.
411
429
 
412
430
  ### Environment variables
413
431
 
@@ -416,6 +434,8 @@ The CLI and SDK recognize the following user-configurable environment:
416
434
  | Variable | Effect |
417
435
  | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
418
436
  | `OPENAI_API_KEY`, `CODEX_API_KEY` | Scan authentication; `OPENAI_API_KEY` wins when both are present. |
437
+ | `CODEX_SECURITY_LINEAR_TEAM`, `CODEX_SECURITY_LINEAR_PROJECT` | Default Linear team and project for completed-scan publication. |
438
+ | `CODEX_SECURITY_LINEAR_API_KEY` | Publish directly to Linear with a personal API key; safer than a command-line key. |
419
439
  | `CODEX_SECURITY_LOG_LEVEL` | CLI-only; set to `debug` for verbose diagnostics. |
420
440
  | `LOG_LEVEL` | CLI-only fallback when `CODEX_SECURITY_LOG_LEVEL` is unset. |
421
441
  | `CODEX_SECURITY_STATE_DIR` | Override the private scan-history, workbench, and default artifact directory. |
@@ -428,6 +448,10 @@ The CLI and SDK recognize the following user-configurable environment:
428
448
  | `CI` | Disable interactive update notices in automated environments. |
429
449
  | `NO_COLOR`, `TERM` | Disable colored scan-history output when `NO_COLOR` is defined or `TERM=dumb`. |
430
450
 
451
+ On Windows, `CODEX_CLI_PATH` must name a native `.exe` or `.com`. Command
452
+ shims such as `codex.cmd` automatically use the bundled Codex executable
453
+ instead.
454
+
431
455
  Interpreter discovery uses `--python` or `pythonPath` first, then `PYTHON`,
432
456
  the managed Codex runtime, and finally `python3` or `python` from `PATH`.
433
457
  `CODEX_SECURITY_STATE_DIR` takes precedence over `CODEX_HOME`; keep both
@@ -486,6 +510,7 @@ it returns a sealed partial report with any completed findings and lists
486
510
  unvalidated candidates as follow-up work. Requests already in progress can
487
511
  finish above the limit; preparing the partial report makes no additional model
488
512
  requests. Incomplete coverage retains its existing exit code.
513
+ For `bulk-scan`, the limit applies separately to each repository attempt.
489
514
 
490
515
  Run `npx @openai/codex-security scan --help` or `npx @openai/codex-security bulk-scan --help`
491
516
  for the complete CLI references.
@@ -518,28 +543,144 @@ Use `--post-scan-prompt-file PATH` to run a follow-up in the same authenticated
518
543
  session after each scan, including incomplete or failed scans. Canceled scans
519
544
  and scans stopped at their configured cost limit do not start another turn.
520
545
 
521
- `--workers` limits concurrent scans and `--max-attempts` retries failures.
522
- Results remain under `--output-dir`; rerun the same command to resume.
546
+ `--workers` sets the number of concurrent repository scans and defaults to
547
+ `4`. `--max-attempts` sets how many times each pending repository can run per
548
+ invocation and defaults to `1`. Results remain under `--output-dir`; rerun the
549
+ same command to resume.
550
+
551
+ ### Publish completed scans to Linear
552
+
553
+ Publish every finding from a completed standard, deep, or scoped scan to one
554
+ Linear team:
555
+
556
+ ```bash
557
+ npx @openai/codex-security publish scan /path/to/completed-scan \
558
+ --to linear \
559
+ --linear-team TEAM_ID
560
+ ```
561
+
562
+ Add `--project PROJECT_ID` to place the issues in a Linear project. Without a
563
+ project, issues are created directly in the selected team.
564
+
565
+ To choose from all completed scans saved in your local scan history, omit the
566
+ scan directory. The selector highlights each repository and shows its finding
567
+ count, relative run time, and abbreviated scan ID:
568
+
569
+ ```bash
570
+ npx @openai/codex-security publish scan \
571
+ --to linear \
572
+ --linear-team TEAM_ID
573
+ ```
574
+
575
+ Destination flags take precedence over `CODEX_SECURITY_LINEAR_TEAM` and the
576
+ optional `CODEX_SECURITY_LINEAR_PROJECT`. Use `--dry-run` to preview the issue
577
+ titles without creating them, or `--json` to return structured publication
578
+ results.
579
+ Interactive publication shows a full-screen activity view with live Codex
580
+ output and issue-creation progress. Other terminals receive plain progress on
581
+ stderr, so `--json` output remains machine-readable.
582
+
583
+ By default, publishing starts Codex with your existing Codex configuration and
584
+ connected Linear app. Sign in to Codex and connect Linear before publishing in
585
+ this mode. No separate Linear API token is required, and publication does not
586
+ use the isolated Codex home created for security scans.
587
+
588
+ To publish directly through the Linear API without starting Codex, configure a
589
+ Linear personal API key:
590
+
591
+ ```bash
592
+ export CODEX_SECURITY_LINEAR_API_KEY=YOUR_LINEAR_PERSONAL_API_KEY
593
+ npx @openai/codex-security publish scan /path/to/completed-scan \
594
+ --to linear \
595
+ --linear-team TEAM_ID
596
+ ```
597
+
598
+ Direct API publication leaves issues unassigned by default. Pass
599
+ `--linear-assignee teammate@example.com` or `--linear-assignee USER_ID` to
600
+ assign the issues to a Linear user by email address or user ID.
601
+ `--linear-assignee` requires direct API publication.
602
+
603
+ You can also pass `--linear-api-key KEY`, which takes precedence over
604
+ `CODEX_SECURITY_LINEAR_API_KEY`. Prefer the environment variable to avoid
605
+ exposing your API key in shell history and process listings. API keys are not
606
+ added to successful publication results, scan history, or sealed scan artifacts.
607
+ Error messages are preserved as returned. `--dry-run` never contacts Linear in
608
+ either mode.
609
+
610
+ Each finding creates a separate new issue titled
611
+ `[Codex Security][HIGH] Finding title`. The issue includes the scan ID,
612
+ repository, scanned scope, source locations and code snippets, severity,
613
+ confidence, vulnerability classification, summary, and remediation guidance.
614
+ Verified immutable Git revisions include source links. Findings are published
615
+ concurrently in batches of up to 20. Successful issue identifiers are linked
616
+ to their findings in the local scan-history database, and structured results
617
+ are read back from that database rather than generated by Codex. The completed
618
+ scan must already exist in the local scan history. Running publication again
619
+ creates another set of issues for the same scan; existing issues are not
620
+ matched, updated, or reused.
621
+
622
+ Issue descriptions contain source code and vulnerability details. Select a
623
+ Linear destination authorized to receive that information. Publication receipts
624
+ are stored separately from the sealed scan artifacts.
625
+
626
+ You can also publish a scan from TypeScript:
627
+
628
+ ```ts
629
+ import { publishScan } from "@openai/codex-security";
630
+
631
+ const publication = await publishScan("/path/to/completed-scan", {
632
+ destination: "linear",
633
+ teamId: "TEAM_ID",
634
+ onProgress: (progress) => {
635
+ if (progress.type === "issue_completed") {
636
+ console.error(
637
+ `Processed ${progress.completed} of ${progress.total} findings.`,
638
+ );
639
+ }
640
+ },
641
+ });
642
+
643
+ console.log(publication.scanId);
644
+ console.log(publication.created.length);
645
+ ```
646
+
647
+ Add `projectId: "PROJECT_ID"` to the options to publish into a specific Linear
648
+ project instead of directly to the team.
649
+
650
+ Pass `linearApiKey` to publish directly through the Linear API. Omit
651
+ `assigneeId` to leave issues unassigned, or supply a Linear user ID or email
652
+ address to select an assignee:
653
+
654
+ ```ts
655
+ const directPublication = await publishScan("/path/to/completed-scan", {
656
+ destination: "linear",
657
+ teamId: "TEAM_ID",
658
+ linearApiKey: process.env["CODEX_SECURITY_LINEAR_API_KEY"],
659
+ assigneeId: "teammate@example.com",
660
+ });
661
+ ```
523
662
 
524
663
  ### Scan history and reruns
525
664
 
526
- `npx @openai/codex-security scans list` lists scans for the current repository. Pass a
527
- repository path to inspect another checkout, `--scan-root DIR` to list scans
528
- whose artifacts are under a particular root. `scans show SCAN_ID` includes the
529
- scan configuration, results, coverage, and artifact locations. Add
665
+ `scans` or `scans list` lists scans for the current repository. Pass a repository
666
+ path to inspect another checkout, or `--scan-root DIR` to list scans whose
667
+ artifacts are under a particular root. `scans show` opens the latest completed
668
+ scan for the current repository. Pass `SCAN_ID` to inspect another scan. Scan
669
+ details include the configuration, results, coverage, and artifact locations. Add
530
670
  `--show-linked-findings` to include finding links from previous scans.
531
671
 
532
- `scans logs SCAN_ID` shows complete session events from the scan and its
533
- workers, which can include source code and credentials.
672
+ `scans logs` shows session events from the latest scan, including an active scan.
673
+ Pass `SCAN_ID` to select another scan. Logs can contain source code and credentials.
534
674
 
535
675
  Every scan history command accepts a full scan ID or a unique prefix of at
536
676
  least eight characters.
537
677
 
538
- Scan history uses the existing Codex Security workbench database at
539
- `$CODEX_HOME/state/plugins/codex-security/workbench.sqlite3`. Set
540
- `CODEX_SECURITY_STATE_DIR` to place the database elsewhere. Scan credentials
541
- are never stored in the scan configuration. Recorded failure summaries and
542
- bulk-scan receipts omit messages that contain recognizable credentials.
678
+ Scan history uses `$CODEX_SECURITY_STATE_DIR/workbench.sqlite3` when
679
+ `CODEX_SECURITY_STATE_DIR` is set. Otherwise, it uses
680
+ `$CODEX_HOME/state/plugins/codex-security/workbench.sqlite3`; `CODEX_HOME`
681
+ defaults to `~/.codex`. Scan credentials are never stored in the scan
682
+ configuration. Recorded failure summaries and bulk-scan receipts omit messages
683
+ that contain recognizable credentials.
543
684
 
544
685
  The scan sandbox permits writes to the selected state directory so SQLite can
545
686
  maintain its database and journal files. If the host itself cannot write to the
@@ -549,22 +690,25 @@ default directory, select a writable directory outside the scanned repository:
549
690
  export CODEX_SECURITY_STATE_DIR=/path/to/writable/codex-security-state
550
691
  ```
551
692
 
552
- Use `findings false-positive OCCURRENCE_ID --reason TEXT` to mark a finding as
553
- a false positive and explain why. Later scans dismiss a matching finding only
554
- when the same reason still applies.
693
+ `findings` or `findings list` lists open findings for the current repository.
694
+ Use `findings false-positive OCCURRENCE_ID --reason TEXT` to mark a finding as a
695
+ false positive and explain why. Later scans dismiss a matching finding only when
696
+ the same reason still applies.
555
697
 
556
- `scans rerun SCAN_ID` repeats the original configuration against the current
557
- checkout so a fixed vulnerability can be checked again.
698
+ `scans rerun` repeats the latest completed scan against the current checkout.
699
+ Pass `SCAN_ID` to rerun another scan.
558
700
 
559
701
  `scans match BEFORE_SCAN_ID AFTER_SCAN_ID` links findings with the same root
560
702
  cause; `scans match --all` matches all completed scans of the current repository,
561
703
  including other worktrees and clones. Saved matches appear in `scans show` and
562
704
  are reused unless `--force` is passed. Scans without sealed artifacts are skipped.
563
705
 
564
- `scans compare BEFORE_SCAN_ID AFTER_SCAN_ID` automatically matches findings by
565
- root cause, reuses saved matches, and reports findings as new, persisting,
566
- reopened, resolved, or unknown. Missing findings are not treated as resolved when
567
- the later scan is incomplete or does not cover their original scope.
706
+ `scans compare` compares the two latest completed scans. Pass one scan ID to
707
+ compare it with the latest completed scan, or two IDs to select both scans. It
708
+ matches findings by root cause, reuses saved matches, and reports findings as
709
+ new, persisting, reopened, resolved, or unknown. Missing findings are not
710
+ treated as resolved when the later scan is incomplete or does not cover their
711
+ original scope.
568
712
 
569
713
  The CLI uses [Incur](https://github.com/wevm/incur) for agent-friendly discovery
570
714
  and structured output. Inspect the command manifest with `--llms`, inspect a
@@ -596,7 +740,8 @@ they do not produce structured CLI output. Sign-in commands remain interactive.
596
740
  CSV exports cannot be written to stdout while JSON output is requested.
597
741
 
598
742
  Use `export` to create CSV, JSON, or SARIF from a completed, sealed scan without
599
- starting Codex or loading credentials. JSON preserves the sealed findings
743
+ starting Codex or loading credentials. Without a scan directory, it exports the
744
+ latest completed scan for the current repository. JSON preserves the sealed findings
600
745
  document. CSV uses the portable findings columns, marks findings as open, and
601
746
  does not include local workbench triage state. The exporter validates the seal
602
747
  before writing, accepts `--output -` for stdout, and can use
@@ -647,7 +792,7 @@ from the root of the Codex Security repository:
647
792
  mkdir -p results state
648
793
  chmod 700 results state
649
794
  export CODEX_SECURITY_USER="$(id -u):$(id -g)"
650
- export CODEX_SECURITY_IMAGE=ghcr.io/openai/codex-security:0.1.4
795
+ export CODEX_SECURITY_IMAGE=ghcr.io/openai/codex-security:latest
651
796
  docker compose pull codex-security
652
797
  docker compose run --rm codex-security login --device-auth
653
798
  docker compose run --rm codex-security
@@ -683,12 +828,13 @@ repository, Git installation, configured tools, and other scans under the
683
828
  same account are not separate security principals.
684
829
 
685
830
  Every scan uses the `codex_security_scan` filesystem profile and
686
- `approvalPolicy: "never"`. It can read the local filesystem and write to
687
- workspace roots and the selected scan state directory. Scans do not request
688
- interactive approval. Setting `approval_policy`, `sandbox_mode`, or permissions
831
+ `approvalPolicy: "never"`. Its profile allows reads of the local filesystem and
832
+ writes to workspace roots and the selected scan state directory. Scans do not
833
+ request interactive approval or grant filesystem escalations. Setting
834
+ `approval_policy`, `approvals_reviewer`, `sandbox_mode`, or permissions
689
835
  through `--codex` or SDK `codexOverrides` does not replace these controls or
690
- make them more restrictive. Independently enforced host and network
691
- restrictions still apply.
836
+ make the filesystem profile more restrictive. Independently enforced host and
837
+ network restrictions still apply.
692
838
 
693
839
  Scan and workbench subprocesses can inherit your environment, including
694
840
  unrelated API tokens and cloud credentials. Start a scan with only the
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-security",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Codex Security workflows for security scans, analysis, and investigation.",
5
5
  "author": {
6
6
  "name": "OpenAI"
@@ -29,8 +29,10 @@
29
29
  "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",
30
30
  "PYTHON",
31
31
  "CODEX_SECURITY_KNOWLEDGE_BASE",
32
+ "CODEX_SECURITY_DEEP_SCAN_CONFIG_PATH",
32
33
  "CODEX_SECURITY_SCAN_ROOT",
33
34
  "CODEX_SECURITY_STATE_DIR",
35
+ "CODEX_SECURITY_SURFACE",
34
36
  "HTTP_PROXY",
35
37
  "HTTPS_PROXY",
36
38
  "ALL_PROXY",
@@ -6,7 +6,7 @@
6
6
  "completeness": "complete",
7
7
  "inventoryStrategy": "repository",
8
8
  "includePaths": [
9
- "src/"
9
+ "."
10
10
  ],
11
11
  "excludePaths": [],
12
12
  "surfaces": [
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "scope": {
23
23
  "includePaths": [
24
- "src/"
24
+ "."
25
25
  ],
26
26
  "excludePaths": []
27
27
  },
@@ -35,7 +35,7 @@
35
35
  },
36
36
  {
37
37
  "path": "coverage.json",
38
- "sha256": "ca91e7a3a89a477796b912232bb3473dead1d342f8b6b37b073bda168819aaa6",
38
+ "sha256": "d55b9b98d48323b4659dfee6531ec83ec538f2084325412b7188bf85ad68b01b",
39
39
  "mediaType": "application/json"
40
40
  }
41
41
  ]
@@ -65,28 +65,9 @@ capability = "usable_worker_slots_6"
65
65
  severity = "warn"
66
66
  reason = "A six-thread cap provides room for an independent baseline and parallel investigators; it does not require six running workers."
67
67
 
68
- [[profiles.security_scan.requirements]]
69
- capability = "goal_tools"
70
- severity = "suggest"
71
- reason = "Goal tools help long scans preserve completion criteria across interruptions and compaction."
72
-
73
- [[profiles.security_scan.requirements]]
74
- capability = "goals_enabled"
75
- severity = "suggest"
76
- reason = "Enabling goals makes long scans easier to resume and audit."
77
-
78
68
  [profiles.deep_security_scan]
79
69
  description = "Capabilities for deep repository-wide Codex Security scans."
80
-
81
- [[profiles.deep_security_scan.requirements]]
82
- capability = "goal_tools"
83
- severity = "suggest"
84
- reason = "Goal tools help long deep scans preserve completion criteria across many rounds."
85
-
86
- [[profiles.deep_security_scan.requirements]]
87
- capability = "goals_enabled"
88
- severity = "suggest"
89
- reason = "Enabling goals makes long deep scans easier to resume and audit."
70
+ requirements = []
90
71
 
91
72
  [profiles.security_diff_scan.remediation]
92
73
  summary = "Recommended Codex config for longer diff scans."
@@ -95,20 +76,6 @@ summary = "Recommended Codex config for longer diff scans."
95
76
  path = "features.goals"
96
77
  value = true
97
78
 
98
- [profiles.security_scan.remediation]
99
- summary = "Recommended Codex config for repository-wide or scoped-path scans."
100
-
101
- [[profiles.security_scan.remediation.patches]]
102
- path = "features.goals"
103
- value = true
104
-
105
- [profiles.deep_security_scan.remediation]
106
- summary = "Recommended Codex setup for deep repository-wide scans."
107
-
108
- [[profiles.deep_security_scan.remediation.patches]]
109
- path = "features.goals"
110
- value = true
111
-
112
79
  [[routes]]
113
80
  skill = "security-diff-scan"
114
81
  profile = "security_diff_scan"
@@ -1,20 +1,20 @@
1
1
  # Codex Security Config Preflight
2
2
 
3
- Codex Security top-level scan skills should run the read-only helper before substantive scan work:
3
+ Codex Security Standard and diff scan skills should run the read-only helper before substantive scan work. Deep scans have no parent capability requirements and do not run this helper.
4
4
 
5
5
  Load `desktop-config-preflight.md` only after the host explicitly identifies itself as the Codex desktop app.
6
6
 
7
- Resolve `<python_command>` to the configured Python interpreter (`$PYTHON` when one is provided), otherwise use `python` on Windows and `python3` on Unix-like hosts. Before constructing the first helper command, inspect the current tool surface once and use that discovery result for both the runtime checks and `<verified-multi-agent-runtime-arguments>`. Do not omit active runtime facts from the first invocation and wait for an `incomplete` result before supplying them. The command is written on one line so it works in PowerShell, Command Prompt, and POSIX shells:
7
+ Resolve `<python_command>` to the configured Python interpreter (`"$PYTHON"` in POSIX shells or `& "$env:PYTHON"` in PowerShell), otherwise use `python` on Windows and `python3` on Unix-like hosts. Before constructing the first helper command, inspect the current tool surface once and use that discovery result for both the runtime checks and `<verified-multi-agent-runtime-arguments>`. Do not omit active runtime facts from the first invocation and wait for an `incomplete` result before supplying them. The command is written on one line so it works in PowerShell, Command Prompt, and POSIX shells:
8
8
 
9
9
  ```text
10
- <python_command> <plugin_dir>/scripts/config_preflight.py --profile <capability-profile> --cwd <scan-working-directory> --runtime-check delegation_available=<true|false> --runtime-check goal_tools_available=<true|false> <verified-multi-agent-runtime-arguments> --available-plugin-skill <skill-name>
10
+ <python_command> <plugin_dir>/scripts/config_preflight.py --profile <capability-profile> --cwd <scan-working-directory> --runtime-check delegation_available=<true|false> <verified-multi-agent-runtime-arguments>
11
11
  ```
12
12
 
13
- Determine the runtime-check values from the current tool surface. Delegation tools may be deferred instead of appearing in the initial active tool list. If `tool_search` is available and delegation tools are not already active, search for subagent or multi-agent tools before passing `--runtime-check delegation_available=false`. Pass `false` only after tool discovery fails to expose a usable delegation tool. Consume the discovered tool namespace as runtime evidence too: when the current tool surface exposes `multi_agent_v1`, replace `<verified-multi-agent-runtime-arguments>` with `--multi-agent-runtime-owner native --multi-agent-runtime-version v1 --multi-agent-runtime-provenance tool-surface`. Do not pass a V2 session cap for V1. For other runtimes, use the verified owner, version, capacity when required, and provenance described below. When static config fully describes the active mode and no session-selected runtime overrides it, remove the placeholder. When the runtime exposes a more accurate effective config value than the user's base config file, add `--effective-config <path>=<json-value>`.
13
+ Determine the runtime-check values from the current tool surface. Delegation tools may be deferred instead of appearing in the initial active tool list. If `tool_search` is available and delegation tools are not already active, search for subagent or multi-agent tools before passing `--runtime-check delegation_available=false`. Pass `false` only after tool discovery fails to expose a usable delegation tool. The `security_diff_scan` profile additionally retains its existing `--runtime-check goal_tools_available=<true|false>`; Standard and Deep profiles do not inspect or require goal tools. Consume the discovered tool namespace as runtime evidence too: when the current tool surface exposes `multi_agent_v1`, replace `<verified-multi-agent-runtime-arguments>` with `--multi-agent-runtime-owner native --multi-agent-runtime-version v1 --multi-agent-runtime-provenance tool-surface`. Do not pass a V2 session cap for V1. For other runtimes, use the verified owner, version, capacity when required, and provenance described below. When static config fully describes the active mode and no session-selected runtime overrides it, remove the placeholder. When the runtime exposes a more accurate effective config value than the user's base config file, add `--effective-config <path>=<json-value>`.
14
14
 
15
15
  For standard and diff scans, a passed `delegated_workers` check means the runtime supports delegated review and the explicitly invoked scan authorizes it; a worker-slot result is the configured maximum, not a promise that every worker will start. If the runtime forbids delegation, pass `delegation_available=false`, continue on the documented parent fallback, and do not describe configured slots as running workers or reduced coverage.
16
16
 
17
- When `CODEX_SECURITY_CONFIG_PATH` is set, add `--config "$CODEX_SECURITY_CONFIG_PATH"` to the helper command. The CLI provides this sanitized, shell-readable copy of the active worker configuration because the credential-bearing `CODEX_HOME` is intentionally inaccessible to repository-influenced commands. Do not substitute an ambient Codex home in that case.
17
+ When `CODEX_SECURITY_CONFIG_PATH` is set, add `--config "$CODEX_SECURITY_CONFIG_PATH"` in POSIX shells or `--config "$env:CODEX_SECURITY_CONFIG_PATH"` in PowerShell. The CLI provides this sanitized, shell-readable copy of the active worker configuration because the credential-bearing `CODEX_HOME` is intentionally inaccessible to repository-influenced commands. Do not substitute an ambient Codex home in that case.
18
18
 
19
19
  Otherwise, the helper discovers Codex config paths itself from `--cwd`, which defaults to the current working directory. It reads `/etc/codex/config.toml`, then `$CODEX_HOME/config.toml`, resolves `project_root_markers`, checks the matching `[projects."<absolute-project-root>"].trust_level`, and loads trusted project `.codex/config.toml` layers from the project root down to `--cwd`. It does not load project layers unless the user config marks that project root as `trusted`.
20
20
 
@@ -22,8 +22,6 @@ When the current Codex CLI session selected `-p/--profile <name>`, pass `--codex
22
22
 
23
23
  For targeted tests or unusual runtimes, repeated `--config <path>` arguments override automatic discovery. Pass those manual layers from lower to higher precedence.
24
24
 
25
- Repeat `--available-plugin-skill <skill-name>` only for skills from the capability's plugin when the selected profile checks skill dependencies. For the `deep_security_scan` profile, expose only the plugin-local names of available `codex-security` skills, such as `security-scan`; do not pass unrelated session skills. Use the current session's Available skills surface, not files found on disk. The helper reports unavailable skills as a runtime problem and a missing runtime plugin skill list as `incomplete`.
26
-
27
25
  In Codex CLI, run the helper directly in the parent even when delegation is available. This keeps the exact command, exit code, and JSON result in the CLI event stream and avoids attributing an unobservable child result to the active runtime. In other hosts with delegation, run preflight in one dedicated worker before substantive scan work. Dispatch means a successful worker-spawn tool call that returns a concrete worker or thread id. Do not claim that a worker is running, or call a generic wait with no receiver, unless that spawn succeeded. Wait for the specific returned id and accept a result only from that worker. If spawning fails or returns no id, run the helper directly in the parent and report the spawn failure; never invent or reconstruct a helper result. The worker should return only a compact summary: the executed command and exit code, overall status, unmet or unknown capabilities, the returned `user_config_path`, and applicable remediation. Include the source path for any conflicting setting. Do not return the helper's raw JSON unless the parent needs it to resolve an ambiguity. This keeps preflight inspection out of the primary scan context.
28
26
 
29
27
  The parent should pass only the runtime facts the worker cannot establish itself, such as a selected config profile or effective runtime-only config values. If delegation is unavailable after tool discovery, run the helper directly in the parent so the preflight can report the degraded or blocked path.
@@ -34,7 +32,7 @@ Multi-agent config mode is auto-detected when static config fully describes it.
34
32
  --multi-agent-runtime-owner native --multi-agent-runtime-version v2 --multi-agent-session-cap <count> --multi-agent-runtime-provenance <app-server|thread-context|tool-surface>
35
33
  ```
36
34
 
37
- The V2 session cap includes the root thread. For profiles that evaluate current-session worker capacity, the helper subtracts that root thread when evaluating usable worker slots. For native V2 selected by static config, the documented Codex default session cap is four when no explicit cap is configured. Do not apply that static default to model- or session-selected V2 when a profile needs the active capacity: pass the observed runtime cap, or the result remains `incomplete`.
35
+ The V2 session cap includes the root thread. For profiles that evaluate current-session worker capacity, the helper subtracts that root thread when evaluating usable worker slots. For native V2 selected by static config, the documented Codex default session cap is four when no explicit cap is configured. Do not apply that static default to model- or session-selected V2 when a profile needs the active capacity: pass the observed runtime cap, or a blocking capacity requirement remains `incomplete`.
38
36
 
39
37
  When the active session is actually managed by `codex_bridge`, provide explicit verified ownership. A backend config value alone is not ownership evidence:
40
38
 
@@ -42,9 +40,9 @@ When the active session is actually managed by `codex_bridge`, provide explicit
42
40
  --multi-agent-runtime-owner codex-bridge --multi-agent-runtime-version v2 --multi-agent-runtime-provenance verified-bridge --effective-config multiagent_config.max_concurrency=<count>
43
41
  ```
44
42
 
45
- Without `--multi-agent-runtime-owner codex-bridge` and `verified-bridge` provenance, passing `multiagent_config.max_concurrency` is an error. This prevents an assumed config value from reclassifying a native App session as bridge-owned.
43
+ For a profile that evaluates parent-runtime settings, passing `multiagent_config.max_concurrency` without `--multi-agent-runtime-owner codex-bridge` and `verified-bridge` provenance is an error. Explicit runtime claims still require their existing provenance and ownership checks. An unrelated backend config value does not block a profile that does not use parent-runtime settings.
46
44
 
47
- Static native V2 accepts both `[features] multi_agent_v2 = true` and `[features.multi_agent_v2] enabled = true`. Native V2 cannot be combined with `agents.max_threads`; the helper rejects that invalid config. `agents.max_depth` applies to V1 only and is not required for V2. A runtime version and cap without verified ownership cannot produce `ready`. When runtime version, ownership, or capacity remains unknown, the helper returns `incomplete` where the selected profile needs that fact and omits unsafe concurrency patches.
45
+ Static native V2 accepts both `[features] multi_agent_v2 = true` and `[features.multi_agent_v2] enabled = true`. When the profile evaluates parent-runtime settings or explicit runtime facts are supplied, native V2 cannot be combined with `agents.max_threads`. `agents.max_depth` applies to V1 only and is not required for V2. A runtime version and cap without verified ownership cannot satisfy a blocking requirement. When runtime version, ownership, or capacity remains unknown, the helper returns `incomplete` only when a blocking requirement needs that fact and omits unsafe concurrency patches.
48
46
 
49
47
  The helper reads the routed capability profile from `../preflight/capability-profiles.toml`, discovers the applicable Codex config paths from `--cwd`, applies documented defaults where the registry provides them, and prints one JSON result.
50
48
 
@@ -66,7 +64,7 @@ Deep Security Scan uses MCP-owned SDK sessions rather than the parent thread's w
66
64
 
67
65
  Do not warn merely because a user's value differs from the profile's suggested patch. Warn or block only when the evaluated capability requirement is unmet.
68
66
 
69
- If a runtime capability is `unknown`, establish it from the current tool surface and rerun the helper with an explicit `--runtime-check`. Do not treat an `incomplete` result or unknown value as evidence that the capability is available.
67
+ If a blocking runtime capability is `unknown`, establish it from the current tool surface and rerun the helper with an explicit `--runtime-check`. An unknown `warn` or `suggest` capability does not block a `ready` scan; continue on the documented degraded path without claiming that capability is available.
70
68
 
71
69
  ## Durable scan handoff
72
70
 
@@ -104,11 +102,11 @@ request_user_input(
104
102
  )
105
103
  ```
106
104
 
107
- Do not set `autoResolutionMs`; in an interactive session, an explicit answer is required before persistent configuration changes or scan continuation. If native `request_user_input` is unavailable or errors, call `request_codex_security_user_input` with the same `questions` payload. This MCP fallback is interactive and must remain prohibited in non-interactive sessions. If it returns `accepted`, follow its answer. If it is unavailable or errors, ask the same choices in chat. If it returns `declined` or `cancelled`, do not infer a choice; preserve the running scan, stop, and state that an explicit answer is still required. In every interactive waiting case, stop for the user's answer before creating or adopting a scan goal. Do not call `fail_codex_security_scan` while waiting for that answer. Apply only the approved remediation after `Apply and retry`, preserve the running scan and stop after `Leave paused`, and call `fail_codex_security_scan` with a concise cancellation reason after `Cancel scan`.
105
+ Do not set `autoResolutionMs`; in an interactive session, an explicit answer is required before persistent configuration changes or scan continuation. If native `request_user_input` is unavailable or errors, call `request_codex_security_user_input` with the same `questions` payload. This MCP fallback is interactive and must remain prohibited in non-interactive sessions. If it returns `accepted`, follow its answer. If it is unavailable or errors, ask the same choices in chat. If it returns `declined` or `cancelled`, do not infer a choice; preserve the running scan, stop, and state that an explicit answer is still required. In every interactive waiting case, stop for the user's answer before creating or adopting a scan goal. Do not call `fail_codex_security_scan` while waiting for that answer. Apply only the approved remediation after `Apply and retry`, preserve the running scan and stop after `Leave paused`, and call `cancel_codex_security_scan` after `Cancel scan`.
108
106
 
109
107
  In a non-interactive Codex session, do not leave the run waiting for an answer it cannot receive. After showing the exact blocker and config delta, automatically apply only the helper's concrete Codex config patches with ordinary `value` or `remove` operations to the active writable user config, preserving unrelated settings. Never automatically apply `host_setting` remediation or invent a patch. Rerun the same preflight once with the same verified runtime facts and any newly observable effective config. Continue only after that rerun returns `ready`; do not create or adopt scan goals or start substantive scan work earlier. If the new config needs a fresh session before the active runtime can use it, the rerun remains blocked or incomplete, remediation is unavailable, or the helper errors, do not loop, call `fail_codex_security_scan`, or cancel automatically. Preserve an app-generated durable scan and hand it off for a later retry; in CLI or another host without a durable scan, report the exact remaining blocker and end without claiming that a scan is paused.
110
108
 
111
- For any non-ready result, do not fail automatically. If an interactive chat fallback declines required remediation without choosing whether to cancel or leave the scan running, ask that follow-up before taking either action. If remediation is unavailable, the helper cannot run, the helper returns an error envelope, or a rerun remains blocked or incomplete, preserve a durable running scan and retry or hand off while recovery may still be possible. Call `fail_codex_security_scan` with the exact reasons only after the documented recovery path is exhausted and the blocker is confirmed unrecoverable, or when the user explicitly cancels.
109
+ For any non-ready result, do not fail automatically. If an interactive chat fallback declines required remediation without choosing whether to cancel or leave the scan running, ask that follow-up before taking either action. If remediation is unavailable, the helper cannot run, the helper returns an error envelope, or a rerun remains blocked or incomplete, preserve a durable running scan and retry or hand off while recovery may still be possible. Call `fail_codex_security_scan` with the exact reasons only after the documented recovery path is exhausted and the blocker is confirmed unrecoverable. When the user explicitly cancels, call `cancel_codex_security_scan`.
112
110
 
113
111
  Present applicable remediation in the Codex thread. Ask before editing persistent user configuration in interactive sessions; use the narrow automatic-remediation path above in non-interactive sessions.
114
112