@openai/codex-security 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -788
- package/_bundled_plugin/.codex-plugin/plugin.json +2 -0
- package/_bundled_plugin/.mcp.json +2 -0
- package/_bundled_plugin/mcp/helpers.mjs.br +0 -0
- package/_bundled_plugin/mcp/native/darwin-arm64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/darwin-x64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-musl/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-musl/unix.node +0 -0
- package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
- package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
- package/_bundled_plugin/mcp/server.mjs.br +0 -0
- package/_bundled_plugin/references/artifact-storage.md +1 -1
- package/_bundled_plugin/references/baseline-auditor.md +18 -0
- package/_bundled_plugin/references/core-scan.md +5 -42
- package/_bundled_plugin/references/final-report.md +1 -1
- package/_bundled_plugin/references/focused-investigator.md +13 -0
- package/_bundled_plugin/references/scan-prologue.md +2 -2
- package/_bundled_plugin/references/scan-runtime.md +4 -2
- package/_bundled_plugin/references/security-guidance.md +14 -1
- package/_bundled_plugin/references/validate-scan-findings.md +3 -0
- package/_bundled_plugin/scripts/deep_scan_workbench.py +29 -12
- package/_bundled_plugin/scripts/dispatch_inventory_tool +7 -0
- package/_bundled_plugin/scripts/finalize_scan_contract.py +29 -3
- package/_bundled_plugin/scripts/launch_codex_security_mcp +54 -16
- package/_bundled_plugin/scripts/posix_scan_local_files.py +26 -1
- package/_bundled_plugin/scripts/snapshot_sqlite.py +8 -2
- package/_bundled_plugin/scripts/windows_scan_local_files.py +216 -25
- package/_bundled_plugin/scripts/workbench/handoff.py +55 -25
- package/_bundled_plugin/scripts/workbench/storage.py +25 -5
- package/_bundled_plugin/scripts/workbench_cli.py +24 -2
- package/_bundled_plugin/scripts/workbench_constants.py +2 -0
- package/_bundled_plugin/scripts/workbench_db.py +244 -217
- package/_bundled_plugin/scripts/workbench_feedback.py +49 -4
- package/_bundled_plugin/scripts/workbench_native_indexes.py +226 -29
- package/_bundled_plugin/scripts/workbench_progress.py +159 -3
- package/_bundled_plugin/scripts/workbench_publication.py +2 -3
- package/_bundled_plugin/scripts/workbench_remediation.py +142 -2
- package/_bundled_plugin/scripts/workbench_saved_results.py +48 -8
- package/_bundled_plugin/scripts/workbench_scan_history.py +281 -119
- package/_bundled_plugin/scripts/workbench_scan_start.py +143 -9
- package/_bundled_plugin/scripts/workbench_scan_usage.py +36 -10
- package/_bundled_plugin/scripts/workbench_schema.py +220 -14
- package/_bundled_plugin/scripts/workbench_setup.py +1 -1
- package/_bundled_plugin/scripts/workbench_target.py +471 -84
- package/_bundled_plugin/scripts/workbench_target_state.py +1108 -22
- package/_bundled_plugin/shared/workbench-history-repairs.json +60 -14
- package/_bundled_plugin/shared/workbench-migrations.json +66 -0
- package/_bundled_plugin/skills/fix-finding/SKILL.md +1 -0
- package/_bundled_plugin/skills/publish-findings/SKILL.md +24 -160
- package/_bundled_plugin/skills/publish-findings/agents/openai.yaml +2 -2
- package/_bundled_plugin/skills/publish-findings/references/checkmarx-import.md +2 -2
- package/_bundled_plugin/skills/publish-findings/scripts/collect_checkmarx.py +3 -58
- package/_bundled_plugin/skills/publish-findings/scripts/collect_continuum.py +224 -0
- package/_bundled_plugin/skills/publish-findings/scripts/collector_paths.py +63 -0
- package/_bundled_plugin/skills/security-scan/SKILL.md +9 -46
- package/_bundled_plugin/skills/security-scan/agents/openai.yaml +2 -2
- package/_bundled_plugin/skills/security-scan/references/desktop-scan.md +3 -21
- package/_bundled_plugin/skills/security-scan/references/managed-scan.md +11 -0
- package/_bundled_plugin/skills/security-scan/references/scan-results.md +15 -0
- package/_bundled_plugin/skills/security-scan/references/scoped-paths.md +23 -0
- package/_bundled_plugin/skills/security-scan/references/sdk-files.md +24 -0
- package/bin/codex-security.mjs +2 -2
- package/dist/api.d.ts +6 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +437 -154
- package/dist/api.js.map +1 -1
- package/dist/armorcode-findings.d.ts +9 -0
- package/dist/armorcode-findings.d.ts.map +1 -0
- package/dist/armorcode-findings.js +145 -0
- package/dist/armorcode-findings.js.map +1 -0
- package/dist/artifact-export.d.ts +2 -0
- package/dist/artifact-export.d.ts.map +1 -1
- package/dist/artifact-export.js +29 -13
- package/dist/artifact-export.js.map +1 -1
- package/dist/auth.d.ts +6 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +33 -12
- package/dist/auth.js.map +1 -1
- package/dist/batch-cost.d.ts +18 -0
- package/dist/batch-cost.d.ts.map +1 -0
- package/dist/batch-cost.js +41 -0
- package/dist/batch-cost.js.map +1 -0
- package/dist/blackduck-findings.d.ts +1 -1
- package/dist/blackduck-findings.d.ts.map +1 -1
- package/dist/blackduck-findings.js +5 -18
- package/dist/blackduck-findings.js.map +1 -1
- package/dist/bundled-plugin.d.ts +4 -0
- package/dist/bundled-plugin.d.ts.map +1 -0
- package/dist/bundled-plugin.js +23 -0
- package/dist/bundled-plugin.js.map +1 -0
- package/dist/classify-scan-severity.d.ts +1 -1
- package/dist/classify-scan-severity.d.ts.map +1 -1
- package/dist/classify-scan-severity.js +11 -3
- package/dist/classify-scan-severity.js.map +1 -1
- package/dist/classify-severity.d.ts.map +1 -1
- package/dist/classify-severity.js +9 -6
- package/dist/classify-severity.js.map +1 -1
- package/dist/cli-argument.d.ts +4 -0
- package/dist/cli-argument.d.ts.map +1 -0
- package/dist/cli-argument.js +17 -0
- package/dist/cli-argument.js.map +1 -0
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.d.ts.map +1 -1
- package/dist/cli-help.js +71 -29
- package/dist/cli-help.js.map +1 -1
- package/dist/cli-hook.d.ts +3 -0
- package/dist/cli-hook.d.ts.map +1 -0
- package/dist/cli-hook.js +87 -0
- package/dist/cli-hook.js.map +1 -0
- package/dist/cli-integrations.d.ts +13 -0
- package/dist/cli-integrations.d.ts.map +1 -0
- package/dist/cli-integrations.js +333 -0
- package/dist/cli-integrations.js.map +1 -0
- package/dist/cli-mcp.d.ts +15 -0
- package/dist/cli-mcp.d.ts.map +1 -0
- package/dist/cli-mcp.js +178 -0
- package/dist/cli-mcp.js.map +1 -0
- package/dist/cli-token-view.d.ts +10 -0
- package/dist/cli-token-view.d.ts.map +1 -0
- package/dist/cli-token-view.js +41 -0
- package/dist/cli-token-view.js.map +1 -0
- package/dist/cli.d.ts +5 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1763 -894
- package/dist/cli.js.map +1 -1
- package/dist/cloud-publish.d.ts.map +1 -1
- package/dist/cloud-publish.js +33 -31
- package/dist/cloud-publish.js.map +1 -1
- package/dist/codex-sdk-environment.d.ts +6 -0
- package/dist/codex-sdk-environment.d.ts.map +1 -1
- package/dist/codex-sdk-environment.js +19 -0
- package/dist/codex-sdk-environment.js.map +1 -1
- package/dist/command-words.d.ts +3 -0
- package/dist/command-words.d.ts.map +1 -0
- package/dist/command-words.js +46 -0
- package/dist/command-words.js.map +1 -0
- package/dist/component-scan.d.ts +3 -1
- package/dist/component-scan.d.ts.map +1 -1
- package/dist/component-scan.js +40 -7
- package/dist/component-scan.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +30 -1
- package/dist/config.js.map +1 -1
- package/dist/continuum-findings.d.ts +1 -1
- package/dist/continuum-findings.d.ts.map +1 -1
- package/dist/continuum-findings.js +93 -31
- package/dist/continuum-findings.js.map +1 -1
- package/dist/cost.d.ts.map +1 -1
- package/dist/cost.js +1 -45
- package/dist/cost.js.map +1 -1
- package/dist/custom-validation-prompt.d.ts +1 -1
- package/dist/custom-validation-prompt.d.ts.map +1 -1
- package/dist/custom-validation-prompt.js +29 -19
- package/dist/custom-validation-prompt.js.map +1 -1
- package/dist/deduplication/local.d.ts +3 -1
- package/dist/deduplication/local.d.ts.map +1 -1
- package/dist/deduplication/local.js +8 -1
- package/dist/deduplication/local.js.map +1 -1
- package/dist/deduplication/refusal.d.ts.map +1 -1
- package/dist/deduplication/refusal.js +2 -1
- package/dist/deduplication/refusal.js.map +1 -1
- package/dist/deduplication/scan.d.ts +2 -0
- package/dist/deduplication/scan.d.ts.map +1 -1
- package/dist/deduplication/scan.js +24 -7
- package/dist/deduplication/scan.js.map +1 -1
- package/dist/deep-scan.d.ts.map +1 -1
- package/dist/deep-scan.js +16 -15
- package/dist/deep-scan.js.map +1 -1
- package/dist/endor-findings.d.ts +2 -2
- package/dist/endor-findings.d.ts.map +1 -1
- package/dist/endor-findings.js +6 -23
- package/dist/endor-findings.js.map +1 -1
- package/dist/errors.d.ts +3 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -3
- package/dist/errors.js.map +1 -1
- package/dist/executable-path.d.ts +3 -0
- package/dist/executable-path.d.ts.map +1 -1
- package/dist/executable-path.js +26 -0
- package/dist/executable-path.js.map +1 -1
- package/dist/external-findings-import.d.ts.map +1 -1
- package/dist/external-findings-import.js +12 -1
- package/dist/external-findings-import.js.map +1 -1
- package/dist/external-findings-local.d.ts +66 -4
- package/dist/external-findings-local.d.ts.map +1 -1
- package/dist/external-findings-local.js +234 -53
- package/dist/external-findings-local.js.map +1 -1
- package/dist/external-findings-publish.d.ts +6 -1
- package/dist/external-findings-publish.d.ts.map +1 -1
- package/dist/external-findings-publish.js +326 -1633
- package/dist/external-findings-publish.js.map +1 -1
- package/dist/external-findings-read.d.ts +1 -0
- package/dist/external-findings-read.d.ts.map +1 -1
- package/dist/external-findings-read.js +31 -51
- package/dist/external-findings-read.js.map +1 -1
- package/dist/external-findings.d.ts +1 -1
- package/dist/external-findings.d.ts.map +1 -1
- package/dist/external-findings.js +12 -1
- package/dist/external-findings.js.map +1 -1
- package/dist/external-import-contract.d.ts +3 -11
- package/dist/external-import-contract.d.ts.map +1 -1
- package/dist/external-import-contract.js +29 -176
- package/dist/external-import-contract.js.map +1 -1
- package/dist/external-import-models.d.ts +1 -1
- package/dist/external-import-models.d.ts.map +1 -1
- package/dist/external-import-models.js.map +1 -1
- package/dist/finding-prompt.d.ts.map +1 -1
- package/dist/finding-prompt.js +2 -2
- package/dist/finding-prompt.js.map +1 -1
- package/dist/github-dependabot-findings.d.ts.map +1 -1
- package/dist/github-dependabot-findings.js +3 -4
- package/dist/github-dependabot-findings.js.map +1 -1
- package/dist/github-findings.d.ts.map +1 -1
- package/dist/github-findings.js +19 -287
- package/dist/github-findings.js.map +1 -1
- package/dist/hosted-remediation.d.ts +1 -0
- package/dist/hosted-remediation.d.ts.map +1 -1
- package/dist/hosted-remediation.js +23 -3
- package/dist/hosted-remediation.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/inspector-findings.d.ts.map +1 -1
- package/dist/inspector-findings.js +19 -35
- package/dist/inspector-findings.js.map +1 -1
- package/dist/knowledge-base.d.ts +1 -1
- package/dist/knowledge-base.d.ts.map +1 -1
- package/dist/knowledge-base.js +34 -27
- package/dist/knowledge-base.js.map +1 -1
- package/dist/linear.d.ts +11 -0
- package/dist/linear.d.ts.map +1 -1
- package/dist/linear.js.map +1 -1
- package/dist/local-git-metadata.d.ts +5 -2
- package/dist/local-git-metadata.d.ts.map +1 -1
- package/dist/local-git-metadata.js +8 -4
- package/dist/local-git-metadata.js.map +1 -1
- package/dist/multiscan.d.ts +4 -0
- package/dist/multiscan.d.ts.map +1 -1
- package/dist/multiscan.js +79 -37
- package/dist/multiscan.js.map +1 -1
- package/dist/opengrep-findings.d.ts +4 -2
- package/dist/opengrep-findings.d.ts.map +1 -1
- package/dist/opengrep-findings.js +39 -22
- package/dist/opengrep-findings.js.map +1 -1
- package/dist/private-finding-import.d.ts +8 -13
- package/dist/private-finding-import.d.ts.map +1 -1
- package/dist/private-finding-import.js +69 -129
- package/dist/private-finding-import.js.map +1 -1
- package/dist/project-config.d.ts.map +1 -1
- package/dist/project-config.js +53 -13
- package/dist/project-config.js.map +1 -1
- package/dist/prompt-files.d.ts +7 -2
- package/dist/prompt-files.d.ts.map +1 -1
- package/dist/prompt-files.js +42 -20
- package/dist/prompt-files.js.map +1 -1
- package/dist/provider-profile.d.ts.map +1 -1
- package/dist/provider-profile.js +4 -9
- package/dist/provider-profile.js.map +1 -1
- package/dist/publication.d.ts +1 -1
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js.map +1 -1
- package/dist/record.d.ts +1 -5
- package/dist/record.d.ts.map +1 -1
- package/dist/record.js +3 -51
- package/dist/record.js.map +1 -1
- package/dist/remediation.d.ts.map +1 -1
- package/dist/remediation.js +3 -1
- package/dist/remediation.js.map +1 -1
- package/dist/runtime.d.ts +35 -7
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +778 -153
- package/dist/runtime.js.map +1 -1
- package/dist/saved-scan-bootstrap.d.ts +6 -1
- package/dist/saved-scan-bootstrap.d.ts.map +1 -1
- package/dist/saved-scan-bootstrap.js +267 -115
- package/dist/saved-scan-bootstrap.js.map +1 -1
- package/dist/scan-archive-path.d.ts +2 -0
- package/dist/scan-archive-path.d.ts.map +1 -0
- package/dist/scan-archive-path.js +5 -0
- package/dist/scan-archive-path.js.map +1 -0
- package/dist/scan-comparison.d.ts.map +1 -1
- package/dist/scan-comparison.js +6 -2
- package/dist/scan-comparison.js.map +1 -1
- package/dist/scan-dashboard.d.ts +1 -0
- package/dist/scan-dashboard.d.ts.map +1 -1
- package/dist/scan-dashboard.js +18 -2
- package/dist/scan-dashboard.js.map +1 -1
- package/dist/scan-executor.d.ts.map +1 -1
- package/dist/scan-executor.js +4 -2
- package/dist/scan-executor.js.map +1 -1
- package/dist/scan-history-renderer.d.ts +1 -0
- package/dist/scan-history-renderer.d.ts.map +1 -1
- package/dist/scan-history-renderer.js +25 -9
- package/dist/scan-history-renderer.js.map +1 -1
- package/dist/scan-logs.d.ts.map +1 -1
- package/dist/scan-logs.js +28 -4
- package/dist/scan-logs.js.map +1 -1
- package/dist/scanner-import.d.ts +5 -11
- package/dist/scanner-import.d.ts.map +1 -1
- package/dist/scanner-import.js +16 -89
- package/dist/scanner-import.js.map +1 -1
- package/dist/security-policy.d.ts.map +1 -1
- package/dist/security-policy.js +26 -6
- package/dist/security-policy.js.map +1 -1
- package/dist/semgrep-findings.d.ts.map +1 -1
- package/dist/semgrep-findings.js +14 -48
- package/dist/semgrep-findings.js.map +1 -1
- package/dist/semgrep-platform-findings.d.ts +20 -70
- package/dist/semgrep-platform-findings.d.ts.map +1 -1
- package/dist/semgrep-platform-findings.js +116 -333
- package/dist/semgrep-platform-findings.js.map +1 -1
- package/dist/snyk-findings.d.ts +2 -0
- package/dist/snyk-findings.d.ts.map +1 -1
- package/dist/snyk-findings.js +5 -8
- package/dist/snyk-findings.js.map +1 -1
- package/dist/snyk-rest-findings.d.ts +3 -20
- package/dist/snyk-rest-findings.d.ts.map +1 -1
- package/dist/snyk-rest-findings.js +45 -217
- package/dist/snyk-rest-findings.js.map +1 -1
- package/dist/sonar-findings.d.ts +1 -1
- package/dist/sonar-findings.d.ts.map +1 -1
- package/dist/sonar-findings.js +2 -4
- package/dist/sonar-findings.js.map +1 -1
- package/dist/sonar-import.d.ts +3 -0
- package/dist/sonar-import.d.ts.map +1 -1
- package/dist/sonar-import.js +28 -30
- package/dist/sonar-import.js.map +1 -1
- package/dist/stored-finding-projection.d.ts +6 -0
- package/dist/stored-finding-projection.d.ts.map +1 -0
- package/dist/stored-finding-projection.js +104 -0
- package/dist/stored-finding-projection.js.map +1 -0
- package/dist/stored-findings-publication.d.ts +23 -0
- package/dist/stored-findings-publication.d.ts.map +1 -0
- package/dist/stored-findings-publication.js +169 -0
- package/dist/stored-findings-publication.js.map +1 -0
- package/dist/targets.d.ts +6 -1
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +76 -23
- package/dist/targets.js.map +1 -1
- package/dist/tenable-findings.d.ts +1 -4
- package/dist/tenable-findings.d.ts.map +1 -1
- package/dist/tenable-findings.js.map +1 -1
- package/dist/trivy-findings.d.ts.map +1 -1
- package/dist/trivy-findings.js +0 -11
- package/dist/trivy-findings.js.map +1 -1
- package/dist/trusted-executable.d.ts +6 -0
- package/dist/trusted-executable.d.ts.map +1 -1
- package/dist/trusted-executable.js +140 -37
- package/dist/trusted-executable.js.map +1 -1
- package/dist/veracode-findings.d.ts +1 -3
- package/dist/veracode-findings.d.ts.map +1 -1
- package/dist/veracode-findings.js +13 -38
- package/dist/veracode-findings.js.map +1 -1
- package/dist/version.d.ts +3 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +184 -32
- package/dist/version.js.map +1 -1
- package/dist/wiz-findings.d.ts +2 -2
- package/dist/wiz-findings.d.ts.map +1 -1
- package/dist/wiz-findings.js +14 -92
- package/dist/wiz-findings.js.map +1 -1
- package/docs/cli.md +373 -106
- package/docs/findings-service.md +22 -9
- package/docs/hosted-remediation.md +13 -4
- package/docs/sdk.md +903 -0
- package/package.json +10 -6
- package/schemas/external-findings.schema.json +2 -1
- package/dist/hosted-scanner-v1.d.ts +0 -6
- package/dist/hosted-scanner-v1.d.ts.map +0 -1
- package/dist/hosted-scanner-v1.js +0 -60
- package/dist/hosted-scanner-v1.js.map +0 -1
- package/dist/reader-selection.d.ts +0 -15
- package/dist/reader-selection.d.ts.map +0 -1
- package/dist/reader-selection.js +0 -89
- package/dist/reader-selection.js.map +0 -1
- package/dist/semgrep-platform-v1.d.ts +0 -6
- package/dist/semgrep-platform-v1.d.ts.map +0 -1
- package/dist/semgrep-platform-v1.js +0 -83
- package/dist/semgrep-platform-v1.js.map +0 -1
- package/dist/snyk-rest-v1.d.ts +0 -28
- package/dist/snyk-rest-v1.d.ts.map +0 -1
- package/dist/snyk-rest-v1.js +0 -132
- package/dist/snyk-rest-v1.js.map +0 -1
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
"WITH input AS (SELECT :history AS history),",
|
|
4
4
|
"previews AS (",
|
|
5
5
|
" SELECT version, CASE",
|
|
6
|
+
" -- Prefer the original timestamp when a reader reopened the 52/53 repository preview.",
|
|
7
|
+
" WHEN version IN (64, 67) AND name = 'persist repository identities'",
|
|
8
|
+
" AND EXISTS (SELECT 1 FROM schema_migrations WHERE version = 52 AND name = receipt.name)",
|
|
9
|
+
" THEN 'DELETE FROM schema_migrations'",
|
|
10
|
+
" WHEN version IN (65, 68) AND name = 'stabilize Linux repository generations'",
|
|
11
|
+
" AND EXISTS (SELECT 1 FROM schema_migrations WHERE version = 53 AND name = receipt.name)",
|
|
12
|
+
" THEN 'DELETE FROM schema_migrations'",
|
|
13
|
+
" WHEN version IN (50, 52, 53, 54, 61, 63, 64) AND name = 'persist repository identities'",
|
|
14
|
+
" THEN 'UPDATE schema_migrations SET version = 67'",
|
|
15
|
+
" WHEN version IN (51, 53, 54, 55, 62, 64, 65) AND name = 'stabilize Linux repository generations'",
|
|
16
|
+
" THEN 'UPDATE schema_migrations SET version = 68'",
|
|
17
|
+
" WHEN version IN (56, 63, 65, 66) AND name = 'distinguish unvalidated workspace targets'",
|
|
18
|
+
" THEN 'UPDATE schema_migrations SET version = 69'",
|
|
19
|
+
" WHEN version IN (64, 66, 67) AND name = 'retain checkout roots for Git discovery'",
|
|
20
|
+
" THEN 'UPDATE schema_migrations SET version = 70'",
|
|
21
|
+
" WHEN version IN (67, 68) AND name = 'retain rejected workspace checkout boundaries'",
|
|
22
|
+
" THEN 'UPDATE schema_migrations SET version = 71'",
|
|
6
23
|
" WHEN version IN (48, 50, 63) AND name = 'persist scan log completion boundaries'",
|
|
7
24
|
" THEN 'UPDATE schema_migrations SET version = 64'",
|
|
8
25
|
" WHEN version IN (58, 59) AND name = 'record classification rubric provenance'",
|
|
@@ -13,23 +30,13 @@
|
|
|
13
30
|
" THEN 'UPDATE schema_migrations SET version = 50'",
|
|
14
31
|
" WHEN version = 63 AND name = 'retain native investigation time allowances'",
|
|
15
32
|
" THEN 'DELETE FROM schema_migrations'",
|
|
16
|
-
" END AS repair FROM schema_migrations",
|
|
33
|
+
" END AS repair FROM schema_migrations AS receipt",
|
|
17
34
|
")",
|
|
18
35
|
"SELECT 'sql' AS operation, repair || ' WHERE version = ' || version AS value",
|
|
19
36
|
"FROM previews WHERE repair IS NOT NULL",
|
|
20
37
|
"-- Vacate checkpoint preview 50 before moving a lower source-scope receipt into it.",
|
|
21
38
|
"ORDER BY version DESC;"
|
|
22
39
|
],
|
|
23
|
-
[
|
|
24
|
-
"WITH history AS (",
|
|
25
|
-
" SELECT json_extract(value, '$.version') AS version,",
|
|
26
|
-
" json_extract(value, '$.name') AS name FROM json_each(:history)",
|
|
27
|
-
")",
|
|
28
|
-
"SELECT 'error' AS operation,",
|
|
29
|
-
" 'The Codex Security database has an unsupported source-scope migration history.' AS value",
|
|
30
|
-
"FROM schema_migrations JOIN history USING (version)",
|
|
31
|
-
"WHERE version IN (43, 50) AND schema_migrations.name != history.name;"
|
|
32
|
-
],
|
|
33
40
|
[
|
|
34
41
|
"-- mirror and early-moves: relocate numbers before checking profiles.",
|
|
35
42
|
"WITH",
|
|
@@ -50,9 +57,20 @@
|
|
|
50
57
|
"),",
|
|
51
58
|
"moves(position, version, destination, name) AS (",
|
|
52
59
|
" VALUES",
|
|
53
|
-
" (
|
|
54
|
-
" (1,
|
|
55
|
-
" (
|
|
60
|
+
" (-2, 48, 67, 'persist repository identities'),",
|
|
61
|
+
" (-1, 49, 68, 'stabilize Linux repository generations'),",
|
|
62
|
+
" (0, 44, 68, 'stabilize Linux repository generations'),",
|
|
63
|
+
" (1, 45, 68, 'stabilize Linux repository generations'),",
|
|
64
|
+
" (2, 30, 67, 'persist repository identities'),",
|
|
65
|
+
" (3, 31, 67, 'persist repository identities'),",
|
|
66
|
+
" (4, 33, 67, 'persist repository identities'),",
|
|
67
|
+
" (5, 40, 67, 'persist repository identities'),",
|
|
68
|
+
" (6, 42, 67, 'persist repository identities'),",
|
|
69
|
+
" (7, 43, 67, 'persist repository identities'),",
|
|
70
|
+
" (8, 44, 67, 'persist repository identities'),",
|
|
71
|
+
" (9, 33, 40, 'index finding identity and comparison history'),",
|
|
72
|
+
" (10, 25, 26, 'persist scan completion warnings'),",
|
|
73
|
+
" (11, 12, 20, 'phase-specific scan progress')",
|
|
56
74
|
")",
|
|
57
75
|
"SELECT 0 AS position, 'error' AS operation,",
|
|
58
76
|
" 'The Codex Security database has an unsupported mirror migration history.' AS value",
|
|
@@ -69,6 +87,34 @@
|
|
|
69
87
|
" FROM moves JOIN schema_migrations USING (version, name)",
|
|
70
88
|
"ORDER BY position;"
|
|
71
89
|
],
|
|
90
|
+
[
|
|
91
|
+
"WITH history AS (",
|
|
92
|
+
" SELECT json_extract(value, '$.version') AS version,",
|
|
93
|
+
" json_extract(value, '$.name') AS name FROM json_each(:history)",
|
|
94
|
+
")",
|
|
95
|
+
"SELECT 'error' AS operation,",
|
|
96
|
+
" 'The Codex Security database has an unsupported source-scope migration history.' AS value",
|
|
97
|
+
"FROM schema_migrations JOIN history USING (version)",
|
|
98
|
+
"WHERE version IN (43, 50) AND schema_migrations.name != history.name;"
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
"-- A released reader can add its columns while a repository preview still owns the version.",
|
|
102
|
+
"WITH released(version, table_name, column_name) AS (",
|
|
103
|
+
" VALUES (54, 'workspaces', 'deep_scan_config_json'),",
|
|
104
|
+
" (55, 'deep_scan_runs', 'pending_target_project_path'),",
|
|
105
|
+
" (58, 'deep_scan_runs', 'terminal_reviewed_surface_count'),",
|
|
106
|
+
" (59, 'deep_scan_runs', 'service_tier'),",
|
|
107
|
+
" (61, 'scans', 'launch_surface')",
|
|
108
|
+
")",
|
|
109
|
+
"SELECT 'timestamp' AS operation,",
|
|
110
|
+
" 'INSERT INTO schema_migrations (version, name, applied_at) VALUES (' ||",
|
|
111
|
+
" released.version || ', ' || quote(json_extract(history.value, '$.name')) || ', ?)' AS value",
|
|
112
|
+
"FROM released JOIN json_each(:history) AS history",
|
|
113
|
+
" ON json_extract(history.value, '$.version') = released.version",
|
|
114
|
+
"WHERE EXISTS (SELECT 1 FROM schema_migrations WHERE name = 'persist repository identities')",
|
|
115
|
+
" AND NOT EXISTS (SELECT 1 FROM schema_migrations WHERE version = released.version)",
|
|
116
|
+
" AND EXISTS (SELECT 1 FROM pragma_table_info(released.table_name) WHERE name = released.column_name);"
|
|
117
|
+
],
|
|
72
118
|
[
|
|
73
119
|
"-- A main-branch reader may have added discovery context under the old checkpoint number.",
|
|
74
120
|
"SELECT 'timestamp' AS operation,",
|
|
@@ -522,5 +522,71 @@
|
|
|
522
522
|
"version": 64,
|
|
523
523
|
"name": "persist scan log completion boundaries",
|
|
524
524
|
"statements": ["ALTER TABLE scans ADD COLUMN log_completed_at TEXT;"]
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"version": 65,
|
|
528
|
+
"name": "bind Windows Deep Scan resume output directories",
|
|
529
|
+
"statements": [
|
|
530
|
+
"ALTER TABLE scans ADD COLUMN windows_resume_output_identity TEXT;"
|
|
531
|
+
]
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"version": 66,
|
|
535
|
+
"name": "bind Windows Deep Scan resume checkouts",
|
|
536
|
+
"statements": [
|
|
537
|
+
"ALTER TABLE scans ADD COLUMN windows_resume_target_identity TEXT;"
|
|
538
|
+
]
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"version": 67,
|
|
542
|
+
"name": "persist repository identities",
|
|
543
|
+
"statements": [
|
|
544
|
+
"ALTER TABLE security_targets\n ADD COLUMN repository_identity TEXT;",
|
|
545
|
+
"CREATE INDEX security_targets_by_repository_identity\n ON security_targets(repository_identity);",
|
|
546
|
+
"ALTER TABLE scans\n ADD COLUMN repository_generation TEXT;",
|
|
547
|
+
"CREATE INDEX scans_by_repository_generation\n ON scans(repository_generation);",
|
|
548
|
+
"CREATE INDEX scans_by_target_path\n ON scans(target_path);",
|
|
549
|
+
"ALTER TABLE scans\n ADD COLUMN completion_sequence INTEGER CHECK (completion_sequence >= 1);",
|
|
550
|
+
"CREATE UNIQUE INDEX scans_completion_sequence\n ON scans(completion_sequence);",
|
|
551
|
+
"CREATE TRIGGER scans_assign_inserted_completion_sequence\n AFTER INSERT ON scans\n WHEN NEW.status = 'complete' AND NEW.completion_sequence IS NULL\n BEGIN\n UPDATE scans\n SET completion_sequence = (\n SELECT COALESCE(MAX(completion_sequence), 0) + 1 FROM scans\n )\n WHERE id = NEW.id AND completion_sequence IS NULL;\n END;",
|
|
552
|
+
"CREATE TRIGGER scans_assign_updated_completion_sequence\n AFTER UPDATE OF status ON scans\n WHEN NEW.status = 'complete' AND NEW.completion_sequence IS NULL\n BEGIN\n UPDATE scans\n SET completion_sequence = (\n SELECT COALESCE(MAX(completion_sequence), 0) + 1 FROM scans\n )\n WHERE id = NEW.id AND completion_sequence IS NULL;\n END;"
|
|
553
|
+
]
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"version": 68,
|
|
557
|
+
"name": "stabilize Linux repository generations",
|
|
558
|
+
"statements": []
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"version": 69,
|
|
562
|
+
"name": "distinguish unvalidated workspace targets",
|
|
563
|
+
"statements": [
|
|
564
|
+
"ALTER TABLE workspaces\n ADD COLUMN target_path_unvalidated INTEGER NOT NULL DEFAULT 0\n CHECK (target_path_unvalidated IN (0, 1));"
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"version": 70,
|
|
569
|
+
"name": "retain checkout roots for Git discovery",
|
|
570
|
+
"statements": [
|
|
571
|
+
"ALTER TABLE security_targets ADD COLUMN git_checkout_root TEXT;"
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"version": 71,
|
|
576
|
+
"name": "retain rejected workspace checkout boundaries",
|
|
577
|
+
"statements": [
|
|
578
|
+
"ALTER TABLE workspaces ADD COLUMN rejected_checkout_roots_json TEXT;"
|
|
579
|
+
]
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"version": 72,
|
|
583
|
+
"name": "retain external finding import selections and provenance",
|
|
584
|
+
"statements": [
|
|
585
|
+
"CREATE TABLE external_finding_imports (\n id TEXT PRIMARY KEY,\n repository TEXT NOT NULL,\n created_at TEXT NOT NULL,\n provider TEXT NOT NULL,\n source_key TEXT NOT NULL,\n provenance_json TEXT,\n selection_json TEXT NOT NULL\n);",
|
|
586
|
+
"CREATE INDEX external_finding_imports_by_repository ON external_finding_imports (repository, created_at);",
|
|
587
|
+
"CREATE TABLE external_finding_import_members (\n import_id TEXT NOT NULL REFERENCES external_finding_imports(id),\n position INTEGER NOT NULL,\n finding_id TEXT NOT NULL REFERENCES external_source_reports(id),\n version INTEGER NOT NULL,\n PRIMARY KEY (import_id, position)\n) WITHOUT ROWID;",
|
|
588
|
+
"CREATE INDEX external_finding_members_by_version\nON external_finding_import_members (finding_id, version);",
|
|
589
|
+
"CREATE TABLE external_finding_publications (\n finding_id TEXT NOT NULL REFERENCES external_source_reports(id),\n version INTEGER NOT NULL,\n cloud_api_url TEXT NOT NULL,\n account_id TEXT NOT NULL,\n destination_id TEXT NOT NULL,\n receipt_id TEXT NOT NULL,\n outcome TEXT NOT NULL,\n cloud_finding_id TEXT,\n created_at TEXT NOT NULL,\n PRIMARY KEY (finding_id, version, cloud_api_url, account_id, destination_id, receipt_id)\n) WITHOUT ROWID;"
|
|
590
|
+
]
|
|
525
591
|
}
|
|
526
592
|
]
|
|
@@ -35,6 +35,7 @@ Treat the finding as a data-flow and boundary problem, not merely the named inpu
|
|
|
35
35
|
1. Trace the reported path and inspect only the context needed to identify the real shared boundary. Return `no_change` when repository evidence shows that the reported path is already safe; do not make a speculative change.
|
|
36
36
|
2. In standard mode, when feasible, run the smallest high-signal reproduction through that boundary and one legitimate control through the same path.
|
|
37
37
|
3. Implement the smallest repository-native fix at the shared boundary. Prefer nearby helpers and established APIs. Do not broaden into unrelated redesign, cleanup, or sibling findings.
|
|
38
|
+
- If the finding includes a proposed patch for this repository, use it as the starting candidate. For AWS Continuum, read `patches[].patch` from a collector capture or `source_data.patches[].patch` from the stored finding's `evidence`. Compare the hunks with the current checkout. Keep those that enforce the security invariant and adapt or replace those that leave a bypass or break legitimate behavior. If only artifact metadata is available, develop the fix from source.
|
|
38
39
|
4. Before verification, challenge the patch rather than defending it: inspect every direct caller of each changed helper and both outcomes of each changed condition. Look for one sibling path, representation, or copy that still reaches the vulnerable sink and one ordinary or default input that the patch newly rejects or reinterprets; revise the implementation if either exists.
|
|
39
40
|
5. In standard mode, verify the resulting change:
|
|
40
41
|
- inspect the final diff and run the narrowest syntax, import, build, or type check relevant to it
|
|
@@ -1,180 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: publish-findings
|
|
3
|
-
description:
|
|
3
|
+
description: Import findings from scanners, CI reports, vendor CLIs, APIs, or connected tools into the local workbench. Publish a selection of stored vendor findings to Codex Security Cloud.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Publish external findings
|
|
7
7
|
|
|
8
|
-
Use
|
|
8
|
+
Use this workflow for third-party scanner evidence. For “publish these findings,” start with the local workbench. For “import,” acquire the requested records and store them locally. For “import and publish,” publish the selection returned by the import. Use the “Import external findings” section of `docs/sdk.md` in the installed `@openai/codex-security` package. For a global npm install, its directory is `$(npm root --global)/@openai/codex-security`. Run SDK snippets from that trusted directory with absolute paths to the checkout and reports.
|
|
9
9
|
|
|
10
10
|
## Select the evidence
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Identify whether the user wants a fresh scan, a previous scan or CI artifact, existing upstream issues, or records already in the workbench. Carry forward the selected repository, project, ref, products, filters, and exact finding IDs. A local scan can produce different findings from a hosted backlog or an earlier build.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
For a fresh scan, look for the relevant executable in the environment where it will run. Inspect its help when needed. For an existing hosted selection, inspect the tools actually available in this session or use a signed-in vendor CLI or authorized read API. Verify access with a scoped read or a documented status command. Use the vendor’s credential store or supported environment variables and keep credentials out of command arguments and imported evidence. Reuse a complete previous result from the same scope. Follow pagination, retain native records, and explain missing IDs or incomplete coverage. Ask for a missing account or repository only when the selection cannot be resolved from the available evidence.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Local records remain unassessed source evidence, separate from `findings list` and completed scans. Repeated imports use the same repository/provider/source-key/source-ID identity; omitted records remain stored. When a source repository URL and local Git remotes are available, the URL must match a remote. Local import does not publish to Cloud or automatically investigate or patch findings.
|
|
31
|
-
|
|
32
|
-
## Trivy dependency vulnerabilities
|
|
33
|
-
|
|
34
|
-
Use `--provider trivy` with a saved schema-v2 repository or filesystem report (JSON or gzip). Preview with a stable project/branch source key and `--trivy-scan-root` relative to the checkout (`.` for the whole checkout). Omit the root only when the report's Git metadata corroborates a remote repository scan. Check the source, package paths and exclusions before importing. Trivy's `fixed` status identifies an available upstream fix. [Trivy import guide](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/trivy.md)
|
|
35
|
-
|
|
36
|
-
## Amazon Inspector repository findings
|
|
37
|
-
|
|
38
|
-
Use `--provider inspector` and `--source-repository-url` with a complete Inspector2 ListFindings export for one Code Security repository. If it contains only a project ARN and name, pass the full `--inspector-project-arn ARN` verified for that Git URL in the SCM integration. Supply the same ARN when resuming a pending Cloud submission. Self-managed GitLab is supported locally.
|
|
39
|
-
|
|
40
|
-
## AWS Continuum code findings
|
|
41
|
-
|
|
42
|
-
Use `--provider continuum` and `--source-repository-url` for an AWS Continuum for Code Vulnerabilities export. Verify which repository owns each selected finding. Use `aws continuum get-code-finding` for a selected ID, or `list-code-findings` with automatic pagination when every row belongs to the requested repository. Reuse the same source key for that environment and repository. [Continuum import guide](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/continuum.md)
|
|
43
|
-
|
|
44
|
-
## Black Duck SCA project-version vulnerabilities
|
|
45
|
-
|
|
46
|
-
Use `--provider blackduck` for a BOM-6 vulnerable-components export from one project version. Supply `--source-repository-url` after verifying the project version maps to that repository. Keep the same source key on replay and preview the destination before importing.
|
|
47
|
-
|
|
48
|
-
## Checkmarx SAST
|
|
49
|
-
|
|
50
|
-
Use `--provider checkmarx` for a Checkmarx One CLI JSON or self-managed CxSAST XML report. To retrieve a completed scan, follow the [Checkmarx collection instructions](references/checkmarx-import.md). Collection retrieves the full scan. If the user wants a subset, ask for a filtered vendor export. Before fetching CxSAST XML, verify the scan ID, project and owning team on the selected server.
|
|
51
|
-
|
|
52
|
-
Preview the report for the verified repository and ref with `--dry-run --format json`. After confirmation, use the same report path and source key for the import and any retries.
|
|
53
|
-
|
|
54
|
-
## Veracode Static Analysis policy findings
|
|
55
|
-
|
|
56
|
-
Use `--provider veracode` with all Findings API pages for one application’s STATIC policy findings. Verify that the application maps to the repository named by `--source-repository-url`. Keep the source key stable for that application and preview the import before writing.
|
|
57
|
-
|
|
58
|
-
## Endor Labs findings
|
|
59
|
-
|
|
60
|
-
Use authenticated `endorctl` for one verified project and context. Omit `--field-mask` to keep complete native Finding objects. Replace `/path/to/private/reports` with a private directory outside the checkout.
|
|
61
|
-
|
|
62
|
-
```sh
|
|
63
|
-
out=$(mktemp -d "/path/to/private/reports/endor.XXXXXX") &&
|
|
64
|
-
endorctl api list --resource Finding --namespace "YOUR_NAMESPACE" \
|
|
65
|
-
--filter 'context.type==CONTEXT_TYPE_MAIN and spec.project_uuid=="PROJECT_UUID"' \
|
|
66
|
-
--list-all --output-type json > "$out/findings.tmp" &&
|
|
67
|
-
mv "$out/findings.tmp" "$out/endor-findings.json" &&
|
|
68
|
-
printf '%s\n' "$out/endor-findings.json"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Preview the completed file with `--provider endor` and a stable source key such as `YOUR_NAMESPACE/PROJECT_UUID/main`. Match the project to the destination repository. For another branch or scan context, change the filter and use a distinct source key. The [official Endor Labs Agent Kit for Codex](https://github.com/endorlabs/ai-plugins/tree/main/plugins/codex/endor-labs-agent-kit) can help with setup and investigation; its summaries, counts and field-masked results do not replace complete Finding objects. The [CLI API](https://docs.endorlabs.com/developers-api/cli/commands/api) supplies the export. The importer reads that saved file; it does not maintain an Endor API connection or write changes back to Endor.
|
|
72
|
-
|
|
73
|
-
Native JSON retains severity, scanned commit, package and advisory data, and primary SAST/AI SAST locations. Existing self-contained endorctl SARIF is a lossy compatibility format that retains finding UUIDs and links; unavailable severity or revisions stay unknown. Both formats use the Endor UUID within the selected repository and source key as identity. Importing SARIF after native JSON updates the same record by replacing its evidence snapshot, not merging it: native detail absent from SARIF is removed from that snapshot. Use native JSON consistently for ongoing imports. Keep the original evidence and inspect exclusions. Imported records remain unassessed source evidence. Follow the [local](#import-locally) or [Cloud](#publish-to-cloud) workflow for the chosen destination.
|
|
74
|
-
|
|
75
|
-
## Wiz findings
|
|
76
|
-
|
|
77
|
-
Read [Wiz import formats](references/wiz-import.md#finding-formats) before preparing input. Use an authorized [Wiz MCP](https://www.wiz.io/blog/introducing-wiz-mcp) or Wiz API connection; a configured plugin may provide it, but do not assume an official Codex plugin is available. Prefer supported native JSON. Inspect actual records, finish the requested pagination, and save only the selected evidence with its original occurrence IDs. A supplied export is also supported. Summaries, Wiz Issues, and local CLI scan results are not automatically supported finding records.
|
|
78
|
-
|
|
79
|
-
Validate the acquisition path against actual responses from an authorized Wiz tenant; local parser checks do not establish that qualification. Direct CSV input covers repository package vulnerabilities (SCA) only, not SAST or cloud posture findings, and does not provide a complete Wiz code-to-cloud integration.
|
|
80
|
-
|
|
81
|
-
Use a stable Wiz tenant/finding namespace as `--source-key`; a project filter does not create a new identity. Confirm the selected assets or builds belong to the destination repository. Do not infer source branches or revisions from the current checkout, invent missing evidence, or import vendor credentials, unrelated records, or local assessments as original scanner evidence. Do not retrieve or test credentials or apply suggested fixes.
|
|
82
|
-
|
|
83
|
-
## Snyk findings
|
|
84
|
-
|
|
85
|
-
For an existing monitored Open Source or Code project, follow the [Snyk Issues API import guide](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/snyk.md#existing-issues-from-snyk). With a read-authorized `SNYK_TOKEN`, run `codex-security import snyk PROJECT_ID --snyk-org ORG_ID --source-repository-url URL --format json`. Add `--snyk-product code` for a Code project and `--snyk-api-origin` for a regional deployment. Save the complete successful JSON output, preview with `publish findings --provider snyk` and the requested `--to local` or `--to cloud` destination, then confirm the import.
|
|
86
|
-
|
|
87
|
-
Prefer the [official Snyk Codex plugin](https://github.com/snyk/studio-recipes/tree/main/plugins/codex) when available. Ask its `snyk-findings-export` skill for **SCA only from the repository’s Git root** and save the `snyk-findings-export/v1` bundle. It scans the current workspace through local MCP; it cannot list existing platform projects or retrieve earlier findings. Do not substitute a fresh scan for a request to read a platform backlog. Authentication, relevant Snyk access and the project's package tooling are required.
|
|
88
|
-
|
|
89
|
-
Import the bundle with `--provider snyk`, choosing `--to local --repository /path/to/project` or `--to cloud --repository https://github.com/example/project`. Use a stable repository/branch/scan-target/acquisition namespace such as `github.com/example/project/main/root/plugin-sca`. Check the bundle's scan outcomes, collection completeness and limitations alongside the preview. Only Open Source SCA vulnerability records are supported; other categories are explicit exclusions. Preserve the native MCP record and unavailable fields. MCP descriptions may be shortened and alternate dependency paths omitted; do not reconstruct missing evidence. Plugin v1 paths are target-relative without a Git-root offset, so the importer keeps them in original evidence instead of repository locations. Use a distinct source key for each scan target. Ignore status is a source policy decision, not a Codex assessment or a fix.
|
|
90
|
-
|
|
91
|
-
For CLI automation, prefer `snyk test --file=package.json --json-file-output=snyk-open-source.json` from the selected repository root. Exit 1 means vulnerabilities were found; stop on other nonzero exits instead of importing a stale file. The existing `--provider snyk` autodetects native JSON (one project or an `--all-projects` array), plugin JSON and Open Source SARIF. Native JSON preserves per-dependency-path records and remediation fields; do not use `--group-issues`. Project errors stop import. Native JSON paths also lack a Git-root offset and stay in original evidence. These workspace scan formats import Open Source SCA vulnerabilities.
|
|
92
|
-
|
|
93
|
-
Use one format consistently per repository, branch and scan target, with a stable source key such as `github.com/example/project/main/root/native-sca`. Plugin, native JSON and SARIF have distinct identities; use separate keys when switching, without claiming cross-format deduplication or removal of older records. Existing `snyk test --sarif-file-output=snyk-open-source.sarif` reports remain a compatibility path. SARIF groups advisory occurrences and exposes one package coordinate, so prefer JSON for acquisition. Its target-relative manifest paths lack a Git-root offset and stay in original evidence with synthetic line numbers, without being projected as repository locations or package manifest paths.
|
|
16
|
+
| Source | Acquisition guidance |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| Trivy | For a fresh filesystem vulnerability scan, run `trivy fs --scanners vuln --format json --output REPORT.json .` from the chosen directory. For an earlier scan, read its repository or filesystem schema-v2 JSON or gzip artifact. Supply the checkout-relative `--trivy-scan-root` for filesystem reports. |
|
|
19
|
+
| Semgrep CLI or CI | For a fresh Code scan, use the installed CLI with the selected rules, e.g. `semgrep scan --config RULES --json-output REPORT.json .`. For an existing CI job, use its Code JSON or self-contained SARIF artifact. |
|
|
20
|
+
| Semgrep Guardian MCP | Use the connected Guardian tool `get_semgrep_sast_findings` or `get_semgrep_supply_chain_findings` with the deployment, repository, full ref, and selected filters. Match exact string finding IDs. Preserve the original request and selected tool rows in the [Guardian capture](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/semgrep.md#import-selected-guardian-findings). |
|
|
21
|
+
| Semgrep hosted AppSec Platform MCP | Use `semgrep_account` and `ProjectsService_GetProject` to verify the project SCM URL. Use `IssuesService_ListIssues` scoped to that project, full ref, and `ISSUE_TYPE_SAST`, and retain the selected string issue IDs and original rows. Follow the [hosted MCP capture format](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/semgrep.md#import-selected-code-findings-from-the-hosted-mcp). Guardian and hosted Platform IDs use distinct namespaces. |
|
|
22
|
+
| Semgrep Platform Web API | For a whole project and ref use `codex-security import semgrep PROJECT --deployment DEPLOYMENT --ref REF --format json`. For selected SAST IDs use the original project response and selected findings pages. |
|
|
23
|
+
| GitHub | The signed-in GitHub CLI collector `codex-security import github OWNER/REPO` accepts repeated `--github-alert NUMBER` or a `--github-ref REF`. Use `import github-advisories` for advisories. For Dependabot, export full paginated repository REST alert objects through the available GitHub connection. Keep separate source keys for these three families. |
|
|
24
|
+
| Snyk | For a monitored Open Source project use `codex-security import snyk PROJECT_ID --org ORG_ID --source-repository-url URL --format json`. Add `--snyk-product code` for a monitored Code project. For a fresh dependency scan use native `snyk test` JSON or the signed-in Snyk plugin's SCA export from the requested root. Keep acquisition formats in distinct namespaces. |
|
|
25
|
+
| Checkmarx | Export a completed Checkmarx One scan as CLI JSON or self-managed CxSAST as XML. Follow the [collector instructions](references/checkmarx-import.md) for the selected product, scan, and verified owning project. |
|
|
26
|
+
| Wiz | Use the connected Wiz tools or API to retrieve the selected repository findings by occurrence ID, or use a detailed report. JSON covers multiple finding families. Detailed CSV covers repository package vulnerabilities. [Wiz input profiles](references/wiz-import.md) |
|
|
27
|
+
| AWS Continuum | From a trusted directory outside the checkout, run the [bundled collector](scripts/collect_continuum.py) with the signed-in AWS CLI and selected profile and Region. Pass `--source-root` with the absolute path of the selected local checkout, `--environment-id`, `--finding-id`, and either `--single-repository` for a verified single-repository environment or `--repository-name` with the exact AWS source name. Import the resulting JSON to retain generated patches as evidence. A saved native detail or complete single-repository list also works offline. [Continuum guide](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/continuum.md) |
|
|
28
|
+
| Other built-in readers | OpenGrep accepts native scan JSON including scanner errors. Endor uses `endorctl` Finding JSON with complete records. Inspector uses Inspector2 ListFindings for one Code Security repository. Black Duck uses BOM-6 vulnerable components for one project version. Veracode uses paginated STATIC policy findings for one application. Tenable uses a selected Code Repository inventory capture and verified HTTPS clone URL. [Provider guides and identity rules](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/README.md#choose-your-scanner) |
|
|
94
29
|
|
|
95
|
-
|
|
30
|
+
### SonarQube Cloud issues
|
|
96
31
|
|
|
97
|
-
|
|
32
|
+
Retrieve existing Sonar issues with the signed-in `sonar` CLI. The Sonar plugin can supply selected issue keys; collect full issue and flow evidence for that same project, branch or pull request. Preview with `codex-security import sonar --sonar-project PROJECT --sonar-branch BRANCH --sonar-issue KEY --dry-run --format json` (repeat `--sonar-issue` for more keys). Use the preview's saved capture for an approved import. For findings already stored in the workbench, select them directly. [Sonar workflow](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/sonar.md#import-and-verify)
|
|
98
33
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
For a user-requested new scan, use the installed Semgrep CLI from the source repository root with the selected SAST rules: `semgrep scan --config /path/to/sast-rules.yaml --json-output /path/to/semgrep.json .`. Existing CI jobs can produce the same artifact using `--json-output`; authenticated `semgrep ci --code` follows the job's policy and baseline scope. Explain that this generates fresh scan findings, and do not substitute it for a request to retrieve existing Platform findings.
|
|
102
|
-
|
|
103
|
-
For a selection of existing Code or Supply Chain findings in Codex, use the signed-in [Semgrep Guardian plugin](https://docs.semgrep.dev/semgrep-guardian/quickstart). Call its `get_semgrep_sast_findings` or `get_semgrep_supply_chain_findings` tool with the selected `deployment_name`, `repository_name` and full `ref`. Preserve any state and severity filters used for that selection. Reuse an existing successful tool result when its scope is explicit. If a selected ID is missing, report it and check the query scope and filters with the user. A project-wide fetch is a separate request.
|
|
104
|
-
|
|
105
|
-
Save a private JSON capture outside the checkout with `format: "semgrep-guardian-selection/v1"`, the verified `sourceRepositoryUrl`, the MCP `request` (tool `name` and `arguments`), the exact selected string `findingIds`, and `structuredContent: { findings: [...] }` containing the original selected tool rows. Match IDs exactly and keep the tool's repository, ref and evidence. Guardian returns a repository name, so verify its SCM URL for the local checkout or selected Cloud repository. Use the [Guardian preview command](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/semgrep.md#import-selected-guardian-findings) for the intended destination and confirm after reviewing the selection. Guardian handles sign-in for this workflow. Guardian and Web API IDs remain separate even when the strings match.
|
|
106
|
-
|
|
107
|
-
For a whole project and ref, use the [Web API collector](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/semgrep.md#collect-a-platform-project-and-branch) with its read-capable token. If the user supplies [saved Web API responses](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/semgrep.md#existing-platform-findings), use the IDs from those records. Preview Web API findings against the requested local or Cloud repository.
|
|
108
|
-
|
|
109
|
-
Import the native report with `--provider semgrep`, a stable organization/project/branch `--source-key`, and `--source-repository-url` identifying the actual source repository. Use `--to local --repository /path/to/project` for local storage or `--to cloud --repository URL_OR_ID` for Cloud. The source URL is checked against configured local Git remotes or the Cloud destination. Preview with `--dry-run --format json` before confirming the import.
|
|
110
|
-
|
|
111
|
-
Keep supplied fingerprints. Reimporting the same fingerprint after code moves updates the existing source record with the new range. If the fingerprint is absent or `requires login`, the fallback uses rule, literal path and range: movement creates a second retained record, and the earlier record remains stored. Do not infer a merge or deletion. Read the persisted evidence with `codex-security findings imported /path/to/project --format json` before assessment. Source rule, CWE, snippets, traces and status are vendor evidence, not Codex assessments. Do not infer a report revision from the current checkout. Resolve scan errors and review all exclusions before uploading; do not remove error metadata to force acceptance.
|
|
112
|
-
|
|
113
|
-
## OpenGrep
|
|
114
|
-
|
|
115
|
-
Import native OpenGrep JSON with `--provider opengrep`, `--source-repository-url`, and a stable OpenGrep-specific `--source-key`. Preview the destination and scan diagnostics before importing. Local and Cloud imports use the Semgrep provider and retain OpenGrep as the scanner origin.
|
|
116
|
-
|
|
117
|
-
## SonarQube Cloud issues
|
|
118
|
-
|
|
119
|
-
For “import these Sonar findings,” carry over the Sonar project, branch or PR, and the exact issue keys selected in the [SonarQube plugin for Codex](https://www.sonarsource.com/blog/now-available-sonarqube-plugin-for-codex/). Use the keys from the underlying Sonar result. If only a formatted table remains, resolve the selected rows against the same project and ref and ask about ambiguous matches. A rule can occur more than once. Never turn a selection into a project-wide import.
|
|
120
|
-
|
|
121
|
-
From the intended checkout, preview the selection using the developer's authenticated `sonar` CLI. Use `--sonar-pull-request` in place of `--sonar-branch` for a PR. Omit `--sonar-issue` only when the user wants the project's open security issues. If the project has no verified SCM binding, confirm the repository URL that belongs to the project and pass it with `--source-repository-url`.
|
|
122
|
-
|
|
123
|
-
```sh
|
|
124
|
-
codex-security import sonar --sonar-project example_project --sonar-branch main \
|
|
125
|
-
--sonar-issue ISSUE_A --sonar-issue ISSUE_B --dry-run --format json
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Pass `--to cloud` at preview time if the user also requested Cloud publication. Show the selected issues and exclusions, the local repository, and any Cloud destination as described under [Publish to Cloud](#publish-to-cloud). The preview returns a private evidence file in `capture`. After confirmation, run `codex-security import sonar CAPTURE --yes` for local import. For Cloud, use the exact `capture` from the successful Cloud preview and add `--to cloud`. If the account, repository, or environment changes, show a fresh preview and ask for confirmation. If Cloud is unavailable, finish the requested local import and report the Cloud error. For a request to publish an existing import, start with its capture. Report the saved path so the developer can resume.
|
|
129
|
-
|
|
130
|
-
Sonar authentication is required only for a live fetch. If the local CLI lacks a login, direct the user to `sonar auth login` and keep the selection. A hosted MCP connection can help identify issues, but its issue summaries omit flow evidence. Use the signed-in CLI or a saved Codex Security Sonar capture to complete the import. If `codex-security` is absent, ask the user to install it from a trusted directory and invoke that installed executable in the checkout.
|
|
131
|
-
|
|
132
|
-
## GitHub alerts and advisories
|
|
133
|
-
|
|
134
|
-
Acquire code-scanning findings with `codex-security import github OWNER/REPO --format json` and save its complete JSON output for local import or Cloud publication. This existing collector completes pagination, fetches alert details, and retains the selected ref's instance. In Codex, use the official [GitHub Codex plugin](https://github.com/openai/plugins/tree/main/plugins/github) for discovery and selecting alerts, then pass that selection to the collector. Its GitHub MCP server paginates each list call separately. Do not ask the user to download JSON from a website or reconstruct a code-scanning import envelope from MCP summaries. Use the saved collector output for code-scanning alerts.
|
|
135
|
-
|
|
136
|
-
The importer uses the user's GitHub CLI authentication and `GH_HOST`; plugin authentication is separate. It defaults to open alerts on the default branch. Use repeated `--github-alert NUMBER` for exact alerts or `--github-ref REF` for another ref. Save complete output without field/token filters or `--full-output`. Reading code-scanning alerts requires a token with Code scanning alerts read permission (classic: `security_events`, or `public_repo` for public repositories), along with repository access.
|
|
137
|
-
|
|
138
|
-
For Dependabot, follow the [repository alert export guide](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/github-dependabot.md) to save the native REST alert records from one repository. The read-only export requires Dependabot alerts read permission. Preview the file with `publish findings FILE --provider github`, the intended destination and a separate source key such as `github.com/example/project/dependabot`.
|
|
139
|
-
|
|
140
|
-
**GHSA import stages advisory evidence for investigation; it does not establish an installed dependency or applicability to the destination repository.** Keep advisories separate from code scanning. `codex-security import github-advisories OWNER/REPO --format json` reads published repository disclosures by default. Repeated `--github-advisory GHSA-xxxx-xxxx-xxxx` selects exact IDs; `--github-state draft|triage|closed` explicitly selects an unpublished list and cannot be combined with exact IDs. Add `--github-advisory-source global` for exact public database IDs. This does not enumerate the global database. Private advisory access needs Repository security advisories read permission and access to those records. Stop on a read failure instead of publishing an incomplete selection.
|
|
34
|
+
## Import locally
|
|
141
35
|
|
|
142
|
-
|
|
36
|
+
Use the matching native SDK reader or the existing CLI, for example `codex-security publish findings REPORT.json --to local --provider trivy --source-key PROJECT/BRANCH --repository CHECKOUT --trivy-scan-root . --dry-run --format json`. Use a source key stable across repeated imports of this selection. Review the repository, evidence, exclusions and scanner errors. For the requested write, drop `--dry-run` and use `--yes` when approved. Keep the import ID and finding versions from the result. A partial import exits with code 1. Check the saved findings and report the exclusions before retrying.
|
|
143
37
|
|
|
144
|
-
|
|
38
|
+
For an unfamiliar format, inspect actual rows and write a parser in the language appropriate to the source. Pass the findings, read count and exclusions to `prepareNormalizedLocalImport` with the checkout, provider and source key. Give each occurrence a stable source ID, preserve relevant native evidence and repository identity, and account for every selected row with either evidence or a numbered exclusion. Report skipped or missing items. A repeated import can include unchanged findings; the import ID identifies the entire stored selection.
|
|
145
39
|
|
|
146
40
|
## Publish to Cloud
|
|
147
41
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
For an alternate Cloud deployment, configure the [deployment settings](#deployment-settings) before previewing. Keep the selected deployment and login throughout the upload.
|
|
151
|
-
|
|
152
|
-
### Preview and approve
|
|
153
|
-
|
|
154
|
-
```sh
|
|
155
|
-
codex-security publish findings /path/to/selected-wiz-findings.json \
|
|
156
|
-
--to cloud --repository https://github.com/example/project --provider wiz \
|
|
157
|
-
--source-key TENANT_ID/vulnerability-finding --dry-run --format json
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
When the preview returns `status: "empty"`, report that there is nothing to upload. For a nonempty preview, show the endpoint, account, repository, source key, severity counts and exclusions. The `privateImport` entry describes the report for the user’s private inbox. For the repository publisher, `requests` identifies the environments that will receive the records. Identify the evidence file and make the complete JSON preview available for inspection without pasting a large report into the conversation. Explain that vendor evidence is not a Codex assessment.
|
|
161
|
-
|
|
162
|
-
Obtain explicit confirmation for this concrete upload, including skipped records. Then run the same command without `--dry-run`, adding `--yes`. Authorization to inspect or assess findings alone does not authorize sending them to Cloud. Keep approval when the user already approved this preview and the input and destination are unchanged.
|
|
163
|
-
|
|
164
|
-
### Upload and report
|
|
165
|
-
|
|
166
|
-
Read the structured result even when the process exits nonzero. Progress appears on stderr. For a private inbox import, check `privateJob.status`, the job counts, errors and unprocessed records. A completed job can have `verified: 0`.
|
|
167
|
-
|
|
168
|
-
For the repository publisher, report `verified` for findings the CLI confirmed by readback and `unacknowledged` for records without a receipt. Use `failures` to identify records the publisher rejected. For either destination, include exclusions and any `savedSubmission` checkpoint. [Result fields and exit codes](https://github.com/openai/codex-security/blob/main/sdk/typescript/docs/cli.md#results-and-exit-codes)
|
|
169
|
-
|
|
170
|
-
A private finding can be assessed against the repository and published to shared Findings. Link to the returned `cloudUrl` when available.
|
|
171
|
-
|
|
172
|
-
### Resume an interrupted upload
|
|
173
|
-
|
|
174
|
-
Preview the original file again with the same source key, repository, account, endpoint and state directory. If `resumed` is true, the CLI reuses the saved submission. If a reset or changed destination requires a new submission, review the new preview before confirming. [Retry a Cloud submission](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/schema-guide.md#retry-a-cloud-submission)
|
|
175
|
-
|
|
176
|
-
### Deployment settings
|
|
177
|
-
|
|
178
|
-
Set `CODEX_SECURITY_CLOUD_BASE_URL` to the deployment's API root for preview and upload. Use its login and an isolated state directory for tests. If the user or Cloud page supplies an app URL, set `CODEX_SECURITY_CLOUD_WEB_URL` to that full URL. This setting controls the returned UI link. The API root and login still determine routing and authentication.
|
|
42
|
+
Use `listLocalExternalImports({ repository })` to find an import by its timestamp, including imports of unchanged findings. Call `prepareStoredFindingsPublication(selection, { repository: cloudRepository })` with that import ID or the selected finding IDs and versions. Show the account, destination, evidence and exclusions. After the user confirms the preview, call `group.publish(group.reviewId)` for each approved group.
|
|
179
43
|
|
|
180
|
-
|
|
44
|
+
For a private inbox, check the import job status and counts. For repository requests, check verification, unacknowledged records and failures. Keep each approved group’s selection, destination and review ID. On interruption, reprepare the interrupted and unstarted groups, using the saved review IDs. For an earlier client’s pending upload, finish with its original build or verify which findings reached Cloud before preparing another submission. Report completed groups from their receipts. A changed review ID requires a fresh preview. [Cloud receipts and retry behavior](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/schema-guide.md#retry-a-cloud-submission)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Publish Findings"
|
|
3
|
-
short_description: "Import
|
|
4
|
-
default_prompt: "Use $publish-findings to
|
|
3
|
+
short_description: "Import and publish stored scanner findings"
|
|
4
|
+
default_prompt: "Use $publish-findings to import the selected scanner findings or publish a selection from my local workbench."
|
|
5
5
|
policy:
|
|
6
6
|
allow_implicit_invocation: true
|
|
@@ -32,6 +32,6 @@ Use native Java, a released CxFlow JAR (1.6.37+), and a trusted SAST-only profil
|
|
|
32
32
|
|
|
33
33
|
## Preview and import
|
|
34
34
|
|
|
35
|
-
Pass the successful helper's printed path as the quoted file argument to `codex-security publish findings` in the next tool call. Use `--provider checkmarx`, the
|
|
35
|
+
Pass the successful helper's printed path as the quoted file argument to `codex-security publish findings` in the next tool call. Use `--provider checkmarx --to local --repository CHECKOUT`, the verified `--source-repository-url`, a stable product/tenant/project/ref `--source-key`, and `--dry-run --format json`. Review the scope, findings and exclusions. Verify native paths against the checkout before opening source files.
|
|
36
36
|
|
|
37
|
-
After confirmation, reuse that file and those options for [local import](../SKILL.md#import-locally)
|
|
37
|
+
After confirmation, reuse that file and those options for the [local import](../SKILL.md#import-locally). Use its stored selection for [Cloud publication](../SKILL.md#publish-to-cloud) and retries. Remove the helper’s temporary directory after readback unless the operator wants it retained. Keep operator-supplied files. [User guide](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/checkmarx.md)
|
|
@@ -6,7 +6,6 @@ import os
|
|
|
6
6
|
import re
|
|
7
7
|
import shutil
|
|
8
8
|
import signal
|
|
9
|
-
import stat
|
|
10
9
|
import subprocess
|
|
11
10
|
import sys
|
|
12
11
|
import tempfile
|
|
@@ -16,63 +15,9 @@ from email.parser import BytesHeaderParser
|
|
|
16
15
|
from pathlib import Path
|
|
17
16
|
from xml.parsers import expat
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
os.name == "nt" and info.st_reparse_tag == stat.IO_REPARSE_TAG_MOUNT_POINT
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def source_root(target: Path | None) -> Path | None:
|
|
27
|
-
if target is not None and (not target.is_absolute() or not target.is_dir()):
|
|
28
|
-
raise ValueError("Select an existing absolute source directory.")
|
|
29
|
-
source = (target or Path.cwd()).resolve()
|
|
30
|
-
# A nested checkout or submodule is still part of the enclosing source tree.
|
|
31
|
-
for parent in (*reversed(source.parents), source):
|
|
32
|
-
marker = parent / ".git"
|
|
33
|
-
try:
|
|
34
|
-
info = marker.lstat()
|
|
35
|
-
if stat.S_ISDIR(info.st_mode) and not is_link(info):
|
|
36
|
-
info = (marker / "HEAD").lstat()
|
|
37
|
-
except (FileNotFoundError, NotADirectoryError):
|
|
38
|
-
continue
|
|
39
|
-
if stat.S_ISREG(info.st_mode) or is_link(info):
|
|
40
|
-
return parent
|
|
41
|
-
return source if target is not None else None
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def in_source(path: Path, source: Path | None) -> bool:
|
|
45
|
-
if source is None:
|
|
46
|
-
return False
|
|
47
|
-
if path.is_relative_to(source):
|
|
48
|
-
return True
|
|
49
|
-
identity = source.stat()
|
|
50
|
-
current = Path()
|
|
51
|
-
parts = list(reversed(path.absolute().parts))
|
|
52
|
-
active_links = set()
|
|
53
|
-
while parts:
|
|
54
|
-
part = parts.pop()
|
|
55
|
-
if isinstance(part, Path):
|
|
56
|
-
# The link target's components have all been checked.
|
|
57
|
-
active_links.remove(part)
|
|
58
|
-
continue
|
|
59
|
-
current = current.parent if part == ".." else current / part
|
|
60
|
-
if current == source:
|
|
61
|
-
return True
|
|
62
|
-
try:
|
|
63
|
-
info = current.lstat()
|
|
64
|
-
except (FileNotFoundError, NotADirectoryError):
|
|
65
|
-
continue
|
|
66
|
-
if os.path.samestat(info, identity):
|
|
67
|
-
return True
|
|
68
|
-
if is_link(info):
|
|
69
|
-
if current in active_links:
|
|
70
|
-
raise OSError(f"Symbolic link loop at {current}")
|
|
71
|
-
active_links.add(current)
|
|
72
|
-
parts.append(current)
|
|
73
|
-
parts.extend(reversed(current.readlink().parts))
|
|
74
|
-
current = current.parent
|
|
75
|
-
return False
|
|
18
|
+
# Isolated Python does not put the installed script directory on sys.path.
|
|
19
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
20
|
+
from collector_paths import in_source, source_root # noqa: E402
|
|
76
21
|
|
|
77
22
|
|
|
78
23
|
def installed_file(value: str, source: Path | None) -> Path:
|