@openai/codex-security 0.8.3 → 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 +36 -746
- package/_bundled_plugin/.codex-plugin/plugin.json +2 -0
- package/_bundled_plugin/.mcp.json +7 -1
- package/_bundled_plugin/examples/completed-scan/findings.json +16 -4
- package/_bundled_plugin/examples/completed-scan/report.md +11 -8
- package/_bundled_plugin/examples/completed-scan/scan-manifest.json +4 -2
- package/_bundled_plugin/mcp/fzstd-LICENSE.txt +21 -0
- package/_bundled_plugin/mcp/helpers.mjs +2 -11
- package/_bundled_plugin/mcp/helpers.mjs.br +0 -0
- package/_bundled_plugin/mcp/native/THIRD_PARTY_NOTICES.txt +3 -210
- 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/package.json +1 -0
- package/_bundled_plugin/mcp/permission-profile-preflight.mjs +5 -2
- package/_bundled_plugin/mcp/server.mjs +2 -11
- package/_bundled_plugin/mcp/server.mjs.br +0 -0
- package/_bundled_plugin/mcp/session-decompression.mjs +712 -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/default-severity-rubric.md +9 -4
- package/_bundled_plugin/references/final-report.md +5 -3
- package/_bundled_plugin/references/finding-detail-fields.md +18 -18
- package/_bundled_plugin/references/focused-investigator.md +13 -0
- package/_bundled_plugin/references/sarif-adapter.md +8 -2
- package/_bundled_plugin/references/scan-artifacts.md +21 -12
- package/_bundled_plugin/references/scan-contract.md +27 -33
- 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/schemas/tools/scan-draft.schema.json +2 -2
- package/_bundled_plugin/scripts/check_deep_scan_target.py +97 -0
- package/_bundled_plugin/scripts/codex_profile.mjs +7 -1
- package/_bundled_plugin/scripts/deep_scan_config.py +20 -1
- package/_bundled_plugin/scripts/deep_scan_workbench.py +192 -352
- package/_bundled_plugin/scripts/dispatch_inventory_tool +7 -0
- package/_bundled_plugin/scripts/filesystem_identity.py +1 -0
- package/_bundled_plugin/scripts/finalize_scan_contract.py +182 -230
- package/_bundled_plugin/scripts/finding_preview.py +20 -0
- package/_bundled_plugin/scripts/launch_codex_security_mcp +55 -16
- package/_bundled_plugin/scripts/legacy_findings.py +148 -0
- package/_bundled_plugin/scripts/posix_scan_local_files.py +37 -1
- package/_bundled_plugin/scripts/read_codex_session.mjs +21 -0
- package/_bundled_plugin/scripts/report_projection.py +81 -43
- package/_bundled_plugin/scripts/review_state.py +8 -2
- package/_bundled_plugin/scripts/servicenow_avit.py +20 -0
- package/_bundled_plugin/scripts/snapshot_sqlite.py +9 -2
- package/_bundled_plugin/scripts/threat_model_projection.py +22 -26
- package/_bundled_plugin/scripts/validate_scan_contract.py +7 -1
- package/_bundled_plugin/scripts/windows_scan_local_files.py +582 -20
- package/_bundled_plugin/scripts/workbench/__init__.py +1 -1
- package/_bundled_plugin/scripts/workbench/handoff.py +100 -23
- package/_bundled_plugin/scripts/workbench/retained_coverage.py +30 -51
- package/_bundled_plugin/scripts/workbench/retained_records.py +18 -30
- package/_bundled_plugin/scripts/workbench/runtime_toml.py +4 -1
- package/_bundled_plugin/scripts/workbench/saved_coverage.py +9 -17
- package/_bundled_plugin/scripts/workbench/saved_outputs.py +9 -0
- package/_bundled_plugin/scripts/workbench/saved_sources.py +47 -40
- package/_bundled_plugin/scripts/workbench/storage.py +91 -7
- package/_bundled_plugin/scripts/workbench_cli.py +54 -14
- package/_bundled_plugin/scripts/workbench_constants.py +12 -0
- package/_bundled_plugin/scripts/workbench_coverage_receipts.py +3 -3
- package/_bundled_plugin/scripts/workbench_db.py +562 -303
- package/_bundled_plugin/scripts/workbench_feedback.py +57 -11
- package/_bundled_plugin/scripts/workbench_finding_index.py +1 -0
- package/_bundled_plugin/scripts/workbench_finding_workflows.py +4 -0
- package/_bundled_plugin/scripts/workbench_native_indexes.py +238 -41
- package/_bundled_plugin/scripts/workbench_progress.py +169 -4
- package/_bundled_plugin/scripts/workbench_publication.py +16 -13
- package/_bundled_plugin/scripts/workbench_remediation.py +155 -2
- package/_bundled_plugin/scripts/workbench_saved_results.py +176 -81
- package/_bundled_plugin/scripts/workbench_scan_history.py +398 -174
- package/_bundled_plugin/scripts/workbench_scan_start.py +224 -31
- package/_bundled_plugin/scripts/workbench_scan_usage.py +675 -73
- package/_bundled_plugin/scripts/workbench_schema.py +258 -63
- package/_bundled_plugin/scripts/workbench_setup.py +14 -2
- package/_bundled_plugin/scripts/workbench_source_excerpt.py +13 -0
- package/_bundled_plugin/scripts/workbench_source_scopes.py +18 -0
- package/_bundled_plugin/scripts/workbench_target.py +594 -136
- package/_bundled_plugin/scripts/workbench_target_state.py +1110 -21
- package/_bundled_plugin/scripts/workbench_validation.py +43 -3
- package/_bundled_plugin/shared/workbench-history-repairs.json +77 -35
- package/_bundled_plugin/shared/workbench-migrations.json +100 -0
- package/_bundled_plugin/skills/cloud-findings/SKILL.md +5 -5
- package/_bundled_plugin/skills/deep-security-scan/SKILL.md +7 -50
- package/_bundled_plugin/skills/fix-finding/SKILL.md +2 -1
- package/_bundled_plugin/skills/publish-findings/SKILL.md +24 -153
- package/_bundled_plugin/skills/publish-findings/agents/openai.yaml +2 -2
- package/_bundled_plugin/skills/publish-findings/references/checkmarx-import.md +37 -0
- package/_bundled_plugin/skills/publish-findings/references/wiz-import.md +3 -3
- package/_bundled_plugin/skills/publish-findings/scripts/collect_checkmarx.py +409 -0
- 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/_bundled_plugin/skills/threat-model-visualize/scripts/build_explorer.py +22 -1
- package/_bundled_plugin/skills/triage-finding/references/ticket-intake.md +6 -2
- package/bin/codex-security.mjs +2 -2
- package/dist/api.d.ts +45 -5
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1192 -427
- 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 +37 -18
- 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/bedrock-oss-pricing.d.ts +6 -0
- package/dist/bedrock-oss-pricing.d.ts.map +1 -0
- package/dist/bedrock-oss-pricing.js +58 -0
- package/dist/bedrock-oss-pricing.js.map +1 -0
- package/dist/bedrock-pricing.d.ts +15 -0
- package/dist/bedrock-pricing.d.ts.map +1 -0
- package/dist/bedrock-pricing.js +117 -0
- package/dist/bedrock-pricing.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 +24 -22
- package/dist/blackduck-findings.js.map +1 -1
- package/dist/bulk-scan-discovery.d.ts.map +1 -1
- package/dist/bulk-scan-discovery.js +4 -4
- package/dist/bulk-scan-discovery.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/checkmarx-evidence.d.ts +19 -0
- package/dist/checkmarx-evidence.d.ts.map +1 -0
- package/dist/checkmarx-evidence.js +36 -0
- package/dist/checkmarx-evidence.js.map +1 -0
- package/dist/checkmarx-findings.d.ts +4 -0
- package/dist/checkmarx-findings.d.ts.map +1 -0
- package/dist/checkmarx-findings.js +27 -0
- package/dist/checkmarx-findings.js.map +1 -0
- package/dist/checkmarx-one.d.ts +4 -0
- package/dist/checkmarx-one.d.ts.map +1 -0
- package/dist/checkmarx-one.js +53 -0
- package/dist/checkmarx-one.js.map +1 -0
- package/dist/checkmarx-repository.d.ts +12 -0
- package/dist/checkmarx-repository.d.ts.map +1 -0
- package/dist/checkmarx-repository.js +181 -0
- package/dist/checkmarx-repository.js.map +1 -0
- package/dist/checkmarx-xml.d.ts +12 -0
- package/dist/checkmarx-xml.d.ts.map +1 -0
- package/dist/checkmarx-xml.js +196 -0
- package/dist/checkmarx-xml.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-records.d.ts +1 -9
- package/dist/classify-severity-records.d.ts.map +1 -1
- package/dist/classify-severity-records.js +3 -13
- package/dist/classify-severity-records.js.map +1 -1
- package/dist/classify-severity.d.ts.map +1 -1
- package/dist/classify-severity.js +11 -10
- 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 +16 -8
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3382 -2017
- package/dist/cli.js.map +1 -1
- package/dist/cloud-publish.d.ts.map +1 -1
- package/dist/cloud-publish.js +35 -33
- 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 +19 -4
- package/dist/component-scan.d.ts.map +1 -1
- package/dist/component-scan.js +67 -9
- 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 +130 -67
- 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 +149 -19
- package/dist/continuum-findings.js.map +1 -1
- package/dist/contract-values.d.ts +2 -0
- package/dist/contract-values.d.ts.map +1 -1
- package/dist/contract-values.js +12 -9
- package/dist/contract-values.js.map +1 -1
- package/dist/cost-model.d.ts +13 -1
- package/dist/cost-model.d.ts.map +1 -1
- package/dist/cost-model.js +66 -112
- package/dist/cost-model.js.map +1 -1
- package/dist/cost.d.ts +42 -3
- package/dist/cost.d.ts.map +1 -1
- package/dist/cost.js +484 -149
- package/dist/cost.js.map +1 -1
- package/dist/custom-publish.d.ts +4 -0
- package/dist/custom-publish.d.ts.map +1 -1
- package/dist/custom-publish.js +40 -3
- package/dist/custom-publish.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 +4 -2
- package/dist/deduplication/local.d.ts.map +1 -1
- package/dist/deduplication/local.js +9 -2
- package/dist/deduplication/local.js.map +1 -1
- package/dist/deduplication/refusal.d.ts.map +1 -1
- package/dist/deduplication/refusal.js +26 -5
- package/dist/deduplication/refusal.js.map +1 -1
- package/dist/deduplication/scan.d.ts +5 -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-config.d.ts +0 -1
- package/dist/deep-config.d.ts.map +1 -1
- package/dist/deep-config.js +22 -33
- package/dist/deep-config.js.map +1 -1
- package/dist/deep-scan-defaults.d.ts +2 -0
- package/dist/deep-scan-defaults.d.ts.map +1 -1
- package/dist/deep-scan-defaults.js +28 -1
- package/dist/deep-scan-defaults.js.map +1 -1
- package/dist/deep-scan.d.ts +2 -0
- package/dist/deep-scan.d.ts.map +1 -1
- package/dist/deep-scan.js +44 -19
- package/dist/deep-scan.js.map +1 -1
- package/dist/default-severity-rubric.d.ts +1 -1
- package/dist/default-severity-rubric.d.ts.map +1 -1
- package/dist/default-severity-rubric.js +1 -1
- package/dist/default-severity-rubric.js.map +1 -1
- package/dist/endor-findings.d.ts +3 -1
- package/dist/endor-findings.d.ts.map +1 -1
- package/dist/endor-findings.js +86 -45
- package/dist/endor-findings.js.map +1 -1
- package/dist/errors.d.ts +4 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +15 -4
- 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 +5 -3
- package/dist/external-findings-import.d.ts.map +1 -1
- package/dist/external-findings-import.js +19 -7
- package/dist/external-findings-import.js.map +1 -1
- package/dist/external-findings-local.d.ts +69 -5
- package/dist/external-findings-local.d.ts.map +1 -1
- package/dist/external-findings-local.js +537 -108
- package/dist/external-findings-local.js.map +1 -1
- package/dist/external-findings-publish.d.ts +13 -6
- package/dist/external-findings-publish.d.ts.map +1 -1
- package/dist/external-findings-publish.js +895 -1142
- package/dist/external-findings-publish.js.map +1 -1
- package/dist/external-findings-read.d.ts +21 -2
- package/dist/external-findings-read.d.ts.map +1 -1
- package/dist/external-findings-read.js +130 -68
- package/dist/external-findings-read.js.map +1 -1
- package/dist/external-findings.d.ts +15 -3
- package/dist/external-findings.d.ts.map +1 -1
- package/dist/external-findings.js +54 -2
- package/dist/external-findings.js.map +1 -1
- package/dist/external-import-contract.d.ts +8 -12
- package/dist/external-import-contract.d.ts.map +1 -1
- package/dist/external-import-contract.js +51 -184
- 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/feedback.d.ts.map +1 -1
- package/dist/feedback.js +5 -4
- package/dist/feedback.js.map +1 -1
- package/dist/finding-prompt.d.ts +5 -0
- package/dist/finding-prompt.d.ts.map +1 -0
- package/dist/finding-prompt.js +32 -0
- package/dist/finding-prompt.js.map +1 -0
- package/dist/findings-client.d.ts +1 -0
- package/dist/findings-client.d.ts.map +1 -1
- package/dist/findings-client.js +27 -3
- package/dist/findings-client.js.map +1 -1
- package/dist/github-advisories.d.ts.map +1 -1
- package/dist/github-advisories.js +0 -2
- package/dist/github-advisories.js.map +1 -1
- package/dist/github-dependabot-findings.d.ts.map +1 -1
- package/dist/github-dependabot-findings.js +18 -8
- package/dist/github-dependabot-findings.js.map +1 -1
- package/dist/github-findings.d.ts +4 -1
- package/dist/github-findings.d.ts.map +1 -1
- package/dist/github-findings.js +73 -316
- package/dist/github-findings.js.map +1 -1
- package/dist/hosted-git-remotes.d.ts +5 -0
- package/dist/hosted-git-remotes.d.ts.map +1 -0
- package/dist/hosted-git-remotes.js +285 -0
- package/dist/hosted-git-remotes.js.map +1 -0
- package/dist/hosted-git-repository.d.ts +28 -0
- package/dist/hosted-git-repository.d.ts.map +1 -0
- package/dist/hosted-git-repository.js +222 -0
- package/dist/hosted-git-repository.js.map +1 -0
- 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/hosted-scan-protocol.js +2 -2
- package/dist/hosted-scan-protocol.js.map +1 -1
- package/dist/hosted-scan.d.ts.map +1 -1
- package/dist/hosted-scan.js +16 -11
- package/dist/hosted-scan.js.map +1 -1
- package/dist/hosted-scanner-http.d.ts +21 -0
- package/dist/hosted-scanner-http.d.ts.map +1 -0
- package/dist/hosted-scanner-http.js +204 -0
- package/dist/hosted-scanner-http.js.map +1 -0
- package/dist/import-scan.d.ts.map +1 -1
- package/dist/import-scan.js +3 -0
- package/dist/import-scan.js.map +1 -1
- package/dist/index.d.ts +21 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/inspector-findings.d.ts.map +1 -1
- package/dist/inspector-findings.js +52 -86
- 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 +102 -32
- 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 -5
- package/dist/local-git-metadata.js.map +1 -1
- package/dist/multiscan.d.ts +10 -4
- package/dist/multiscan.d.ts.map +1 -1
- package/dist/multiscan.js +217 -102
- package/dist/multiscan.js.map +1 -1
- package/dist/native-json-findings.d.ts +2 -1
- package/dist/native-json-findings.d.ts.map +1 -1
- package/dist/native-json-findings.js +12 -2
- package/dist/native-json-findings.js.map +1 -1
- package/dist/opengrep-findings.d.ts +5 -2
- package/dist/opengrep-findings.d.ts.map +1 -1
- package/dist/opengrep-findings.js +54 -33
- package/dist/opengrep-findings.js.map +1 -1
- package/dist/operation-telemetry.d.ts +104 -0
- package/dist/operation-telemetry.d.ts.map +1 -0
- package/dist/operation-telemetry.js +293 -0
- package/dist/operation-telemetry.js.map +1 -0
- package/dist/plugin-python-probe.d.ts +4 -0
- package/dist/plugin-python-probe.d.ts.map +1 -0
- package/dist/plugin-python-probe.js +10 -0
- package/dist/plugin-python-probe.js.map +1 -0
- package/dist/private-finding-import.d.ts +99 -9
- package/dist/private-finding-import.d.ts.map +1 -1
- package/dist/private-finding-import.js +116 -152
- 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 +1 -1
- package/dist/provider-profile.d.ts.map +1 -1
- package/dist/provider-profile.js +12 -10
- package/dist/provider-profile.js.map +1 -1
- package/dist/publication-telemetry.d.ts +45 -0
- package/dist/publication-telemetry.d.ts.map +1 -0
- package/dist/publication-telemetry.js +50 -0
- package/dist/publication-telemetry.js.map +1 -0
- package/dist/publication.d.ts +1 -1
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js.map +1 -1
- package/dist/publish.d.ts +4 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +42 -2
- package/dist/publish.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 +1 -4
- package/dist/remediation.d.ts.map +1 -1
- package/dist/remediation.js +6 -8
- package/dist/remediation.js.map +1 -1
- package/dist/request-metadata.d.ts +3 -0
- package/dist/request-metadata.d.ts.map +1 -1
- package/dist/request-metadata.js +9 -0
- package/dist/request-metadata.js.map +1 -1
- package/dist/result.d.ts +4 -0
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +1 -1
- package/dist/result.js.map +1 -1
- package/dist/retry-windows-rename.d.ts +8 -0
- package/dist/retry-windows-rename.d.ts.map +1 -0
- package/dist/retry-windows-rename.js +24 -0
- package/dist/retry-windows-rename.js.map +1 -0
- package/dist/runtime.d.ts +54 -6
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1084 -256
- package/dist/runtime.js.map +1 -1
- package/dist/saved-scan-bootstrap.d.ts +7 -1
- package/dist/saved-scan-bootstrap.d.ts.map +1 -1
- package/dist/saved-scan-bootstrap.js +269 -114
- package/dist/saved-scan-bootstrap.js.map +1 -1
- package/dist/scan-activity.d.ts.map +1 -1
- package/dist/scan-activity.js +141 -56
- package/dist/scan-activity.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 +10 -5
- package/dist/scan-comparison.d.ts.map +1 -1
- package/dist/scan-comparison.js +66 -17
- package/dist/scan-comparison.js.map +1 -1
- package/dist/scan-dashboard.d.ts +7 -6
- package/dist/scan-dashboard.d.ts.map +1 -1
- package/dist/scan-dashboard.js +92 -43
- package/dist/scan-dashboard.js.map +1 -1
- package/dist/scan-executor.d.ts +10 -1
- package/dist/scan-executor.d.ts.map +1 -1
- package/dist/scan-executor.js +24 -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 +34 -28
- package/dist/scan-history-renderer.js.map +1 -1
- package/dist/scan-logs.d.ts +12 -0
- package/dist/scan-logs.d.ts.map +1 -1
- package/dist/scan-logs.js +131 -78
- package/dist/scan-logs.js.map +1 -1
- package/dist/scan-measurement.d.ts +26 -0
- package/dist/scan-measurement.d.ts.map +1 -0
- package/dist/scan-measurement.js +77 -0
- package/dist/scan-measurement.js.map +1 -0
- package/dist/scan-progress.d.ts +1 -0
- package/dist/scan-progress.d.ts.map +1 -1
- package/dist/scan-progress.js +3 -0
- package/dist/scan-progress.js.map +1 -1
- package/dist/scan-sessions.d.ts.map +1 -1
- package/dist/scan-sessions.js +4 -1
- package/dist/scan-sessions.js.map +1 -1
- package/dist/scan-settings.d.ts +1 -1
- package/dist/scan-settings.d.ts.map +1 -1
- package/dist/scan-settings.js +1 -24
- package/dist/scan-settings.js.map +1 -1
- package/dist/scanner-import.d.ts +25 -13
- package/dist/scanner-import.d.ts.map +1 -1
- package/dist/scanner-import.js +216 -97
- package/dist/scanner-import.js.map +1 -1
- package/dist/scanner-repository-url.d.ts +4 -1
- package/dist/scanner-repository-url.d.ts.map +1 -1
- package/dist/scanner-repository-url.js +10 -6
- package/dist/scanner-repository-url.js.map +1 -1
- package/dist/security-policy.d.ts +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 +6 -3
- package/dist/semgrep-findings.d.ts.map +1 -1
- package/dist/semgrep-findings.js +72 -42
- package/dist/semgrep-findings.js.map +1 -1
- package/dist/semgrep-guardian-findings.d.ts +38 -0
- package/dist/semgrep-guardian-findings.d.ts.map +1 -0
- package/dist/semgrep-guardian-findings.js +165 -0
- package/dist/semgrep-guardian-findings.js.map +1 -0
- package/dist/semgrep-platform-collector.d.ts +26 -0
- package/dist/semgrep-platform-collector.d.ts.map +1 -0
- package/dist/semgrep-platform-collector.js +108 -0
- package/dist/semgrep-platform-collector.js.map +1 -0
- package/dist/semgrep-platform-findings.d.ts +157 -6
- package/dist/semgrep-platform-findings.d.ts.map +1 -1
- package/dist/semgrep-platform-findings.js +766 -103
- package/dist/semgrep-platform-findings.js.map +1 -1
- package/dist/server/api.d.ts +1 -1
- package/dist/server/api.d.ts.map +1 -1
- package/dist/server/api.js.map +1 -1
- package/dist/server/embedding-tokenizer.cdx.json +33 -0
- package/dist/server/embedding-tokenizer.d.ts +2 -0
- package/dist/server/embedding-tokenizer.d.ts.map +1 -0
- package/dist/server/embedding-tokenizer.js +322 -0
- package/dist/server/embedding-tokenizer.js.map +6 -0
- package/dist/server/embeddings.d.ts +16 -2
- package/dist/server/embeddings.d.ts.map +1 -1
- package/dist/server/embeddings.js +35 -5
- package/dist/server/embeddings.js.map +1 -1
- package/dist/session-lines.d.ts +5 -0
- package/dist/session-lines.d.ts.map +1 -0
- package/dist/session-lines.js +60 -0
- package/dist/session-lines.js.map +1 -0
- package/dist/severity-review.d.ts +3 -1
- package/dist/severity-review.d.ts.map +1 -1
- package/dist/severity-review.js +3 -2
- package/dist/severity-review.js.map +1 -1
- package/dist/skill-authentication.d.ts +1 -0
- package/dist/skill-authentication.d.ts.map +1 -1
- package/dist/skill-authentication.js +1 -0
- package/dist/skill-authentication.js.map +1 -1
- package/dist/snyk-findings.d.ts +9 -2
- package/dist/snyk-findings.d.ts.map +1 -1
- package/dist/snyk-findings.js +90 -70
- package/dist/snyk-findings.js.map +1 -1
- package/dist/snyk-rest-findings.d.ts +59 -0
- package/dist/snyk-rest-findings.d.ts.map +1 -0
- package/dist/snyk-rest-findings.js +879 -0
- package/dist/snyk-rest-findings.js.map +1 -0
- package/dist/snyk-token-origin.d.ts +4 -0
- package/dist/snyk-token-origin.d.ts.map +1 -0
- package/dist/snyk-token-origin.js +82 -0
- package/dist/snyk-token-origin.js.map +1 -0
- package/dist/sonar-collector.d.ts.map +1 -1
- package/dist/sonar-collector.js +0 -3
- package/dist/sonar-collector.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 +30 -34
- 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/target-drift.d.ts +9 -0
- package/dist/target-drift.d.ts.map +1 -0
- package/dist/target-drift.js +27 -0
- package/dist/target-drift.js.map +1 -0
- package/dist/targets.d.ts +8 -1
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +131 -42
- package/dist/targets.js.map +1 -1
- package/dist/tenable-findings.d.ts +6 -0
- package/dist/tenable-findings.d.ts.map +1 -0
- package/dist/tenable-findings.js +122 -0
- package/dist/tenable-findings.js.map +1 -0
- package/dist/terminal-stream.d.ts +13 -0
- package/dist/terminal-stream.d.ts.map +1 -0
- package/dist/terminal-stream.js +35 -0
- package/dist/terminal-stream.js.map +1 -0
- package/dist/trivy-findings.d.ts +19 -0
- package/dist/trivy-findings.d.ts.map +1 -0
- package/dist/trivy-findings.js +424 -0
- package/dist/trivy-findings.js.map +1 -0
- package/dist/trivy-import.d.ts +19 -0
- package/dist/trivy-import.d.ts.map +1 -0
- package/dist/trivy-import.js +151 -0
- package/dist/trivy-import.js.map +1 -0
- 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/validation-records.js +1 -1
- package/dist/validation-records.js.map +1 -1
- package/dist/veracode-findings.d.ts +1 -1
- package/dist/veracode-findings.d.ts.map +1 -1
- package/dist/veracode-findings.js +19 -6
- 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/vertex-pricing.d.ts +8 -0
- package/dist/vertex-pricing.d.ts.map +1 -0
- package/dist/vertex-pricing.js +20 -0
- package/dist/vertex-pricing.js.map +1 -0
- package/dist/windows-path.d.ts +1 -0
- package/dist/windows-path.d.ts.map +1 -1
- package/dist/windows-path.js +26 -1
- package/dist/windows-path.js.map +1 -1
- package/dist/wiz-findings.d.ts +6 -2
- package/dist/wiz-findings.d.ts.map +1 -1
- package/dist/wiz-findings.js +65 -89
- package/dist/wiz-findings.js.map +1 -1
- package/docs/classify-severity-records.md +27 -12
- package/docs/cli.md +853 -639
- package/docs/dedupe-records.md +44 -24
- package/docs/findings-service.md +84 -44
- package/docs/hosted-remediation.md +27 -11
- package/docs/hosted-scans.md +50 -42
- package/docs/sdk.md +903 -0
- package/docs/telemetry.md +236 -0
- package/docs/validate-records.md +78 -44
- package/package.json +23 -16
- package/schemas/external-findings.schema.json +4 -1
- package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/helpers.mjs.br.part-001 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-002 +0 -0
- package/_bundled_plugin/schemas/tools/deep-reducer.schema.json +0 -96
- package/dist/external-imports-feature.d.ts +0 -6
- package/dist/external-imports-feature.d.ts.map +0 -1
- package/dist/external-imports-feature.js +0 -51
- package/dist/external-imports-feature.js.map +0 -1
- package/dist/finding-normalization.d.ts +0 -5
- package/dist/finding-normalization.d.ts.map +0 -1
- package/dist/finding-normalization.js +0 -155
- package/dist/finding-normalization.js.map +0 -1
- package/dist/reader-selection.d.ts +0 -13
- package/dist/reader-selection.d.ts.map +0 -1
- package/dist/reader-selection.js +0 -81
- package/dist/reader-selection.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-findings-local.js","sourceRoot":"","sources":["../src/external-findings-local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,GAG3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAk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P,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE;QAClC,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC;QACtC,OAAO,CAAC,YAAY,CAAC,YAAY,IAAI,YAAY,CAAC,CAChD,OAAO,EACP,CAAC,wBAAwB,CAAC,EAC1B,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CACjD,CAAC;IACJ,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACxB,OAAO,MAAM,CAAC,UAAU,CAAuC,CAAC;AAClE,CAAC","sourcesContent":["import { CodexSecurityError } from \"./errors.js\";\nimport {\n forwardExternalImportSetting,\n requireExternalImports,\n} from \"./external-imports-feature.js\";\nimport {\n cloneImportPreview,\n snapshotImportOptions,\n snapshotNormalizedFindings,\n snapshotSourceRepositories,\n type ExternalFindings,\n type ExternalSourceRepository,\n} from \"./external-findings.js\";\nimport {\n cloudRepositoryUrlKey,\n requireSafeJsonInteger,\n repositoryUrlKey,\n} from \"./external-import-contract.js\";\nimport type {\n ExternalFindingEvidence,\n Provider,\n} from \"./external-import-models.js\";\nimport { localFindingRepositories } from \"./external-findings-read.js\";\nimport {\n hasGitMetadata,\n localGitProtectionRoots,\n importGitProtectionRoots,\n} from \"./local-git-metadata.js\";\nimport {\n blackDuckReportRepositories,\n projectedBlackDuckRepositoryUrl,\n} from \"./blackduck-findings.js\";\nimport {\n azureReposHttpsUrl,\n isGitHubCloudHost,\n isGitHubSshOverHttps,\n isGitSsh,\n parseGitRemote,\n} from \"./git-remote.js\";\nimport { continuumReportRepositories } from \"./continuum-findings.js\";\nimport { veracodeReportRepositories } from \"./veracode-findings.js\";\nimport { inspectorReportRepository } from \"./inspector-findings.js\";\nimport { declaredScannerRepositoryUrl } from \"./scanner-repository-url.js\";\nimport { sonarRepositoryUrls } from \"./sonar-findings.js\";\nimport { isRecord } from \"./record.js\";\nimport { dependabotRepository } from \"./github-dependabot-findings.js\";\nimport {\n bundledPluginRoot,\n canonicalConfigPath,\n canonicalizeModelSafePath,\n expandHome,\n requireOutputOutsideRepositories,\n runWorkbench,\n workbenchEnvironment,\n type WorkbenchCommandOptions,\n} from \"./runtime.js\";\nimport {\n abortable,\n enclosingGitWorktreeRoot,\n gitOutput,\n normalizeRepository,\n} from \"./targets.js\";\n\n/** A scanner source record, independent of a Codex assessment or completed scan. */\nexport interface StoredExternalFinding {\n id: string;\n repository: string;\n provider: Provider;\n sourceKey: string;\n sourceFindingId: string;\n evidence: ExternalFindingEvidence;\n assessment: { state: \"not_assessed\" };\n version: number;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface NormalizedLocalImportOptions {\n /** Local checkout or source directory to associate with these records. */\n repository: string;\n provider: Provider;\n /** Stable scanner organization/project/branch namespace across imports. */\n sourceKey: string;\n /** Explicitly verified Sonar repository when a checkout uses an SSH host alias. */\n sourceRepositoryUrl?: string;\n /** Full Inspector project ARNs mapped to independently verified repository URLs. */\n inspectorProjectMap?: ReadonlyMap<string, string>;\n}\n\nexport interface LocalExternalImportDependencies {\n environment?: NodeJS.ProcessEnv;\n signal?: AbortSignal;\n runWorkbench?: typeof runWorkbench;\n /** Repository references supplied by a reader outside its projected evidence. */\n sourceRepositories?: readonly ExternalSourceRepository[];\n}\n\nexport interface LocalExternalImportPreview extends ExternalFindings {\n repository: string;\n source: { provider: Provider; source_key: string };\n}\n\nexport interface LocalExternalImportResult {\n repository: string;\n read: number;\n report?: ExternalFindings[\"report\"];\n ready: number;\n excluded: ExternalFindings[\"excluded\"];\n findings: StoredExternalFinding[];\n counts: { created: number; updated: number; unchanged: number };\n}\n\nexport interface PreparedLocalExternalImport {\n /** Every declared source matched a configured Git remote of the checkout. */\n matchesRepositoryRemote: boolean;\n preview: LocalExternalImportPreview;\n import(): Promise<LocalExternalImportResult>;\n}\n\nfunction requireIdentity(\n value: unknown,\n field: string,\n): asserts value is string {\n if (typeof value !== \"string\" || !value.trim() || value.includes(\"\\0\"))\n throw new CodexSecurityError(\n `${field} must be nonempty and contain no NUL characters.`,\n );\n}\n\nfunction checkStoredNumber(value: number): void {\n if (!Number.isFinite(value))\n throw new TypeError(\n \"Stored finding JSON cannot contain non-finite numbers.\",\n );\n requireSafeJsonInteger(value, \"Stored finding JSON\");\n}\n\nconst gitTransportPorts: Readonly<Record<string, string>> = {\n \"http:\": \"80\",\n \"https:\": \"443\",\n \"ssh:\": \"22\",\n \"git+ssh:\": \"22\",\n \"ssh+git:\": \"22\",\n \"git:\": \"9418\",\n \"ftp:\": \"21\",\n \"ftps:\": \"990\",\n};\n\n/** Compare transport forms without changing retained scanner evidence. */\ninterface RemoteRepositoryIdentity {\n key: string;\n account?: string;\n homeRelative?: boolean;\n}\n\nfunction sonarHostedGit(hostname: string) {\n return (\n isGitHubCloudHost(hostname) ||\n hostname === \"gitlab.com\" ||\n hostname === \"bitbucket.org\"\n );\n}\n\nfunction sonarHostedHostname(hostname: string) {\n const name = hostname.toLowerCase().replace(/\\.$/u, \"\");\n return sonarHostedGit(name) ||\n [\"ssh.github.com\", \"ssh.dev.azure.com\", \"dev.azure.com\"].includes(name)\n ? name\n : undefined;\n}\n\nfunction remoteRepository(\n value: string,\n provider: Provider,\n bound: boolean,\n platform: Provider = provider,\n possibleSshHost?: string,\n): RemoteRepositoryIdentity | undefined {\n if (/^[A-Za-z]:[\\\\/]/u.test(value)) return undefined;\n const transport = bound\n ? /^(?:ssh|git\\+ssh|ssh\\+git|git):\\/\\/([^/]*)(.*)$/isu.exec(value)\n : null;\n const authority = transport?.[1];\n const http = bound && /^https?:\\/\\//iu.test(value.trimStart());\n // Git decodes the authority before locating its path. An encoded delimiter\n // cannot prove a match to another spelling through WHATWG URL's hostname.\n if (\n authority &&\n (/%2f|[?#]/iu.test(authority) ||\n authority.slice(authority.lastIndexOf(\"@\") + 1).includes(\"%\"))\n )\n return { key: value };\n let remote;\n try {\n remote = parseGitRemote(value);\n } catch {\n return transport || http ? { key: \"\\0\" + value } : undefined;\n }\n if (!remote || !Object.hasOwn(gitTransportPorts, remote.url.protocol))\n return undefined;\n const { url, path, scpStyle } = remote;\n const ssh = isGitSsh(url.protocol);\n const protocol = url.protocol === \"http:\" ? \"http:\" : \"https:\";\n const hosted = sonarHostedHostname(url.hostname);\n if (provider === \"sonar\" && hosted) url.hostname = hosted;\n const githubSshOverHttps = isGitHubSshOverHttps(url);\n let hostname = githubSshOverHttps ? \"github.com\" : url.hostname;\n // An unresolved SSH name can be a local Host alias. Only substitute the\n // supplied hostname when checking the path of an unverified manual mapping.\n if (possibleSshHost && ssh && (!hosted || hosted === \"dev.azure.com\"))\n hostname = sonarHostedHostname(possibleSshHost) ?? possibleSshHost;\n const port =\n githubSshOverHttps || url.port === gitTransportPorts[url.protocol]\n ? \"\"\n : url.port;\n // A GitHub source identifies a case-insensitive repository on custom Enterprise\n // hosts too; other providers can refer to VCS hosts with case-sensitive paths.\n const key = platform === \"github\" ? cloudRepositoryUrlKey : repositoryUrlKey;\n const origin = `${protocol}//${hostname}${port ? `:${port}` : \"\"}/`;\n if (!bound) return { key: key(origin + path) };\n\n if (!ssh && url.protocol !== \"git:\") {\n if (url.protocol === \"http:\" || url.protocol === \"https:\") {\n // libcurl and WHATWG differ on backslashes and encoded dot segments.\n const raw = /^https?:\\/\\/[^/\\\\?#\\s]+(\\/[^\\\\?#]*)?(?:[?#].*)?$/iu.exec(\n value,\n );\n if (!raw || /\\/(?:%2e|\\.%2e|%2e\\.|%2e%2e)(?:\\/|$)/iu.test(raw[1] ?? \"\"))\n return { key: \"\\0\" + value };\n }\n const suffix = /[?#].*$/su.exec(value)?.[0] ?? \"\";\n // HTTP sends the query and omits fragment text from repository requests.\n if (suffix && ![\"http:\", \"https:\"].includes(url.protocol))\n return { key: key(origin + path) + \"\\0\" };\n return {\n key:\n key(origin + path) + suffix.replace(/#.*$/su, \"#\").replace(/\\/$/u, \"\"),\n };\n }\n\n // Git passes the original path (including dot segments, '?' and '#') to upload-pack.\n const literal = (raw: string) => {\n const bytes = Buffer.from(raw).toString(\"latin1\");\n return scpStyle\n ? bytes\n : bytes.replace(/%(?!00)([\\da-f]{2})/giu, (_, hex: string) =>\n String.fromCharCode(parseInt(hex, 16)),\n );\n };\n if (!scpStyle && !transport) return { key: value };\n const gitPath = literal(transport?.[2] ?? path);\n const login = scpStyle\n ? /^([^@/:\\s?#]+)@/u.exec(value)?.[1]\n : /^(.*)@/u.exec(authority ?? \"\")?.[1];\n const homeRelative =\n /^\\/?~(?:\\/|$)/u.test(gitPath) || (scpStyle && !/^[~/]/u.test(gitPath));\n const suffix = /[?#].*$/su.exec(gitPath);\n // Express upload-pack bytes as a URL path for comparison with the HTTP source.\n const name = gitPath\n .slice(0, suffix?.index)\n .replace(/^\\//u, \"\")\n .replace(\n /[%\\x00-\\x20\\x7f-\\xff]/gu,\n (byte) =>\n \"%\" + byte.charCodeAt(0).toString(16).toUpperCase().padStart(2, \"0\"),\n );\n // Azure's generated SCP clone URL spells spaces as %20, even though Git sends SCP paths literally.\n const azure =\n provider === \"sonar\" && !(scpStyle && path.startsWith(\"/\"))\n ? azureReposHttpsUrl(\n url,\n scpStyle ? name.replace(/%2520/gu, \"%20\") : name,\n )\n : undefined;\n const repository = suffix\n ? key(origin + name + \"?\") +\n \"\\0\" +\n suffix[0].replace(/\\/$/u, \"\").replace(/\\.git$/u, \"\")\n : key(azure ?? origin + name);\n return {\n key: repository,\n account: ssh && login ? literal(login) : undefined,\n // GitHub serves the same repository path through its SCP and SSH URLs.\n homeRelative:\n ssh && platform !== \"github\" && !isGitHubCloudHost(hostname.toLowerCase())\n ? homeRelative\n : undefined,\n };\n}\n\nfunction matchingRemote(\n left: RemoteRepositoryIdentity,\n right: RemoteRepositoryIdentity,\n) {\n return (\n left.key === right.key &&\n (left.homeRelative === undefined ||\n right.homeRelative === undefined ||\n left.homeRelative === right.homeRelative) &&\n ((left.homeRelative === false && right.homeRelative === false) ||\n left.account === undefined ||\n right.account === undefined ||\n left.account === right.account)\n );\n}\n\n/** A credential-free Sonar repository binding from a supported Git fetch transport. */\nexport function sonarRepositoryForRemote(origin: string): string | undefined {\n try {\n if (/[\\s\\\\\\p{Cc}?#]/u.test(origin)) return;\n const remote = parseGitRemote(origin);\n if (!remote) return;\n const { url } = remote;\n // Git dispatches remote helpers by the literal scheme, while URL lowercases it.\n if (!remote.scpStyle && !origin.startsWith(url.protocol + \"//\")) return;\n // Git passes literal SSH paths to upload-pack. URL.pathname collapses dot segments.\n const path = remote.scpStyle\n ? remote.path\n : /^[^:/]+:\\/\\/[^/]+\\/(.+)$/u.exec(origin)?.[1];\n if (!path) return;\n const hostname = url.hostname.toLowerCase();\n let candidate: string | undefined;\n if (url.protocol === \"http:\" || url.protocol === \"https:\") {\n candidate = `${url.origin}/${path}`;\n } else if (url.username === \"git\" && isGitHubSshOverHttps(url)) {\n candidate = `https://github.com/${path}`;\n } else if (\n isGitSsh(url.protocol) &&\n url.username === \"git\" &&\n (!url.port || url.port === \"22\") &&\n sonarHostedGit(hostname)\n ) {\n candidate = `https://${hostname}/${path}`;\n } else {\n candidate = azureReposHttpsUrl(url, path);\n }\n if (!candidate) return;\n const source = declaredScannerRepositoryUrl(\n candidate.replace(/\\.git$/iu, \"\"),\n \"Sonar\",\n \"local\",\n );\n const candidateRemote = remoteRepository(origin, \"sonar\", true);\n const target = remoteRepository(source, \"sonar\", true);\n if (isGitSsh(url.protocol) && candidateRemote?.account !== \"git\") return;\n return candidateRemote && target && matchingRemote(candidateRemote, target)\n ? source\n : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** Use the same executable and configuration boundaries for every Git query proving a binding. */\nexport function boundSonarWorktree(\n repository: string,\n protectedRoots: string | readonly string[],\n environment: NodeJS.ProcessEnv | undefined,\n signal?: AbortSignal,\n) {\n return enclosingGitWorktreeRoot(repository, signal, {\n requireIfPresent: true,\n readGit: (directory, args) =>\n gitOutput(\n directory,\n args,\n signal,\n undefined,\n undefined,\n \"utf8\",\n protectedRoots,\n environment,\n ),\n });\n}\n\nfunction localRepositoryPlatform(\n provider: Provider,\n sources: readonly ExternalSourceRepository[],\n bound: boolean,\n) {\n const githubKey = (url: string) =>\n remoteRepository(url, provider, bound, \"github\")?.key;\n const githubRepositories = new Set(\n sources.flatMap((source) => {\n if (source.platform !== \"github\") return [];\n const key = githubKey(source.url);\n return key === undefined ? [] : [key];\n }),\n );\n return (source: ExternalSourceRepository): Provider => {\n if (source.platform === \"github\") return \"github\";\n if (githubRepositories.size === 0) return provider;\n const key = githubKey(source.url);\n return key !== undefined && githubRepositories.has(key)\n ? \"github\"\n : provider;\n };\n}\n\nfunction sameScannerRepositories(\n remotes: Iterable<RemoteRepositoryIdentity>,\n): boolean {\n let known: RemoteRepositoryIdentity | undefined;\n for (const remote of remotes) {\n if (known && !matchingRemote(known, remote)) return false;\n // HTTPS does not specify the login or path interpretation carried by SSH.\n known = {\n key: remote.key,\n account: remote.account ?? known?.account,\n homeRelative: remote.homeRelative ?? known?.homeRelative,\n };\n }\n return true;\n}\n\n/** @internal */\nexport interface ConfiguredFetchRemote {\n name: string;\n url: string;\n}\n\n/** @internal Effective fetch URLs from the selected, protected checkout. */\nexport async function configuredFetchRemotes(\n repository: string,\n provider: Provider,\n protectedRoots: WorkbenchCommandOptions[\"protectedRoot\"],\n environment: WorkbenchCommandOptions[\"environment\"],\n signal?: AbortSignal,\n): Promise<ConfiguredFetchRemote[]> {\n if (!(await hasGitMetadata(repository, signal))) return [];\n const gitProtectedRoots = [\n ...(typeof protectedRoots === \"string\"\n ? [protectedRoots]\n : (protectedRoots ?? [])),\n ];\n // The Sonar caller includes the discovered Git roots for both checkouts.\n if (provider !== \"sonar\")\n gitProtectedRoots.push(\n await abortable(() => canonicalConfigPath(process.cwd()), signal),\n );\n if (\n provider === \"sonar\" &&\n !(await boundSonarWorktree(\n repository,\n gitProtectedRoots,\n environment,\n signal,\n ))\n )\n return [];\n const readGit = (args: readonly string[]) =>\n abortable(\n () =>\n gitOutput(\n repository,\n args,\n signal,\n { LC_ALL: \"C\" },\n undefined,\n \"utf8\",\n gitProtectedRoots,\n environment,\n ),\n signal,\n );\n let remoteNames: string;\n try {\n remoteNames = await readGit([\"remote\"]);\n } catch (error) {\n signal?.throwIfAborted();\n // A local source directory need not be a Git checkout.\n if (\n error instanceof Error &&\n \"code\" in error &&\n error.code === 128 &&\n \"stderr\" in error &&\n typeof error.stderr === \"string\" &&\n (error.stderr.trimEnd() ===\n \"fatal: not a git repository (or any of the parent directories): .git\" ||\n /^fatal: not a git repository \\(or any parent up to mount point [^\\r\\n]+\\)\\r?\\nStopping at filesystem boundary \\(GIT_DISCOVERY_ACROSS_FILESYSTEM not set\\)\\.$/u.test(\n error.stderr.trimEnd(),\n ))\n )\n return [];\n throw error;\n }\n const remotes: ConfiguredFetchRemote[] = [];\n for (const name of remoteNames.split(/\\r?\\n/u).filter(Boolean)) {\n if (provider === \"sonar\") {\n // Git fetches from only the first URL, after insteadOf rewrites.\n const url = await readGit([\"remote\", \"get-url\", \"--\", name]);\n if (/[\\r\\n]/u.test(url))\n throw new CodexSecurityError(\n \"A configured Git remote URL contains a line break. Configure each fetch URL as a separate Git value.\",\n );\n remotes.push({ name, url });\n } else {\n const urls = await readGit([\"remote\", \"get-url\", \"--all\", \"--\", name]);\n for (const url of urls.split(/\\r?\\n/u)) remotes.push({ name, url });\n }\n }\n return remotes;\n}\n\nasync function requireMatchingRepository(\n repository: string,\n provider: Provider,\n sources: readonly ExternalSourceRepository[],\n strictSources: ReadonlyMap<string, Provider>,\n strictPlatformFor: (source: ExternalSourceRepository) => Provider,\n protectedRoots: WorkbenchCommandOptions[\"protectedRoot\"],\n environment: WorkbenchCommandOptions[\"environment\"],\n signal?: AbortSignal,\n possibleSshHost?: string,\n fetchRemotes?: readonly ConfiguredFetchRemote[],\n): Promise<boolean> {\n if (sources.length === 0) return false;\n const remotes =\n fetchRemotes ??\n (await configuredFetchRemotes(\n repository,\n provider,\n protectedRoots,\n environment,\n signal,\n ));\n const boundProvider =\n provider === \"sonar\" ||\n provider === \"continuum\" ||\n provider === \"inspector\" ||\n provider === \"blackduck\" ||\n provider === \"veracode\";\n const loosePlatformFor = localRepositoryPlatform(provider, sources, false);\n const comparable: string[] = [];\n const unverified: string[] = [];\n for (const { url: remote } of remotes) {\n const verified =\n provider === \"sonar\" ? sonarRepositoryForRemote(remote) : remote;\n if (verified) comparable.push(verified);\n else if (!/[\\s\\\\\\p{Cc}?#]/u.test(remote)) unverified.push(remote);\n }\n let allSourcesMatched = true;\n for (const source of sources) {\n const bound = boundProvider || strictSources.has(source.url);\n const platform = bound\n ? (strictSources.get(source.url) ?? strictPlatformFor(source))\n : loosePlatformFor(source);\n const identity = (url: string) =>\n remoteRepository(url, provider, bound, platform);\n const targets = comparable.flatMap((remote) => identity(remote) ?? []);\n const target = identity(source.url);\n if (target && targets.some((remote) => matchingRemote(remote, target)))\n continue;\n allSourcesMatched = false;\n // A custom SSH upstream can agree with a manual mapping even when a\n // recognized HTTPS remote points at a fork. It cannot prove a Cloud binding.\n const configured = unverified.flatMap(\n (remote) =>\n remoteRepository(remote, provider, bound, platform, possibleSshHost) ??\n [],\n );\n if (target && configured.some((remote) => matchingRemote(remote, target)))\n continue;\n if (targets.length || configured.length)\n throw new CodexSecurityError(\n `Imported repository ${JSON.stringify(source.url)} does not match a configured remote of ${repository}. Select the matching local repository.`,\n );\n }\n return allSourcesMatched;\n}\n\nexport function sonarCheckoutMatchesSource(\n repository: string,\n url: string,\n protectedRoots: readonly string[],\n environment: NodeJS.ProcessEnv,\n signal?: AbortSignal,\n) {\n return requireMatchingRepository(\n repository,\n \"sonar\",\n [{ url }],\n new Map(),\n () => \"sonar\",\n [...protectedRoots],\n environment,\n signal,\n );\n}\n\nasync function localContext(\n selectedRepository: string,\n dependencies: LocalExternalImportDependencies,\n mode: \"import\" | \"read\" = \"import\",\n) {\n dependencies.signal?.throwIfAborted();\n const selected = dependencies.environment ?? process.env;\n const environment = workbenchEnvironment(selected);\n forwardExternalImportSetting(selected, environment);\n requireExternalImports(environment);\n const path = expandHome(selectedRepository, environment);\n const repository =\n mode === \"read\"\n ? await abortable(() => canonicalConfigPath(path), dependencies.signal)\n : await normalizeRepository(path, dependencies.signal);\n const protectedRoot = [\n ...new Set([\n repository,\n ...(await abortable(\n () => importGitProtectionRoots(path, environment, dependencies.signal),\n dependencies.signal,\n )),\n ]),\n ];\n requireOutputOutsideRepositories(\n protectedRoot,\n await abortable(\n () => canonicalizeModelSafePath(environment.CODEX_SECURITY_STATE_DIR),\n dependencies.signal,\n ),\n \"runtime\",\n );\n return {\n repository,\n options: {\n pluginRoot: await abortable(\n () => bundledPluginRoot(),\n dependencies.signal,\n ),\n environment,\n protectedRoot,\n signal: dependencies.signal,\n failureMessage: \"Could not access imported local findings\",\n },\n };\n}\n\n/** Prepare scanner evidence without writing state or performing a security assessment. */\nexport async function prepareNormalizedLocalImport(\n input: ExternalFindings,\n options: NormalizedLocalImportOptions,\n dependencies: LocalExternalImportDependencies = {},\n): Promise<PreparedLocalExternalImport> {\n dependencies.signal?.throwIfAborted();\n requireExternalImports(dependencies.environment);\n return prepareLocalImport(\n input,\n snapshotImportOptions(options),\n dependencies,\n );\n}\n\n/** @internal Prepare evidence using settings captured by either local import entrypoint. */\nexport async function prepareLocalImport(\n input: ExternalFindings,\n options: NormalizedLocalImportOptions,\n dependencies: LocalExternalImportDependencies,\n readerSources = snapshotSourceRepositories(dependencies.sourceRepositories),\n parsedSources: readonly ExternalSourceRepository[] = [],\n fetchRemotes?: readonly ConfiguredFetchRemote[],\n): Promise<PreparedLocalExternalImport> {\n requireIdentity(options.sourceKey, \"Source key\");\n const current = snapshotNormalizedFindings(input, checkStoredNumber);\n let dependabotSource: string | undefined;\n const identities = new Set<string>();\n for (const finding of current.findings) {\n requireIdentity(finding.source_finding_id, \"Source finding id\");\n if (identities.has(finding.source_finding_id))\n throw new CodexSecurityError(\n `Duplicate source finding id ${JSON.stringify(finding.source_finding_id)}.`,\n );\n identities.add(finding.source_finding_id);\n if (!isRecord(finding.evidence))\n throw new CodexSecurityError(\"Imported evidence must be an object.\");\n if (options.provider !== \"github\") continue;\n const native = dependabotRepository(finding);\n if (!native) continue;\n const claimed = finding.evidence.details?.repository?.url;\n if (\n claimed &&\n cloudRepositoryUrlKey(claimed) !== cloudRepositoryUrlKey(native)\n )\n throw new CodexSecurityError(\n \"The normalized repository does not match the original Dependabot alert.\",\n );\n if (dependabotSource && dependabotSource !== native)\n throw new CodexSecurityError(\n \"Select Dependabot alerts from only one GitHub host and repository.\",\n );\n dependabotSource = native;\n }\n const { repository, options: workbenchOptions } = await localContext(\n options.repository,\n dependencies,\n );\n const sources = new Map<string, ExternalSourceRepository>();\n const references = [...readerSources, ...parsedSources];\n const inspector = inspectorReportRepository(\n options.provider,\n current.findings,\n \"local\",\n options.inspectorProjectMap,\n );\n const projected =\n options.provider === \"blackduck\"\n ? []\n : current.findings.filter((finding) =>\n projectedBlackDuckRepositoryUrl(finding, \"local\"),\n );\n const mixed = projected.length > 0 && readerSources.length > 0;\n const nativeSources = new Map(\n (mixed ? current.findings : projected)\n .filter(\n ({ evidence }) =>\n options.provider !== \"endor\" ||\n isRecord(evidence.source_data?.[\"runContext\"]),\n )\n .map(\n (finding) =>\n [\n finding,\n localFindingRepositories(options.provider, finding),\n ] as const,\n ),\n );\n const platformFor = localRepositoryPlatform(\n options.provider,\n options.inspectorProjectMap\n ? []\n : [\n ...references,\n ...Array.from(nativeSources.values()).flat(),\n ...(inspector ? [inspector] : []),\n ],\n true,\n );\n const identify = (url: string) =>\n remoteRepository(url, options.provider, true, platformFor({ url })) ?? {\n key: url,\n };\n // A hint from an independent reader applies across projected rows. A native\n // GitHub asset in one row only identifies the platform of that row's claims.\n const operatorPlatform = localRepositoryPlatform(\n options.provider,\n readerSources,\n true,\n );\n const sameRepositories = (urls: Iterable<string>) =>\n sameScannerRepositories(Array.from(urls, identify));\n const bound = blackDuckReportRepositories(\n options.provider,\n current.findings,\n \"local\",\n sameRepositories,\n );\n for (const repositories of [\n veracodeReportRepositories,\n continuumReportRepositories,\n ]) {\n for (const source of repositories(\n options.provider,\n current.findings,\n \"local\",\n sameRepositories,\n ).values()) {\n sources.set(source.url, source);\n }\n }\n const strictSources = new Map<string, Provider>();\n const known = new Set<string>(parsedSources.map(({ url }) => url));\n for (const finding of current.findings) {\n const { evidence, source_finding_id: id } = finding;\n const url = evidence.details?.repository?.url;\n if (url) sources.set(url, { url });\n const retained = bound.get(id);\n const native = nativeSources.get(finding) ?? [];\n if (retained) {\n const claims = [\n retained.url,\n ...(url ? [url] : []),\n ...native.map((ref) => ref.url),\n ];\n const rowPlatform = (claim: string) =>\n options.provider !== \"wiz\"\n ? platformFor({ url: claim })\n : native.some((source) => source.platform === \"github\")\n ? \"github\"\n : operatorPlatform({ url: claim });\n if (\n !sameScannerRepositories(\n claims.map(\n (claim) =>\n remoteRepository(\n claim,\n options.provider,\n true,\n rowPlatform(claim),\n ) ?? {\n key: claim,\n },\n ),\n )\n )\n throw new CodexSecurityError(\n \"The retained scanner repository does not match the original provider finding.\",\n );\n for (const source of [retained, ...native])\n sources.set(source.url, source);\n for (const claim of claims) {\n const platform = rowPlatform(claim);\n if (!strictSources.has(claim) || platform !== \"github\")\n strictSources.set(claim, platform);\n }\n }\n for (const source of native) known.add(source.url);\n }\n if (mixed) {\n // A caller reference with no matching row spelling can still be a Git alias.\n const rows = [...sources.keys(), ...known].map(identify);\n const byKey = Map.groupBy(rows, (remote) => remote.key);\n const represented = new Set(rows.map((remote) => JSON.stringify(remote)));\n const aliases = readerSources\n .map(({ url }) => identify(url))\n .filter((remote) => !represented.has(JSON.stringify(remote)));\n for (const [key, group] of Map.groupBy(aliases, (remote) => remote.key)) {\n const candidates = byKey.get(key);\n if (!candidates || !sameScannerRepositories([...candidates, ...group]))\n throw new CodexSecurityError(\n \"Reader repository does not match a source in the normalized findings.\",\n );\n }\n }\n if (strictSources.size && options.provider !== \"blackduck\") {\n const keys = new Set(\n Array.from(strictSources.keys(), (url) => identify(url).key),\n );\n for (const source of references)\n if (!strictSources.has(source.url) && keys.has(identify(source.url).key))\n strictSources.set(source.url, platformFor(source));\n }\n if (inspector) {\n const platform = inspector.platform ?? options.provider;\n const native = remoteRepository(\n inspector.url,\n options.provider,\n true,\n platform,\n );\n for (const url of sources.keys()) {\n if (\n !native ||\n remoteRepository(url, options.provider, true, platform)?.key !==\n native.key\n )\n throw new CodexSecurityError(\n `Imported repository ${JSON.stringify(url)} does not match the retained Inspector repository ${JSON.stringify(inspector.url)}.`,\n );\n }\n }\n for (const source of [...(inspector ? [inspector] : []), ...references]) {\n // A reader's platform must not loosen an operator-supplied Inspector map.\n if (sources.get(source.url)?.platform !== \"github\")\n sources.set(\n source.url,\n options.inspectorProjectMap ? { url: source.url } : source,\n );\n }\n const sonarSources = sonarRepositoryUrls(\n options.provider,\n current.findings,\n current.report,\n \"local\",\n );\n const manualSource =\n options.provider === \"sonar\" && options.sourceRepositoryUrl\n ? declaredScannerRepositoryUrl(\n options.sourceRepositoryUrl,\n \"Sonar\",\n \"local\",\n )\n : undefined;\n if (manualSource) sonarSources.add(manualSource);\n for (const url of sonarSources)\n if (!sources.has(url)) sources.set(url, { url });\n if (sonarSources.size && !sameRepositories(sources.keys()))\n throw new CodexSecurityError(\n manualSource\n ? \"The Sonar evidence does not match the declared source repository.\"\n : \"The retained Sonar repository does not match the other source repository claims.\",\n );\n if (\n options.provider === \"blackduck\" &&\n current.findings.length &&\n sources.size > 1 &&\n !sameScannerRepositories(Array.from(sources.keys(), identify))\n )\n throw new CodexSecurityError(\n \"Black Duck occurrences must belong to the same project version and source repository.\",\n );\n if (dependabotSource)\n sources.set(dependabotSource, {\n url: dependabotSource,\n platform: \"github\",\n });\n const selected = manualSource ? new URL(manualSource) : undefined;\n const matchesRepositoryRemote = await requireMatchingRepository(\n repository,\n options.provider,\n [...sources.values()],\n strictSources,\n platformFor,\n workbenchOptions.protectedRoot,\n workbenchOptions.environment,\n dependencies.signal,\n selected?.protocol === \"https:\" ? selected.hostname : undefined,\n fetchRemotes,\n );\n dependencies.signal?.throwIfAborted();\n const preview = {\n ...cloneImportPreview(current),\n repository,\n source: { provider: options.provider, source_key: options.sourceKey },\n };\n const payload = JSON.stringify({\n repository,\n provider: options.provider,\n sourceKey: options.sourceKey,\n findings: current.findings.map(({ source_finding_id, evidence }) => ({\n source_finding_id,\n evidence,\n })),\n });\n return {\n matchesRepositoryRemote,\n preview,\n async import() {\n dependencies.signal?.throwIfAborted();\n const protectedRoot = [\n ...new Set([\n ...workbenchOptions.protectedRoot,\n ...(await abortable(\n () =>\n localGitProtectionRoots(\n process.cwd(),\n workbenchOptions.environment,\n dependencies.signal,\n ),\n dependencies.signal,\n )),\n ]),\n ];\n requireOutputOutsideRepositories(\n protectedRoot,\n await abortable(\n () =>\n canonicalizeModelSafePath(\n workbenchOptions.environment.CODEX_SECURITY_STATE_DIR,\n ),\n dependencies.signal,\n ),\n \"runtime\",\n );\n const result = await abortable(() => {\n dependencies.signal?.throwIfAborted();\n return (dependencies.runWorkbench ?? runWorkbench)(\n { ...workbenchOptions, protectedRoot },\n [\"store-external-findings\"],\n payload,\n );\n }, dependencies.signal);\n return {\n repository,\n read: current.read,\n ...(current.report === undefined\n ? {}\n : snapshotNormalizedFindings({ report: current.report })),\n ready: current.findings.length,\n excluded: structuredClone(current.excluded),\n findings: result[\"findings\"] as unknown as StoredExternalFinding[],\n counts: result[\"counts\"] as LocalExternalImportResult[\"counts\"],\n };\n },\n };\n}\n\n/** Read imported source records, including evidence that has not been assessed by Codex. */\nexport async function listLocalExternalFindings(\n selection: { repository: string; id?: string },\n dependencies: LocalExternalImportDependencies = {},\n): Promise<StoredExternalFinding[]> {\n dependencies.signal?.throwIfAborted();\n requireExternalImports(dependencies.environment);\n if (selection.id !== undefined) requireIdentity(selection.id, \"Finding id\");\n const { repository, options } = await localContext(\n selection.repository,\n dependencies,\n \"read\",\n );\n const result = await abortable(() => {\n dependencies.signal?.throwIfAborted();\n return (dependencies.runWorkbench ?? runWorkbench)(\n options,\n [\"list-external-findings\"],\n JSON.stringify({ repository, id: selection.id }),\n );\n }, dependencies.signal);\n return result[\"findings\"] as unknown as StoredExternalFinding[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"external-findings-local.js","sourceRoot":"","sources":["../src/external-findings-local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,kCAAkC,EAClC,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,GAG3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,cAAc,EACd,uBAAuB,EACv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ElD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,wBAAwB,CAC/C,UAAU,EACV,oCAAoC,EACpC,EAAE,EAAE,EAAE,EACN,YAAY,CACb,CAAC;IACF,OAAO,MAAM,CAAC,cAAc,CAA0C,CAAC;AACzE,CAAC;AAED,+EAA+E;AAC/E,KAAK,UAAU,wBAAwB,CACrC,IAAY,EACZ,OAAe,EACf,SAAkC,EAClC,YAA6C;IAE7C,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,MAAM,YAAY,CAC9D,IAAI,EACJ,YAAY,EACZ,MAAM,CACP,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE;QAClC,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC;QACtC,OAAO,CAAC,YAAY,CAAC,YAAY,IAAI,YAAY,CAAC,CAChD,OAAO,EACP,CAAC,OAAO,CAAC,EACT,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,CAAC,CAC7C,CAAC;IACJ,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACxB,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;AAClC,CAAC","sourcesContent":["import { resolve } from \"node:path\";\nimport { isDeepStrictEqual } from \"node:util\";\nimport {\n semgrepPlatformFindingBinding,\n semgrepPlatformReportScope,\n semgrepPlatformRepositoryReference,\n isSemgrepPlatformEvidence,\n semgrepReferenceMatches,\n} from \"./semgrep-platform-findings.js\";\nimport {\n gitPathToHttpPath,\n gitServiceHostname,\n isPublicGitHost,\n gitTransportBytes,\n hostedRepositoryMatches,\n normalizeHostedGitRepositoryUrl,\n} from \"./hosted-git-repository.js\";\nimport {\n checkRetainedTrivyProvider,\n checkTrivyReportProvider,\n matchTrivyCheckout,\n} from \"./trivy-import.js\";\nimport {\n readGitRemoteNames,\n readHostedGitRemotes,\n} from \"./hosted-git-remotes.js\";\nimport { CodexSecurityError } from \"./errors.js\";\nimport {\n externalImportDisposition,\n NoPublishableFindingsError,\n cloneImportPreview,\n reportForJson,\n snapshotImportOptions,\n snapshotNormalizedFindings,\n snapshotSourceRepositories,\n type ExternalFindings,\n type ExternalSourceRepository,\n} from \"./external-findings.js\";\nimport {\n cloudRepositoryUrlKey,\n requireSafeJsonInteger,\n repositoryUrlKey,\n validateExternalEvidence,\n} from \"./external-import-contract.js\";\nimport type {\n ExternalFindingEvidence,\n Provider,\n} from \"./external-import-models.js\";\nimport {\n EXTERNAL_FINDINGS_PROVIDERS,\n EXTERNAL_FINDINGS_READERS,\n localFindingRepositories,\n semgrepSarifRepositories,\n} from \"./external-findings-read.js\";\nimport {\n tenableReportFormat,\n tenableSourceRepository,\n} from \"./tenable-findings.js\";\nimport {\n guardianFindingRepository,\n guardianSelectionFormat,\n} from \"./semgrep-guardian-findings.js\";\nimport {\n hasGitMetadata,\n localGitProtectionRoots,\n commandGitProtectionRoots,\n} from \"./local-git-metadata.js\";\nimport {\n blackDuckReportRepositories,\n projectedBlackDuckRepositoryUrl,\n} from \"./blackduck-findings.js\";\nimport {\n azureReposHttpsUrl,\n isGitHubCloudHost,\n isGitHubSshOverHttps,\n isGitSsh,\n parseGitRemote,\n} from \"./git-remote.js\";\nimport { checkmarxSelection } from \"./checkmarx-repository.js\";\nimport { continuumReportRepositories } from \"./continuum-findings.js\";\nimport { veracodeReportRepositories } from \"./veracode-findings.js\";\nimport { inspectorReportRepository } from \"./inspector-findings.js\";\nimport { declaredScannerRepositoryUrl } from \"./scanner-repository-url.js\";\nimport { armorCodeRepositoryUrl } from \"./armorcode-findings.js\";\nimport { sonarRepositoryUrls } from \"./sonar-findings.js\";\nimport { isRecord } from \"./record.js\";\nimport { dependabotRepository } from \"./github-dependabot-findings.js\";\nimport { retainedGitHubRepository } from \"./github-findings.js\";\nimport {\n type SnykIssuesFindings,\n snykRestImportRepository,\n snykRestCheckoutMatches,\n} from \"./snyk-rest-findings.js\";\nimport {\n bundledPluginRoot,\n canonicalConfigPath,\n canonicalizeModelSafePath,\n resolveInputPath,\n resolveParentTraversal,\n requireOutputOutsideRepositories,\n runWorkbench,\n workbenchEnvironment,\n type WorkbenchCommandOptions,\n} from \"./runtime.js\";\nimport {\n abortable,\n enclosingGitWorktreeRoot,\n gitOutput,\n normalizeRepository,\n} from \"./targets.js\";\n\n/** A scanner source record, independent of a Codex assessment or completed scan. */\nexport interface StoredExternalFinding {\n id: string;\n repository: string;\n provider: string;\n sourceKey: string;\n sourceFindingId: string;\n evidence: ExternalFindingEvidence;\n assessment: { state: \"not_assessed\" };\n version: number;\n createdAt: string;\n updatedAt: string;\n /** Reader context required to publish this version without the original file. */\n provenance?: ExternalFindingProvenance;\n}\n\nexport interface ExternalFindingProvenance {\n sourceRepositories?: ExternalSourceRepository[];\n inspectorProjectMap?: [string, string][];\n}\n\nexport type LocalExternalFindingSelection = { repository: string } & (\n | {\n importId: string;\n findings?: never;\n /** Return an empty selection if the import is missing or any pinned version has changed. */\n ifCurrent?: boolean;\n }\n | {\n findings: readonly Pick<StoredExternalFinding, \"id\" | \"version\">[];\n importId?: never;\n }\n);\n\nexport interface SelectedLocalExternalFindings extends Omit<\n ExternalFindings,\n \"findings\"\n> {\n findings: StoredExternalFinding[];\n}\n\nexport interface StoredExternalImport {\n importId: string;\n createdAt: string;\n provider: string;\n sourceKey: string;\n count: number;\n}\n\nexport interface LocalFindingReceipt {\n id: string;\n version: number;\n receiptId: string;\n outcome: \"created\" | \"updated\" | \"unchanged\" | \"private_job\";\n cloudFindingId?: string;\n}\n\ninterface CloudFindingDestination {\n cloudApiUrl: string;\n accountId: string;\n destinationId: string;\n}\n\nexport interface StoredFindingPublication\n extends LocalFindingReceipt, CloudFindingDestination {\n createdAt: string;\n}\n\nexport interface NormalizedLocalImportOptions {\n /** Local checkout or source directory to associate with these records. */\n repository: string;\n provider: string;\n /** Stable scanner organization/project/branch namespace across imports. */\n sourceKey: string;\n /** Verified Git repository URL for readers that bind a finding to a checkout. */\n sourceRepositoryUrl?: string;\n /** Full Inspector project ARNs mapped to independently verified repository URLs. */\n inspectorProjectMap?: ReadonlyMap<string, string>;\n}\n\nexport interface LocalExternalImportDependencies {\n environment?: NodeJS.ProcessEnv;\n signal?: AbortSignal;\n runWorkbench?: typeof runWorkbench;\n /** Repository references supplied by a reader outside its projected evidence. */\n sourceRepositories?: readonly ExternalSourceRepository[];\n}\n\nexport interface LocalExternalImportPreview extends ExternalFindings {\n repository: string;\n source: {\n provider: string;\n source_key: string;\n };\n}\n\nexport interface LocalExternalImportResult {\n /** Present when the import saved a nonempty selection, including unchanged rows. */\n importId?: string;\n repository: string;\n read: number;\n report?: ExternalFindings[\"report\"];\n ready: number;\n excluded: ExternalFindings[\"excluded\"];\n findings: StoredExternalFinding[];\n counts: { created: number; updated: number; unchanged: number };\n}\n\nexport interface PreparedLocalExternalImport {\n /** Every declared source matched a configured Git remote of the checkout. */\n matchesRepositoryRemote: boolean;\n preview: LocalExternalImportPreview;\n import(): Promise<LocalExternalImportResult>;\n}\n\nfunction requireIdentity(\n value: unknown,\n field: string,\n): asserts value is string {\n if (typeof value !== \"string\" || !value.trim() || value.includes(\"\\0\"))\n throw new CodexSecurityError(\n `${field} must be nonempty and contain no NUL characters.`,\n );\n if (!value.isWellFormed())\n throw new CodexSecurityError(`${field} must contain valid Unicode.`);\n}\n\nfunction validateFindingIds(current: ExternalFindings) {\n const identities = new Set<string>();\n for (const finding of current.findings) {\n requireIdentity(finding.source_finding_id, \"Source finding id\");\n if (identities.has(finding.source_finding_id))\n throw new CodexSecurityError(\n `Duplicate source finding id ${JSON.stringify(finding.source_finding_id)}.`,\n );\n identities.add(finding.source_finding_id);\n if (!isRecord(finding.evidence))\n throw new CodexSecurityError(\"Imported evidence must be an object.\");\n if (\n typeof finding.evidence.title !== \"string\" ||\n typeof finding.evidence.severity !== \"string\"\n )\n throw new CodexSecurityError(\n \"Imported evidence requires a title and severity.\",\n );\n }\n}\n\nfunction checkStoredNumber(value: number): void {\n if (!Number.isFinite(value))\n throw new TypeError(\n \"Stored finding JSON cannot contain non-finite numbers.\",\n );\n requireSafeJsonInteger(value, \"Stored finding JSON\");\n}\n\nconst gitTransportPorts: Readonly<Record<string, string>> = {\n \"http:\": \"80\",\n \"https:\": \"443\",\n \"ssh:\": \"22\",\n \"git+ssh:\": \"22\",\n \"ssh+git:\": \"22\",\n \"git:\": \"9418\",\n \"ftp:\": \"21\",\n \"ftps:\": \"990\",\n};\n\n/** Compare transport forms without changing retained scanner evidence. */\ninterface RemoteRepositoryIdentity {\n key: string;\n account?: string;\n homeRelative?: boolean;\n}\n\nfunction sonarHostedHostname(hostname: string) {\n const name = gitServiceHostname(hostname.toLowerCase());\n return isPublicGitHost(name) ||\n [\"ssh.github.com\", \"ssh.dev.azure.com\", \"dev.azure.com\"].includes(name)\n ? name\n : undefined;\n}\n\nfunction remoteRepository(\n value: string,\n provider: Provider,\n bound: boolean,\n platform: Provider = provider,\n possibleSshHost?: string,\n): RemoteRepositoryIdentity | undefined {\n if (/^[A-Za-z]:[\\\\/]/u.test(value)) return undefined;\n const transport = bound\n ? /^(?:ssh|git\\+ssh|ssh\\+git|git):\\/\\/([^/]*)(.*)$/isu.exec(value)\n : null;\n const authority = transport?.[1];\n const http = bound && /^https?:\\/\\//iu.test(value.trimStart());\n // Git decodes the authority before locating its path. An encoded delimiter\n // cannot prove a match to another spelling through WHATWG URL's hostname.\n if (\n authority &&\n (/%2f|[?#]/iu.test(authority) ||\n authority.slice(authority.lastIndexOf(\"@\") + 1).includes(\"%\"))\n )\n return { key: value };\n let remote;\n try {\n remote = parseGitRemote(value);\n } catch {\n return transport || http ? { key: \"\\0\" + value } : undefined;\n }\n if (!remote || !Object.hasOwn(gitTransportPorts, remote.url.protocol))\n return undefined;\n const { url, path, scpStyle } = remote;\n const ssh = isGitSsh(url.protocol);\n const protocol = url.protocol === \"http:\" ? \"http:\" : \"https:\";\n const hosted = sonarHostedHostname(url.hostname);\n if (provider === \"sonar\" && hosted) url.hostname = hosted;\n const githubSshOverHttps = isGitHubSshOverHttps(url);\n let hostname = githubSshOverHttps ? \"github.com\" : url.hostname;\n // An unresolved SSH name can be a local Host alias. Only substitute the\n // supplied hostname when checking the path of an unverified manual mapping.\n if (possibleSshHost && ssh && (!hosted || hosted === \"dev.azure.com\"))\n hostname = sonarHostedHostname(possibleSshHost) ?? possibleSshHost;\n const port =\n githubSshOverHttps || url.port === gitTransportPorts[url.protocol]\n ? \"\"\n : url.port;\n // A GitHub source identifies a case-insensitive repository on custom Enterprise\n // hosts too; other providers can refer to VCS hosts with case-sensitive paths.\n const key = platform === \"github\" ? cloudRepositoryUrlKey : repositoryUrlKey;\n const origin = `${protocol}//${hostname}${port ? `:${port}` : \"\"}/`;\n if (!bound) return { key: key(origin + path) };\n\n if (!ssh && url.protocol !== \"git:\") {\n if (url.protocol === \"http:\" || url.protocol === \"https:\") {\n // libcurl and WHATWG differ on backslashes and encoded dot segments.\n const raw = /^https?:\\/\\/[^/\\\\?#\\s]+(\\/[^\\\\?#]*)?(?:[?#].*)?$/iu.exec(\n value,\n );\n if (!raw || /\\/(?:%2e|\\.%2e|%2e\\.|%2e%2e)(?:\\/|$)/iu.test(raw[1] ?? \"\"))\n return { key: \"\\0\" + value };\n }\n const suffix = /[?#].*$/su.exec(value)?.[0] ?? \"\";\n // HTTP sends the query and omits fragment text from repository requests.\n if (suffix && ![\"http:\", \"https:\"].includes(url.protocol))\n return { key: key(origin + path) + \"\\0\" };\n return {\n key:\n key(origin + path) + suffix.replace(/#.*$/su, \"#\").replace(/\\/$/u, \"\"),\n };\n }\n\n // Git passes the original path (including dot segments, '?' and '#') to upload-pack.\n if (!scpStyle && !transport) return { key: value };\n const gitPath = gitTransportBytes(transport?.[2] ?? path, scpStyle);\n const login = scpStyle\n ? /^([^@/:\\s?#]+)@/u.exec(value)?.[1]\n : /^(.*)@/u.exec(authority ?? \"\")?.[1];\n const homeRelative =\n /^\\/?~(?:\\/|$)/u.test(gitPath) || (scpStyle && !/^[~/]/u.test(gitPath));\n const suffix = /[?#].*$/su.exec(gitPath);\n // Express upload-pack bytes as a URL path for comparison with the HTTP source.\n const name = gitPathToHttpPath(gitPath.slice(0, suffix?.index));\n // Azure's generated SCP clone URL spells spaces as %20, even though Git sends SCP paths literally.\n const azure =\n (provider === \"sonar\" || provider === \"checkmarx\") &&\n !(scpStyle && path.startsWith(\"/\"))\n ? azureReposHttpsUrl(\n url,\n scpStyle ? name.replace(/%2520/gu, \"%20\") : name,\n )\n : undefined;\n const repository = suffix\n ? key(origin + name + \"?\") +\n \"\\0\" +\n suffix[0].replace(/\\/$/u, \"\").replace(/\\.git$/u, \"\")\n : key(azure ?? origin + name);\n return {\n key: repository,\n account: ssh && login ? gitTransportBytes(login, scpStyle) : undefined,\n // GitHub serves the same repository path through its SCP and SSH URLs.\n homeRelative:\n ssh && platform !== \"github\" && !isGitHubCloudHost(hostname.toLowerCase())\n ? homeRelative\n : undefined,\n };\n}\n\nfunction matchingRemote(\n left: RemoteRepositoryIdentity,\n right: RemoteRepositoryIdentity,\n) {\n return (\n left.key === right.key &&\n (left.homeRelative === undefined ||\n right.homeRelative === undefined ||\n left.homeRelative === right.homeRelative) &&\n ((left.homeRelative === false && right.homeRelative === false) ||\n left.account === undefined ||\n right.account === undefined ||\n left.account === right.account)\n );\n}\n\n// Within one fetch key and home-relative mode, matchingRemote can use any\n// account, the requested login, or an unspecified login.\nfunction fetchAliasMatcher(\n rows: readonly { fetch: RemoteRepositoryIdentity }[],\n) {\n const homes = Map.groupBy(rows, ({ fetch }) => fetch.homeRelative);\n const accounts = Array.from(\n homes.values(),\n (group) => new Map(group.map(({ fetch }) => [fetch.account, fetch])),\n );\n return (fetch: RemoteRepositoryIdentity) =>\n accounts.some((group) =>\n [\n group.values().next().value,\n group.get(fetch.account),\n group.get(undefined),\n ].some(\n (candidate) =>\n candidate !== undefined && matchingRemote(fetch, candidate),\n ),\n );\n}\n\nfunction fetchAliasMatchers<\n Row extends { fetch: RemoteRepositoryIdentity },\n Key,\n>(rows: readonly Row[], key: (row: Row) => Key) {\n return new Map(\n Array.from(\n Map.groupBy(rows, key),\n ([name, group]) => [name, fetchAliasMatcher(group)] as const,\n ),\n );\n}\n\n/** A credential-free Sonar repository binding from a supported Git fetch transport. */\nexport function sonarRepositoryForRemote(origin: string): string | undefined {\n try {\n if (/[\\s\\\\\\p{Cc}?#]/u.test(origin)) return;\n const remote = parseGitRemote(origin);\n if (!remote) return;\n const { url } = remote;\n // Git dispatches remote helpers by the literal scheme, while URL lowercases it.\n if (!remote.scpStyle && !origin.startsWith(url.protocol + \"//\")) return;\n // Git passes literal SSH paths to upload-pack. URL.pathname collapses dot segments.\n const path = remote.scpStyle\n ? remote.path\n : /^[^:/]+:\\/\\/[^/]+\\/(.+)$/u.exec(origin)?.[1];\n if (!path) return;\n const hostname = url.hostname.toLowerCase();\n let candidate: string | undefined;\n if (url.protocol === \"http:\" || url.protocol === \"https:\") {\n candidate = `${url.origin}/${path}`;\n } else if (url.username === \"git\" && isGitHubSshOverHttps(url)) {\n candidate = `https://github.com/${path}`;\n } else if (\n isGitSsh(url.protocol) &&\n url.username === \"git\" &&\n (!url.port || url.port === \"22\") &&\n isPublicGitHost(hostname)\n ) {\n candidate = `https://${hostname}/${path}`;\n } else {\n candidate = azureReposHttpsUrl(url, path);\n }\n if (!candidate) return;\n const source = declaredScannerRepositoryUrl(\n candidate.replace(/\\.git$/iu, \"\"),\n \"Sonar\",\n \"local\",\n );\n const candidateRemote = remoteRepository(origin, \"sonar\", true);\n const target = remoteRepository(source, \"sonar\", true);\n if (isGitSsh(url.protocol) && candidateRemote?.account !== \"git\") return;\n return candidateRemote && target && matchingRemote(candidateRemote, target)\n ? source\n : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** Use the same executable and configuration boundaries for every Git query proving a binding. */\nexport function boundSonarWorktree(\n repository: string,\n protectedRoots: string | readonly string[],\n environment: NodeJS.ProcessEnv | undefined,\n signal?: AbortSignal,\n) {\n return enclosingGitWorktreeRoot(repository, signal, {\n requireIfPresent: true,\n readGit: (directory, args) =>\n gitOutput(\n directory,\n args,\n signal,\n undefined,\n undefined,\n \"utf8\",\n protectedRoots,\n environment,\n ),\n });\n}\n\nfunction localRepositoryPlatform(\n provider: Provider,\n sources: readonly ExternalSourceRepository[],\n bound: boolean,\n) {\n const githubKey = (url: string) =>\n remoteRepository(url, provider, bound, \"github\")?.key;\n const githubRepositories = new Set(\n sources.flatMap((source) => {\n if (source.platform !== \"github\") return [];\n const key = githubKey(source.url);\n return key === undefined ? [] : [key];\n }),\n );\n return (source: ExternalSourceRepository): Provider => {\n if (source.platform === \"github\") return \"github\";\n if (githubRepositories.size === 0) return provider;\n const key = githubKey(source.url);\n return key !== undefined && githubRepositories.has(key)\n ? \"github\"\n : provider;\n };\n}\n\nfunction sameScannerRepositories(\n remotes: Iterable<RemoteRepositoryIdentity>,\n): boolean {\n let known: RemoteRepositoryIdentity | undefined;\n for (const remote of remotes) {\n if (known && !matchingRemote(known, remote)) return false;\n // HTTPS does not specify the login or path interpretation carried by SSH.\n known = {\n key: remote.key,\n account: remote.account ?? known?.account,\n homeRelative: remote.homeRelative ?? known?.homeRelative,\n };\n }\n return true;\n}\n\n/** @internal */\nexport interface ConfiguredFetchRemote {\n name: string;\n url: string;\n}\n\n/** @internal Effective fetch URLs from the selected, protected checkout. */\nexport async function configuredFetchRemotes(\n repository: string,\n provider: Provider,\n protectedRoots: WorkbenchCommandOptions[\"protectedRoot\"],\n environment: WorkbenchCommandOptions[\"environment\"],\n signal?: AbortSignal,\n): Promise<ConfiguredFetchRemote[]> {\n if (!(await hasGitMetadata(repository, signal))) return [];\n const gitProtectedRoots = [\n ...(typeof protectedRoots === \"string\"\n ? [protectedRoots]\n : (protectedRoots ?? [])),\n ];\n // The Sonar caller includes the discovered Git roots for both checkouts.\n if (provider !== \"sonar\")\n gitProtectedRoots.push(\n await abortable(() => canonicalConfigPath(process.cwd()), signal),\n );\n if (\n provider === \"sonar\" &&\n !(await boundSonarWorktree(\n repository,\n gitProtectedRoots,\n environment,\n signal,\n ))\n )\n return [];\n const readGit = (args: readonly string[]) =>\n abortable(\n () =>\n gitOutput(\n repository,\n args,\n signal,\n { LC_ALL: \"C\" },\n undefined,\n \"utf8\",\n gitProtectedRoots,\n environment,\n ),\n signal,\n );\n const remoteNames = await readGitRemoteNames(readGit, signal);\n if (remoteNames === undefined) return [];\n const remotes: ConfiguredFetchRemote[] = [];\n const firstUrlOnly = provider === \"sonar\" || provider === \"checkmarx\";\n for (const name of remoteNames.split(/\\r?\\n/u).filter(Boolean)) {\n if (firstUrlOnly) {\n // Git fetches from only the first URL, after insteadOf rewrites.\n const url = await readGit([\"remote\", \"get-url\", \"--\", name]);\n if (/[\\r\\n]/u.test(url))\n throw new CodexSecurityError(\n \"A configured Git remote URL contains a line break. Configure each fetch URL as a separate Git value.\",\n );\n remotes.push({ name, url });\n } else {\n const urls = await readGit([\"remote\", \"get-url\", \"--all\", \"--\", name]);\n for (const url of urls.split(/\\r?\\n/u)) remotes.push({ name, url });\n }\n }\n return remotes;\n}\n\nasync function hostedCheckoutRemotes(\n repository: string,\n protectedRoots: readonly string[],\n environment: WorkbenchCommandOptions[\"environment\"],\n signal?: AbortSignal,\n) {\n if (!(await hasGitMetadata(repository, signal))) return undefined;\n return readHostedGitRemotes(\n repository,\n [...protectedRoots, await canonicalConfigPath(process.cwd())],\n environment,\n signal,\n );\n}\n\nasync function requireMatchingRepository(\n repository: string,\n provider: Provider,\n sources: readonly ExternalSourceRepository[],\n strictSources: ReadonlyMap<string, Provider>,\n hostedSources: readonly ExternalSourceRepository[],\n platformFor: (source: ExternalSourceRepository, bound: boolean) => Provider,\n snyk: ReturnType<typeof snykRestImportRepository>,\n protectedRoots: string[],\n environment: WorkbenchCommandOptions[\"environment\"],\n signal?: AbortSignal,\n possibleSshHost?: string,\n fetchRemotes?: readonly ConfiguredFetchRemote[],\n isCheckmarxSource?: (url: string) => boolean,\n): Promise<boolean> {\n if (!snyk && sources.length === 0 && hostedSources.length === 0) return false;\n let allSourcesMatched = true;\n if (snyk || hostedSources.length) {\n const remotes = await hostedCheckoutRemotes(\n repository,\n protectedRoots,\n environment,\n signal,\n );\n if (snyk) {\n if (\n remotes &&\n !remotes.some((remote) => snykRestCheckoutMatches(snyk, remote))\n )\n throw new CodexSecurityError(\n `Imported repository ${JSON.stringify(snyk.url)} does not match a configured remote of ${repository}. Select the matching local repository.`,\n );\n return remotes !== undefined;\n }\n allSourcesMatched = remotes !== undefined;\n if (remotes) {\n for (const source of hostedSources)\n if (!remotes.some((remote) => hostedRepositoryMatches(source, remote)))\n throw new CodexSecurityError(\n `Imported repository ${JSON.stringify(source.url)} does not match a configured remote of ${repository}. Select the matching local repository.`,\n );\n }\n if (!sources.length) return allSourcesMatched;\n }\n const remoteProvider = (checkmarx?: boolean) =>\n checkmarx && provider !== \"sonar\" ? \"checkmarx\" : provider;\n const remotes =\n fetchRemotes ??\n (await configuredFetchRemotes(\n repository,\n remoteProvider(Boolean(isCheckmarxSource)),\n protectedRoots,\n environment,\n signal,\n ));\n const boundProvider =\n provider === \"sonar\" ||\n provider === \"checkmarx\" ||\n provider === \"continuum\" ||\n provider === \"inspector\" ||\n provider === \"blackduck\" ||\n provider === \"veracode\";\n const comparable: string[] = [];\n const unverified: string[] = [];\n for (const { url: remote } of remotes) {\n const verified =\n provider === \"sonar\" ? sonarRepositoryForRemote(remote) : remote;\n if (verified) comparable.push(verified);\n else if (!/[\\s\\\\\\p{Cc}?#]/u.test(remote)) unverified.push(remote);\n }\n for (const source of sources) {\n const bound = boundProvider || strictSources.has(source.url);\n const platform =\n strictSources.get(source.url) ?? platformFor(source, bound);\n const sourceProvider = remoteProvider(isCheckmarxSource?.(source.url));\n const identity = (url: string, fallbackHost?: string) =>\n remoteRepository(url, sourceProvider, bound, platform, fallbackHost);\n const targets = comparable.flatMap((remote) => identity(remote) ?? []);\n const target = identity(source.url);\n if (target && targets.some((remote) => matchingRemote(remote, target)))\n continue;\n allSourcesMatched = false;\n // A custom SSH upstream can agree with a manual mapping even when a\n // recognized HTTPS remote points at a fork. It cannot prove a Cloud binding.\n const configured = unverified.flatMap(\n (remote) => identity(remote, possibleSshHost) ?? [],\n );\n if (target && configured.some((remote) => matchingRemote(remote, target)))\n continue;\n if (targets.length || configured.length)\n throw new CodexSecurityError(\n `Imported repository ${JSON.stringify(source.url)} does not match a configured remote of ${repository}. Select the matching local repository.`,\n );\n }\n return allSourcesMatched;\n}\n\nexport function sonarCheckoutMatchesSource(\n repository: string,\n url: string,\n protectedRoots: readonly string[],\n environment: NodeJS.ProcessEnv,\n signal?: AbortSignal,\n) {\n return requireMatchingRepository(\n repository,\n \"sonar\",\n [{ url }],\n new Map(),\n [],\n () => \"sonar\",\n undefined,\n [...protectedRoots],\n environment,\n signal,\n );\n}\n\n/** @internal Resolve and protect the local checkout and workbench state directory. */\nasync function localContext(\n selectedRepository: string,\n dependencies: LocalExternalImportDependencies,\n mode: \"import\" | \"read\" = \"import\",\n) {\n dependencies.signal?.throwIfAborted();\n const environment = workbenchEnvironment(\n dependencies.environment ?? process.env,\n );\n const requested = resolveInputPath(\n selectedRepository,\n process.cwd(),\n environment,\n );\n const path = await abortable(\n () => resolveParentTraversal(requested),\n dependencies.signal,\n );\n const repository =\n mode === \"read\"\n ? await abortable(() => canonicalConfigPath(path), dependencies.signal)\n : await normalizeRepository(path, dependencies.signal);\n const lexicalPath = resolve(requested);\n const lexicalRepository =\n lexicalPath === resolve(path)\n ? repository\n : await abortable(\n () => canonicalConfigPath(lexicalPath),\n dependencies.signal,\n );\n const protectedRoot = [\n ...new Set([\n repository,\n ...(mode === \"read\" ? [lexicalRepository] : []),\n ...(await abortable(\n () =>\n commandGitProtectionRoots(path, environment, dependencies.signal, {\n requestedPaths: [lexicalPath, lexicalRepository],\n }),\n dependencies.signal,\n )),\n ]),\n ];\n requireOutputOutsideRepositories(\n protectedRoot,\n await abortable(\n () => canonicalizeModelSafePath(environment.CODEX_SECURITY_STATE_DIR),\n dependencies.signal,\n ),\n \"runtime\",\n );\n return {\n repository,\n selectedPath: path,\n options: {\n pluginRoot: await abortable(\n () => bundledPluginRoot(),\n dependencies.signal,\n ),\n environment,\n protectedRoot,\n signal: dependencies.signal,\n failureMessage: \"Could not access imported local findings\",\n },\n };\n}\n\n/** Prepare scanner evidence without writing state or performing a security assessment. */\nexport async function prepareNormalizedLocalImport(\n input: ExternalFindings,\n options: NormalizedLocalImportOptions,\n dependencies: LocalExternalImportDependencies = {},\n): Promise<PreparedLocalExternalImport> {\n const { signal } = dependencies;\n signal?.throwIfAborted();\n const settings = snapshotImportOptions(options);\n const reader = EXTERNAL_FINDINGS_READERS.find(\n (name) => name === settings.provider,\n );\n if (reader)\n return prepareLocalImport(\n input,\n { ...settings, provider: EXTERNAL_FINDINGS_PROVIDERS[reader] },\n dependencies,\n );\n\n const references = snapshotSourceRepositories(\n dependencies.sourceRepositories,\n );\n requireIdentity(settings.provider, \"Provider\");\n requireIdentity(settings.sourceKey, \"Source key\");\n const current = snapshotNormalizedFindings(input, checkStoredNumber);\n validateFindingIds(current);\n if (current.report !== undefined && !isRecord(current.report))\n throw new CodexSecurityError(\"Report metadata must be an object.\");\n if (current.read !== current.findings.length + current.excluded.length)\n throw new CodexSecurityError(\n \"Every source record must be accounted for by a finding or exclusion.\",\n );\n const positions = new Set<number>();\n for (const { position, source_finding_id, reason } of current.excluded) {\n if (\n !Number.isSafeInteger(position) ||\n position < 1 ||\n position > current.read ||\n positions.has(position)\n )\n throw new CodexSecurityError(\n \"An excluded position must be unique and within the reported record count.\",\n );\n positions.add(position);\n requireIdentity(reason, \"Exclusion reason\");\n if (source_finding_id !== null)\n requireIdentity(source_finding_id, \"Excluded source finding id\");\n }\n\n const platform = references.find((ref) => ref.platform)?.platform;\n const urls = new Set(references.map(({ url }) => url));\n if (settings.sourceRepositoryUrl !== undefined)\n urls.add(settings.sourceRepositoryUrl);\n for (const finding of current.findings) {\n finding.evidence = validateExternalEvidence(finding.evidence, \"local\");\n const repository = finding.evidence.details?.repository;\n if (repository) urls.add(repository.url);\n }\n const sources = Array.from(urls, (url) => ({\n url: declaredScannerRepositoryUrl(url, settings.provider, \"local\"),\n platform,\n }));\n const [source] = sources;\n const context = await localContext(settings.repository, dependencies);\n let matched = false;\n if (source) {\n if (\n references.some((ref) => ref.platform && ref.platform !== platform) ||\n sources.some(({ url }) => !hostedRepositoryMatches(source, url))\n )\n throw new CodexSecurityError(\n \"The findings declare conflicting source repositories.\",\n );\n const remotes = await hostedCheckoutRemotes(\n context.repository,\n context.options.protectedRoot,\n context.options.environment,\n signal,\n );\n matched =\n remotes?.some((remote) => hostedRepositoryMatches(source, remote)) ??\n false;\n if (\n !matched &&\n remotes?.some((remote) =>\n /^https?:\\/\\//iu.test(\n normalizeHostedGitRepositoryUrl(\n remote,\n undefined,\n platform !== undefined,\n ),\n ),\n )\n )\n throw new CodexSecurityError(\n `Imported repository ${JSON.stringify(source.url)} does not match a configured fetch remote of ${context.repository}.`,\n );\n }\n return preparedLocalStorage(\n current,\n settings,\n context,\n dependencies,\n matched,\n { sourceRepositories: sources },\n );\n}\n\n// A scanner can repeat the same repository reference for every finding in a run.\nexport function distinctSourceRepositories(\n sources: readonly ExternalSourceRepository[],\n) {\n const seen = new Map<ExternalSourceRepository[\"platform\"], Set<string>>();\n return sources.filter(({ url, platform }) => {\n const urls = seen.get(platform) ?? new Set<string>();\n if (urls.has(url)) return false;\n urls.add(url);\n seen.set(platform, urls);\n return true;\n });\n}\n\n/** @internal Prepare evidence using settings captured by either local import entrypoint. */\nexport async function prepareLocalImport(\n input: ExternalFindings & Partial<SnykIssuesFindings>,\n options: NormalizedLocalImportOptions &\n ({ provider: \"tenable\" } | { provider: Provider }),\n dependencies: LocalExternalImportDependencies,\n readerSources = distinctSourceRepositories(\n snapshotSourceRepositories(dependencies.sourceRepositories),\n ),\n parsedInput?: readonly ExternalSourceRepository[],\n fetchRemotes?: readonly ConfiguredFetchRemote[],\n): Promise<PreparedLocalExternalImport> {\n requireIdentity(options.sourceKey, \"Source key\");\n const parsedSources = distinctSourceRepositories(parsedInput ?? []);\n // File readers interpret their source option while parsing. For normalized\n // input the caller declares one repository for the whole selection.\n const normalizedSource =\n parsedInput === undefined && options.sourceRepositoryUrl !== undefined\n ? declaredScannerRepositoryUrl(\n options.sourceRepositoryUrl,\n options.provider,\n \"local\",\n )\n : undefined;\n const current = snapshotNormalizedFindings(\n input,\n checkStoredNumber,\n \"local\",\n options.provider,\n );\n if (\n options.provider !== \"tenable\" &&\n (current.report?.[\"format\"] === tenableReportFormat ||\n current.findings.some(\n (row) => row.evidence?.source_data?.[\"format\"] === tenableReportFormat,\n ))\n )\n throw new CodexSecurityError(\n \"Retained Tenable evidence requires the tenable provider.\",\n );\n checkTrivyReportProvider(options.provider, current.report);\n let dependabotSource: string | undefined;\n validateFindingIds(current);\n for (const finding of current.findings) {\n checkRetainedTrivyProvider(options.provider, finding, \"local\");\n if (options.provider !== \"github\") continue;\n const native = dependabotRepository(finding);\n if (!native) continue;\n const claimed = finding.evidence.details?.repository?.url;\n if (\n claimed &&\n cloudRepositoryUrlKey(claimed) !== cloudRepositoryUrlKey(native)\n )\n throw new CodexSecurityError(\n \"The normalized repository does not match the original Dependabot alert.\",\n );\n if (dependabotSource && dependabotSource !== native)\n throw new CodexSecurityError(\n \"Select Dependabot alerts from only one GitHub host and repository.\",\n );\n dependabotSource = native;\n }\n const context = await localContext(options.repository, dependencies);\n if (options.provider === \"tenable\") {\n const source = tenableSourceRepository(\n current,\n options.sourceRepositoryUrl,\n [...readerSources, ...parsedSources],\n );\n const remotes = await hostedCheckoutRemotes(\n context.repository,\n context.options.protectedRoot,\n context.options.environment,\n dependencies.signal,\n );\n if (!remotes?.some((remote) => hostedRepositoryMatches(source, remote)))\n throw new CodexSecurityError(\n \"Tenable's source repository must match a configured Git fetch remote of the selected checkout.\",\n );\n return preparedLocalStorage(current, options, context, dependencies, true, {\n sourceRepositories: [source],\n });\n }\n const { repository, options: workbenchOptions } = context;\n const sources = new Map<string, ExternalSourceRepository>();\n const references = [...readerSources, ...parsedSources];\n const inspector = inspectorReportRepository(\n options.provider,\n current.findings,\n \"local\",\n options.inspectorProjectMap,\n );\n const checkmarx = checkmarxSelection(\n options.provider,\n current.findings,\n current.report,\n \"local\",\n );\n const projected = current.findings.filter(\n (finding) =>\n (options.provider !== \"blackduck\" &&\n projectedBlackDuckRepositoryUrl(finding, \"local\")) ||\n checkmarx.projections.has(finding),\n );\n const mixed = projected.length > 0 && readerSources.length > 0;\n const nativeSources = new Map(\n (mixed || normalizedSource ? current.findings : projected)\n .filter(\n ({ evidence }) =>\n options.provider !== \"endor\" ||\n isRecord(evidence.source_data?.[\"runContext\"]),\n )\n .map(\n (finding) =>\n [\n finding,\n localFindingRepositories(options.provider, finding),\n ] as const,\n ),\n );\n const platformFor = localRepositoryPlatform(\n options.provider,\n options.inspectorProjectMap\n ? []\n : [\n ...references,\n ...Array.from(nativeSources.values()).flat(),\n ...(inspector ? [inspector] : []),\n ],\n true,\n );\n const identify = (url: string) =>\n remoteRepository(url, options.provider, true, platformFor({ url })) ?? {\n key: url,\n };\n // A hint from an independent reader applies across projected rows. A native\n // GitHub asset in one row only identifies the platform of that row's claims.\n const operatorPlatform = localRepositoryPlatform(\n options.provider,\n readerSources,\n true,\n );\n const sameRepositories = (urls: Iterable<string>) =>\n sameScannerRepositories(Array.from(urls, identify));\n const bound = blackDuckReportRepositories(\n options.provider,\n current.findings,\n \"local\",\n sameRepositories,\n );\n const checkmarxRepository = checkmarx.repositories(sameRepositories);\n for (const repositories of [\n veracodeReportRepositories,\n continuumReportRepositories,\n ]) {\n for (const source of repositories(\n options.provider,\n current.findings,\n \"local\",\n sameRepositories,\n ).values()) {\n sources.set(source.url, source);\n }\n }\n const strictSources = new Map<string, Provider>();\n const checkmarxKeys = new Set<string>();\n const hostedSources = new Map<string, ExternalSourceRepository>();\n const semgrepReportScope = semgrepPlatformReportScope(\n current,\n options.provider,\n readerSources,\n );\n const semgrepPlatformRepositoryUrl = semgrepReportScope?.url;\n function addSemgrepSource(url: string) {\n if (options.provider !== \"semgrep\")\n throw new CodexSecurityError(\n \"Use the semgrep provider for Semgrep Platform findings.\",\n );\n const source = semgrepPlatformRepositoryReference(url, readerSources);\n if (\n semgrepPlatformRepositoryUrl &&\n semgrepPlatformRepositoryUrl !== url &&\n !semgrepReferenceMatches(source, semgrepPlatformRepositoryUrl)\n )\n throw new CodexSecurityError(\n \"The Semgrep report repository does not match the native finding's project.\",\n );\n hostedSources.set(source.url, source);\n }\n function addGuardianSource(value: unknown) {\n if (options.provider !== \"semgrep\")\n throw new CodexSecurityError(\n \"Use the semgrep provider for Guardian findings.\",\n );\n const url = declaredScannerRepositoryUrl(value, \"Guardian\", \"local\");\n const source =\n hostedSources.get(url) ??\n semgrepPlatformRepositoryReference(url, readerSources);\n hostedSources.set(url, source);\n return source;\n }\n const guardianReport =\n current.report?.[\"format\"] === guardianSelectionFormat\n ? addGuardianSource(current.report[\"repositoryUrl\"])\n : undefined;\n if (semgrepPlatformRepositoryUrl)\n addSemgrepSource(semgrepPlatformRepositoryUrl);\n const known = new Set<string>(parsedSources.map(({ url }) => url));\n const hasPlatformEvidence =\n options.provider === \"semgrep\" &&\n (semgrepReportScope !== undefined ||\n current.findings.some((row) =>\n isSemgrepPlatformEvidence(row, options.provider),\n ));\n let hasOrdinaryRows = false;\n let ordinaryRowNeedsReferences = false;\n for (const finding of current.findings) {\n const retained =\n bound.get(finding.source_finding_id) ?? checkmarxRepository(finding);\n const native = nativeSources.get(finding) ?? [];\n const sarif =\n hasPlatformEvidence ||\n (normalizedSource && options.provider === \"semgrep\")\n ? semgrepSarifRepositories(finding)\n : [];\n if (normalizedSource) for (const source of sarif) known.add(source.url);\n const semgrep = semgrepPlatformFindingBinding(\n finding,\n options.provider,\n readerSources,\n semgrepReportScope,\n [retained, ...native, ...sarif],\n );\n if (semgrep) {\n addSemgrepSource(semgrep.url);\n if (semgrep.sourceData) finding.evidence.source_data = semgrep.sourceData;\n if (semgrep.migration) Object.assign(finding.evidence, semgrep.migration);\n }\n const { evidence } = finding;\n if (options.provider === \"armorcode\") {\n const nativeUrl = armorCodeRepositoryUrl(evidence.source_data, \"local\");\n if (nativeUrl) sources.set(nativeUrl, { url: nativeUrl });\n }\n if (options.provider === \"github\") {\n const source = retainedGitHubRepository(\n finding,\n (url) => identify(url).key,\n );\n if (source) sources.set(source, { url: source, platform: \"github\" });\n }\n const guardian = guardianFindingRepository(finding, \"local\");\n const url = evidence.details?.repository?.url;\n if (guardian) {\n const source = addGuardianSource(guardian);\n if (\n (guardianReport &&\n !semgrepReferenceMatches(guardianReport, source.url)) ||\n (url &&\n !semgrepReferenceMatches(\n source,\n declaredScannerRepositoryUrl(url, \"Guardian\", \"local\"),\n ))\n )\n throw new CodexSecurityError(\n \"The Guardian finding repository does not match its recorded selection.\",\n );\n } else if (!semgrep) {\n hasOrdinaryRows = true;\n if (url) sources.set(url, { url });\n }\n if (\n hasPlatformEvidence &&\n !semgrep &&\n !guardian &&\n !retained &&\n !native.length\n ) {\n for (const source of sarif) sources.set(source.url, source);\n if (!url && !sarif.length) ordinaryRowNeedsReferences = true;\n if (!url && references.length) {\n for (const source of sarif) {\n const claim = identify(source.url);\n if (\n !references.some((ref) => matchingRemote(claim, identify(ref.url)))\n )\n throw new CodexSecurityError(\n `The reader must supply the projected Semgrep SARIF repository ${JSON.stringify(source.url)} for the configured remote.`,\n );\n }\n }\n }\n const projectedCheckmarx = checkmarx.projections.has(finding);\n if (retained || (projectedCheckmarx && native.length)) {\n const rowSources = retained ? [retained, ...native] : native;\n const claims = [\n ...rowSources.map((ref) => ref.url),\n ...(url ? [url] : []),\n ];\n const rowPlatform = (claim: string) =>\n options.provider !== \"wiz\"\n ? platformFor({ url: claim })\n : native.some((source) => source.platform === \"github\")\n ? \"github\"\n : operatorPlatform({ url: claim });\n if (\n !sameScannerRepositories(\n claims.map(\n (claim) =>\n remoteRepository(\n claim,\n options.provider,\n true,\n rowPlatform(claim),\n ) ?? {\n key: claim,\n },\n ),\n )\n )\n throw new CodexSecurityError(\n \"The retained scanner repository does not match the original provider finding.\",\n );\n for (const source of rowSources) sources.set(source.url, source);\n for (const claim of claims) {\n if (projectedCheckmarx) checkmarxKeys.add(identify(claim).key);\n const platform = rowPlatform(claim);\n if (!strictSources.has(claim) || platform !== \"github\")\n strictSources.set(claim, platform);\n }\n }\n for (const source of native) known.add(source.url);\n }\n // Match references for native Platform rows using their hosted Git identity.\n const hosted = Array.from(hostedSources.values());\n const hostedReferences = new Set(\n references.filter((ref) =>\n hosted.some((source) => semgrepReferenceMatches(source, ref.url)),\n ),\n );\n const sharedReferences = new Set<ExternalSourceRepository>();\n const ordinaryReferences = new Set<ExternalSourceRepository>();\n if (hostedReferences.size) {\n const readerPlatform = localRepositoryPlatform(\n options.provider,\n [...sources.values(), ...references],\n false,\n );\n const ordinaryIdentity = (url: string) =>\n remoteRepository(\n url,\n options.provider,\n false,\n readerPlatform({ url }),\n ) ?? { key: url };\n const aliases = references.map((ref) => ({\n ref,\n fetch: identify(ref.url),\n ordinary: ordinaryIdentity(ref.url).key,\n }));\n const claims = Map.groupBy(\n Array.from(sources.keys(), (url) => ({\n fetch: identify(url),\n ordinary: strictSources.has(url)\n ? undefined\n : ordinaryIdentity(url).key,\n })),\n (claim) => claim.fetch.key,\n );\n for (const [key, refs] of Map.groupBy(\n aliases,\n (alias) => alias.fetch.key,\n )) {\n const hosted = refs.filter(({ ref }) => hostedReferences.has(ref));\n const group = claims.get(key);\n if (!hosted.length || !group) continue;\n const shared = fetchAliasMatcher(group);\n const readers = fetchAliasMatchers(refs, (alias) => alias.ordinary);\n // Keep a sole fetch alias subject to checkout validation. A redundant\n // Platform spelling can be dropped when another reference serves the reader.\n const required = fetchAliasMatchers(group, ({ fetch, ordinary }) =>\n ordinary !== undefined && readers.get(ordinary)?.(fetch)\n ? ordinary\n : undefined,\n );\n for (const alias of hosted) {\n if (!shared(alias.fetch)) continue;\n sharedReferences.add(alias.ref);\n if (\n required.get(undefined)?.(alias.fetch) ||\n required.get(alias.ordinary)?.(alias.fetch)\n )\n ordinaryReferences.add(alias.ref);\n }\n }\n }\n if (mixed) {\n // Other caller references must identify an ordinary row or one of its Git aliases.\n const rows = [...sources.keys(), ...known].map(identify);\n const byKey = Map.groupBy(rows, (remote) => remote.key);\n const represented = new Set(rows.map((remote) => JSON.stringify(remote)));\n const aliases = readerSources\n .filter((ref) => !hostedReferences.has(ref) || sharedReferences.has(ref))\n .map(({ url }) => identify(url))\n .filter((remote) => !represented.has(JSON.stringify(remote)));\n for (const [key, group] of Map.groupBy(aliases, (remote) => remote.key)) {\n const candidates = byKey.get(key);\n if (!candidates || !sameScannerRepositories([...candidates, ...group]))\n throw new CodexSecurityError(\n \"Reader repository does not match a source in the normalized findings.\",\n );\n }\n }\n if (strictSources.size && options.provider !== \"blackduck\") {\n const keys = new Set(\n Array.from(strictSources.keys(), (url) => identify(url).key),\n );\n for (const source of references)\n if (\n !strictSources.has(source.url) &&\n keys.has(identify(source.url).key)\n ) {\n strictSources.set(source.url, platformFor(source));\n if (sharedReferences.has(source)) ordinaryReferences.add(source);\n }\n }\n if (inspector) {\n const platform =\n inspector.platform === \"github\" ? \"github\" : options.provider;\n const native = remoteRepository(\n inspector.url,\n options.provider,\n true,\n platform,\n );\n for (const url of sources.keys()) {\n if (\n !native ||\n remoteRepository(url, options.provider, true, platform)?.key !==\n native.key\n )\n throw new CodexSecurityError(\n `Imported repository ${JSON.stringify(url)} does not match the retained Inspector repository ${JSON.stringify(inspector.url)}.`,\n );\n }\n }\n if (\n readerSources.length &&\n hosted.length &&\n ((!hasOrdinaryRows &&\n !readerSources.every((ref) => hostedReferences.has(ref))) ||\n hosted.some(\n (source) =>\n !readerSources.some((ref) =>\n semgrepReferenceMatches(source, ref.url),\n ),\n ))\n )\n throw new CodexSecurityError(\n \"The reader's source repository does not match the selected Semgrep project.\",\n );\n for (const source of [...(inspector ? [inspector] : []), ...references]) {\n if (\n !ordinaryRowNeedsReferences &&\n hostedReferences.has(source) &&\n !ordinaryReferences.has(source)\n )\n continue;\n // A reader's platform must not loosen an operator-supplied Inspector map.\n if (sources.get(source.url)?.platform !== \"github\")\n sources.set(\n source.url,\n options.inspectorProjectMap ? { url: source.url } : source,\n );\n }\n const reportUrl = checkmarx.reportUrl;\n if (reportUrl) {\n const source = sources.get(reportUrl) ?? { url: reportUrl };\n sources.set(reportUrl, source);\n checkmarxKeys.add(identify(reportUrl).key);\n if (!strictSources.has(reportUrl))\n strictSources.set(reportUrl, platformFor(source));\n }\n if (\n ((options.provider === \"checkmarx\" || reportUrl) &&\n !sameRepositories(sources.keys())) ||\n (reportUrl &&\n hosted.some((source) => !semgrepReferenceMatches(source, reportUrl)))\n )\n throw new Error(\n \"The retained Checkmarx report repository does not match the finding repository.\",\n );\n if (options.provider === \"armorcode\") {\n if (options.sourceRepositoryUrl !== undefined) {\n const url = declaredScannerRepositoryUrl(\n options.sourceRepositoryUrl,\n \"ArmorCode\",\n \"local\",\n );\n sources.set(url, { url });\n }\n if (!sameRepositories(sources.keys()))\n throw new CodexSecurityError(\n \"ArmorCode findings must belong to a single source repository.\",\n );\n }\n const sonarSources = sonarRepositoryUrls(\n options.provider,\n current.findings,\n current.report,\n \"local\",\n );\n const manualSource =\n options.provider === \"sonar\" && options.sourceRepositoryUrl\n ? declaredScannerRepositoryUrl(\n options.sourceRepositoryUrl,\n \"Sonar\",\n \"local\",\n )\n : undefined;\n if (manualSource) sonarSources.add(manualSource);\n for (const url of sonarSources)\n if (!sources.has(url)) sources.set(url, { url });\n if (sonarSources.size && !sameRepositories(sources.keys()))\n throw new CodexSecurityError(\n manualSource\n ? \"The Sonar evidence does not match the declared source repository.\"\n : \"The retained Sonar repository does not match the other source repository claims.\",\n );\n if (\n options.provider === \"blackduck\" &&\n current.findings.length &&\n sources.size > 1 &&\n !sameScannerRepositories(Array.from(sources.keys(), identify))\n )\n throw new CodexSecurityError(\n \"Black Duck occurrences must belong to the same project version and source repository.\",\n );\n if (dependabotSource)\n sources.set(dependabotSource, {\n url: dependabotSource,\n platform: \"github\",\n });\n const snyk = snykRestImportRepository(\n current,\n options.provider,\n [\n ...sources.keys(),\n ...(options.sourceRepositoryUrl === undefined\n ? []\n : [options.sourceRepositoryUrl]),\n ],\n readerSources,\n (finding, source) => {\n finding.evidence.source_data = source;\n },\n );\n if (snyk) {\n // Preserve reader display fields while validating their complete native evidence.\n for (const { evidence } of current.findings)\n validateExternalEvidence(structuredClone(evidence), \"local\");\n } else if (options.provider === \"snyk\" && current.sourceRepositoryUrl) {\n const declared = { url: current.sourceRepositoryUrl };\n const native = current.findings.flatMap((finding) =>\n localFindingRepositories(\"snyk\", finding),\n );\n for (const source of [declared, ...native])\n if (!sources.has(source.url)) sources.set(source.url, source);\n if (!sameRepositories(sources.keys()))\n throw new CodexSecurityError(\n \"The normalized repository does not match the Snyk reader's repository.\",\n );\n }\n if (normalizedSource && !snyk) {\n if (\n !sameRepositories([normalizedSource, ...sources.keys(), ...known]) ||\n hosted.some(\n (source) => !semgrepReferenceMatches(source, normalizedSource),\n )\n )\n throw new CodexSecurityError(\n \"The declared repository does not match the normalized finding source.\",\n );\n if (!hosted.length && !sources.size)\n sources.set(normalizedSource, { url: normalizedSource });\n }\n const ordinarySources = [...sources.values()];\n // A reader can identify the VCS for both a hosted project and an ordinary row.\n const loosePlatformFor = localRepositoryPlatform(\n options.provider,\n [...ordinarySources, ...hostedReferences],\n false,\n );\n const selected = manualSource ? new URL(manualSource) : undefined;\n const matchesRepositoryRemote =\n options.provider === \"trivy\"\n ? await matchTrivyCheckout(\n repository,\n current,\n references,\n workbenchOptions,\n )\n : await requireMatchingRepository(\n repository,\n options.provider,\n ordinarySources,\n strictSources,\n hosted,\n (source, bound) =>\n bound ? platformFor(source) : loosePlatformFor(source),\n snyk,\n workbenchOptions.protectedRoot,\n workbenchOptions.environment,\n dependencies.signal,\n selected?.protocol === \"https:\" ? selected.hostname : undefined,\n fetchRemotes,\n checkmarx.projections.size\n ? (url) => checkmarxKeys.has(identify(url).key)\n : undefined,\n );\n let storedSources = [...references, ...ordinarySources, ...hosted];\n const [project] = hosted;\n if (\n options.provider === \"semgrep\" &&\n !hasOrdinaryRows &&\n !ordinarySources.length &&\n hosted.length === 1 &&\n project &&\n references.every(({ url }) => url === project.url)\n ) {\n // A typed hint and a bare URL can be two witnesses for the same native\n // project. Keep the hint if any stored occurrence needs it to verify its scope.\n storedSources = [project];\n const native = semgrepPlatformRepositoryReference(project.url, []);\n if (native.platform !== project.platform) {\n try {\n if (\n current.findings.every((finding) => {\n const binding = semgrepPlatformFindingBinding(finding, \"semgrep\", [\n native,\n ]);\n return (\n binding?.url === native.url &&\n !binding.migration &&\n isDeepStrictEqual(\n binding.sourceData,\n finding.evidence.source_data,\n )\n );\n })\n )\n storedSources = [native];\n } catch {\n // A private SCM alias or SSH mapping can require the reader's platform.\n }\n }\n }\n if (snyk)\n storedSources.push({\n url: snyk.url,\n platform:\n snyk.platform === \"github\"\n ? \"github\"\n : snyk.gitlab\n ? \"gitlab\"\n : undefined,\n });\n return preparedLocalStorage(\n current,\n options,\n context,\n dependencies,\n matchesRepositoryRemote,\n {\n sourceRepositories: distinctSourceRepositories(storedSources),\n inspectorProjectMap: options.inspectorProjectMap\n ? [...options.inspectorProjectMap]\n : undefined,\n },\n );\n}\n\n/** @internal Prepare the transactional write after validating the report and repository. */\nfunction preparedLocalStorage(\n current: ExternalFindings,\n { provider, sourceKey }: NormalizedLocalImportOptions,\n {\n repository,\n options: workbenchOptions,\n }: Awaited<ReturnType<typeof localContext>>,\n dependencies: LocalExternalImportDependencies,\n matchesRepositoryRemote: boolean,\n provenance: ExternalFindingProvenance,\n): PreparedLocalExternalImport {\n dependencies.signal?.throwIfAborted();\n const preview = {\n ...cloneImportPreview(current),\n repository,\n source: { provider, source_key: sourceKey },\n };\n const payload = JSON.stringify({\n repository,\n provider,\n sourceKey,\n read: current.read,\n excluded: current.excluded,\n report: reportForJson(current.report),\n provenance,\n findings: current.findings.map(({ source_finding_id, evidence }) => ({\n source_finding_id,\n evidence,\n })),\n });\n return {\n matchesRepositoryRemote,\n preview,\n async import() {\n dependencies.signal?.throwIfAborted();\n const disposition = externalImportDisposition(current);\n if (disposition === \"failed\")\n throw new NoPublishableFindingsError(cloneImportPreview(current));\n const summary = {\n repository,\n read: current.read,\n ...(current.report === undefined\n ? {}\n : snapshotNormalizedFindings({ report: current.report })),\n ready: current.findings.length,\n excluded: structuredClone(current.excluded),\n };\n if (disposition !== \"ready\") {\n return {\n ...summary,\n findings: [],\n counts: { created: 0, updated: 0, unchanged: 0 },\n };\n }\n const protectedRoot = [\n ...new Set([\n ...workbenchOptions.protectedRoot,\n ...(await abortable(\n () =>\n localGitProtectionRoots(\n process.cwd(),\n workbenchOptions.environment,\n dependencies.signal,\n ),\n dependencies.signal,\n )),\n ]),\n ];\n requireOutputOutsideRepositories(\n protectedRoot,\n await abortable(\n () =>\n canonicalizeModelSafePath(\n workbenchOptions.environment.CODEX_SECURITY_STATE_DIR,\n ),\n dependencies.signal,\n ),\n \"runtime\",\n );\n const result = await abortable(() => {\n dependencies.signal?.throwIfAborted();\n return (dependencies.runWorkbench ?? runWorkbench)(\n { ...workbenchOptions, protectedRoot },\n [\"store-external-findings\"],\n payload,\n );\n }, dependencies.signal);\n return {\n ...summary,\n importId: result[\"importId\"] as string,\n findings: result[\"findings\"] as unknown as StoredExternalFinding[],\n counts: result[\"counts\"] as LocalExternalImportResult[\"counts\"],\n };\n },\n };\n}\n\n/** Read imported source records, including evidence that has not been assessed by Codex. */\nexport async function listLocalExternalFindings(\n selection: { repository: string; id?: string },\n dependencies: LocalExternalImportDependencies = {},\n): Promise<StoredExternalFinding[]> {\n return (await readLocalExternalFindings(selection, dependencies)).findings;\n}\n\nexport async function readLocalExternalFindings(\n selection: { repository: string; id?: string },\n dependencies: LocalExternalImportDependencies,\n) {\n dependencies.signal?.throwIfAborted();\n if (selection.id !== undefined) requireIdentity(selection.id, \"Finding id\");\n const { selectedPath, result } = await runLocalFindingWorkbench(\n selection.repository,\n \"read-external-findings\",\n { id: selection.id },\n dependencies,\n );\n return {\n repository: selectedPath,\n findings: result[\"findings\"] as unknown as StoredExternalFinding[],\n };\n}\n\n/** Read the precise versions selected by the caller or captured by an earlier import. */\nexport async function selectLocalExternalFindings(\n selection: LocalExternalFindingSelection,\n dependencies: LocalExternalImportDependencies = {},\n): Promise<SelectedLocalExternalFindings> {\n const { repository, importId, findings } = selection;\n if ((importId === undefined) === (findings === undefined))\n throw new CodexSecurityError(\n \"Select one import ID or a list of versioned findings.\",\n );\n const { result } = await runLocalFindingWorkbench(\n repository,\n \"read-external-findings\",\n importId !== undefined\n ? { importId, ifCurrent: selection.ifCurrent }\n : { findings: findings!.map(({ id, version }) => ({ id, version })) },\n dependencies,\n );\n return result as unknown as SelectedLocalExternalFindings;\n}\n\n/** List this checkout's nonempty imports, most recent first. */\nexport async function listLocalExternalImports(\n { repository }: { repository: string },\n dependencies: LocalExternalImportDependencies = {},\n): Promise<StoredExternalImport[]> {\n const { result } = await runLocalFindingWorkbench(\n repository,\n \"list-external-imports\",\n {},\n dependencies,\n );\n return result[\"imports\"] as unknown as StoredExternalImport[];\n}\n\n/** @internal Attach Cloud acknowledgements to the versions that were submitted. */\nexport async function recordExternalFindingPublications(\n input: CloudFindingDestination & {\n repository: string;\n entries: LocalFindingReceipt[];\n },\n dependencies: LocalExternalImportDependencies = {},\n): Promise<void> {\n const { repository, ...receipt } = input;\n await runLocalFindingWorkbench(\n repository,\n \"record-external-finding-publications\",\n receipt,\n dependencies,\n );\n}\n\n/** Read the destination and receipt for each acknowledged finding version. */\nexport async function listLocalFindingPublications(\n { repository, id }: { repository: string; id?: string },\n dependencies: LocalExternalImportDependencies = {},\n): Promise<StoredFindingPublication[]> {\n const { result } = await runLocalFindingWorkbench(\n repository,\n \"list-external-finding-publications\",\n { id },\n dependencies,\n );\n return result[\"publications\"] as unknown as StoredFindingPublication[];\n}\n\n/** @internal Run a command against the workbench for the selected checkout. */\nasync function runLocalFindingWorkbench(\n path: string,\n command: string,\n selection: Record<string, unknown>,\n dependencies: LocalExternalImportDependencies,\n) {\n const { repository, selectedPath, options } = await localContext(\n path,\n dependencies,\n \"read\",\n );\n const result = await abortable(() => {\n dependencies.signal?.throwIfAborted();\n return (dependencies.runWorkbench ?? runWorkbench)(\n options,\n [command],\n JSON.stringify({ repository, ...selection }),\n );\n }, dependencies.signal);\n return { selectedPath, result };\n}\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type PrivateImportFormat, type PrivateImportJob } from "./private-finding-import.js";
|
|
2
|
+
import type { LocalExternalImportOptions } from "./external-findings-import.js";
|
|
2
3
|
import { CodexSecurityError } from "./errors.js";
|
|
3
|
-
import { type
|
|
4
|
-
import { type ExternalFindings } from "./external-findings.js";
|
|
4
|
+
import { type CloudFindingsReader } from "./external-findings-read.js";
|
|
5
|
+
import { type ExternalSourceRepository, type ExternalFindings } from "./external-findings.js";
|
|
5
6
|
import type { FindingImportRequest, FindingImportReceipt, ImportRepository } from "./external-import-models.js";
|
|
6
7
|
/** Source and destination for evidence already normalized to the Cloud contract. */
|
|
7
8
|
export interface NormalizedExternalPublicationOptions {
|
|
@@ -11,13 +12,14 @@ export interface NormalizedExternalPublicationOptions {
|
|
|
11
12
|
/** Full Inspector project ARNs mapped to independently verified repository URLs. */
|
|
12
13
|
inspectorProjectMap?: ReadonlyMap<string, string>;
|
|
13
14
|
}
|
|
14
|
-
/** File readers
|
|
15
|
-
export interface ExternalPublicationOptions extends
|
|
16
|
-
provider:
|
|
17
|
-
sourceRepositoryUrl?: string;
|
|
15
|
+
/** File readers accepted by the Cloud publisher. */
|
|
16
|
+
export interface ExternalPublicationOptions extends LocalExternalImportOptions {
|
|
17
|
+
provider: CloudFindingsReader;
|
|
18
18
|
}
|
|
19
19
|
/** Optional transport, account, cancellation, and progress hooks. */
|
|
20
20
|
export interface ExternalPublicationDependencies {
|
|
21
|
+
/** Independently verified source repositories supplied by the reader. */
|
|
22
|
+
sourceRepositories?: readonly ExternalSourceRepository[];
|
|
21
23
|
environment?: NodeJS.ProcessEnv;
|
|
22
24
|
fetch?: (url: string, options: RequestInit) => Promise<Response>;
|
|
23
25
|
credentials?: () => Promise<{
|
|
@@ -76,6 +78,11 @@ export interface ExternalPublicationPreview extends ExternalFindings {
|
|
|
76
78
|
retryOfJobId?: string;
|
|
77
79
|
};
|
|
78
80
|
}
|
|
81
|
+
/** Bind reviewed evidence to its account, repository, connector and destination version. */
|
|
82
|
+
export declare function cloudReviewDigest(preview: ExternalPublicationPreview, checkout: string, findings?: readonly {
|
|
83
|
+
id: string;
|
|
84
|
+
version: number;
|
|
85
|
+
}[]): string;
|
|
79
86
|
export interface PreparedExternalPublication {
|
|
80
87
|
preview: ExternalPublicationPreview;
|
|
81
88
|
publish(): Promise<ExternalPublicationResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-findings-publish.d.ts","sourceRoot":"","sources":["../src/external-findings-publish.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"external-findings-publish.d.ts","sourceRoot":"","sources":["../src/external-findings-publish.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,mBAAmB,EAKxB,KAAK,gBAAgB,EACtB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAUhF,OAAO,EAAE,kBAAkB,EAAgB,MAAM,aAAa,CAAC;AAO/D,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AAqDrC,OAAO,EAIL,KAAK,wBAAwB,EAI7B,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAYhC,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAGjB,MAAM,6BAA6B,CAAC;AAIrC,oFAAoF;AACpF,MAAM,WAAW,oCAAoC;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,oBAAo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