Files
Michael D'Angeloandmldangelo-oai 140f173349 fix(imports): honor bounded Retry-After on hosted scanner reads (#2086)
* feat(imports): collect hosted Snyk and Semgrep findings

* fix(imports): honor bounded Retry-After on hosted scanner reads

* fix(imports): align Snyk Issues API version

* refactor(imports): simplify hosted scanner retries

* fix(imports): measure HTTP-date retries against server time

* refactor(imports): simplify hosted scanner collection and verify repository scope

* fix(imports): preserve verified GitHub SSH aliases in mixed findings

* fix(imports): parse SSH authority without backtracking

* refactor(imports): reuse the verified Snyk report repository

* fix(imports): keep verified enterprise GitHub identity during local import

* fix(imports): preserve hosted source scope across collection and replay

* fix: bind hosted credentials and replay to the selected source

* fix: preserve provider provenance across hosted imports

* fix: preserve scanner evidence and verified repository aliases

* fix: retain source constraints when projecting scanner findings

* fix(imports): enforce scanner region and repository bindings

* fix(imports): check all repository claims in hosted reports

* fix(imports): preserve hosted finding evidence and project scope

* fix(imports): compare hosted repository identities consistently

* fix(imports): preserve repository bindings across SDK representations

* fix(imports): verify declared repositories against retained evidence

* fix(imports): scope hosted provenance and migrate published checkpoints

* fix(imports): verify legacy scope before resuming hosted uploads

* fix(imports): distinguish Git helper remotes from local paths

* fix(imports): compare effective Git remotes without losing URL bytes

* fix(imports): verify repository paths using their Git transport semantics

* fix(imports): preserve saved scanner identifiers and streamline large collections

* fix(imports): keep native scanner reports on the plain JSON parser

* fix(imports): retain publishable Semgrep messages and verified Git remotes

* fix(imports): preserve repository scope across scanner and Git URL forms

* fix(imports): require unambiguous scanner source and request identities

* fix(imports): retain verified repository mappings through replay

* fix(imports): validate retained scanner scope consistently

* fix(imports): enforce scanner bindings across destinations and retries

* fix(imports): preserve exact finding and repository identities

* fix(imports): preserve scanner field types and simplify approved scopes

* fix(imports): keep exact scanner decimal values through replay

* fix(imports): preserve verified repository identity across projections

* fix(imports): keep repository comparisons consistent during reads

* fix(imports): align public host matching and isolate Git fixtures

* fix(imports): preserve numeric evidence and verify Git remote identity

* test(imports): share the Semgrep checkout fixture

* fix(imports): verify Git helper resolution when a transport alias is configured

* test(imports): keep the transport alias in the fixture repository

* fix(imports): verify checkout-independent transports and preserve Snyk platform hints

* fix(imports): match configured remotes offline and require zoned Snyk timestamps

* fix(imports): preserve prepared runners and scanner input contracts

* fix(imports): retain inherited workbench dependencies during preparation

* fix(packaging): pass validated tar members through a file

* fix(imports): bound endpoint interpolation and refresh the Action bundle

* fix(imports): recheck the selected workbench opt-in after reading

* fix(imports): preserve replay and repository identity checks

* fix(imports): retain compatible scanner provenance

* feat(imports): normalize selected Semgrep Code findings for local import

* feat(imports): import saved Semgrep Platform selections from the CLI

* fix(imports): preserve selected Semgrep occurrences across native representations

* feat(imports): collect Semgrep Platform findings by project and ref

* feat(imports): collect and import Snyk project issues locally

* fix(imports): check hosted Semgrep Git remotes once

* feat(imports): publish hosted Semgrep and Snyk findings to Cloud

* fix(imports): verify Snyk project scope and pagination on replay

* fix(imports): preserve Semgrep scope and evidence on replay

* test(imports): isolate fixture Git config with a portable file

* fix(imports): match Semgrep project labels to the verified repository

* fix(imports): require original repository names for URL-less Semgrep rows

* fix: preserve hosted source bindings across Cloud retries

* fix(imports): validate projected Snyk issues and regional requests

* fix(imports): bind selected Semgrep rows to the project URL path

* fix(imports): converge historical and current Semgrep evidence

* docs(imports): clarify Semgrep selection IDs and repository names

* test(imports): exercise adjacent signed int64 Semgrep findings

* fix(imports): bind Snyk selections to verified native issues

* fix(imports): preserve selected findings when native SAST evidence is incomplete

* fix(imports): preserve native Semgrep project IDs and file evidence

* fix(imports): validate Semgrep report bindings and replay equivalent evidence

* fix(imports): retain verifiable Snyk evidence across replay

* perf(imports): check scanner paths without rescanning repeated separators

* fix(imports): retain Semgrep locations for colons inside a relative path

* fix(imports): preserve validated Semgrep repository and occurrence evidence on replay

* test(imports): reuse normalized Snyk fixture setup

* fix(imports): verify Snyk asset scope across selected findings

* fix(imports): resolve configured Git sources and skip ordinary reference scans

* fix(imports): preserve Snyk selection scope and archived evidence

* fix(imports): validate each scanner's retained repository claims

* fix(imports): retain Snyk target proof and stable replay

* fix(semgrep): require named remotes for legacy Git metadata

* fix(imports): validate native Semgrep evidence before choosing its projection

* fix(imports): respect Snyk project origin when selecting evidence

* fix(semgrep): verify reset remotes and active branch defaults

* fix(cli): preserve original Snyk diagnostics in structured output

* fix(imports): match shared Semgrep SSH aliases with each reader

* fix(semgrep): require scope for retained v1 findings in marked reports

* style(docs): remove extra blank line in Semgrep guide

* refactor(imports): share Git transport byte conversion

* fix(imports): check HTTP Git credentials in linear time

* fix(imports): preserve Semgrep product and source path on replay

* Preserve Sonar skill notices for structured import output

* fix(imports): check scanner data without reading unused finding IDs

* fix(imports): inspect scanner evidence in approved retry requests

* feat(imports): import selected findings through Semgrep Guardian

* test(imports): verify Guardian and numeric Web API IDs on replay

* docs(imports): format the scanner identity table

* test: prepend exact JSON members to Snyk response fixtures

* fix(imports): keep Guardian evidence local across Cloud publication retries

---------

Co-authored-by: mldangelo-oai <269034524+mldangelo-oai@users.noreply.github.com>
2026-11-03 23:49:45 +00:00
..

Import external scanner findings

Choose the guide for your report. Each guide shows how to preview the findings in a local checkout and which source key to reuse on later imports.

Use a supported report or retrieve the full records for the requested repository and ref with a connected tool or signed-in CLI. Fetch selected IDs directly when the provider supports it. If a saved report or collector covers more findings, use the provider's selection controls or retain only the selected native records where the report format permits. Check the accepted findings and their evidence in the JSON preview against the requested selection before saving or publishing. Use an API response only for an input and destination supported by the provider guide. Otherwise, ask for a supported report. A fresh scan produces new results.

Guide Supported input
Amazon Inspector Inspector2 ListFindings JSON for one Code Security repository
AWS Continuum Code finding summaries or a detailed finding verified for one repository
Black Duck SCA BOM component vulnerabilities for one project version
Endor Labs Finding JSON from endorctl, or SARIF with finding UUIDs
GitHub code scanning Alerts selected for one repository and Git ref
GitHub Dependabot Dependency alerts exported from one repository
GitHub Security Advisories Selected repository or global advisories
OpenGrep Native scan JSON, optionally gzip-compressed
Semgrep CLI/CI JSON, SARIF, selected Guardian findings, or Platform Web API reports
Snyk Open Source CLI JSON, a Codex plugin export, or SARIF
SonarQube Cloud Issues selected with the signed-in Sonar CLI, or saved issue-search pages
Veracode Static Analysis Findings API pages for one application's policy flaws
Wiz Native JSON, normalized JSONL, or detailed repository package vulnerability CSV

Preview a report

Enable external imports in the shell where you run the CLI.

export CODEX_SECURITY_ENABLE_EXTERNAL_IMPORTS=1

In PowerShell, use $env:CODEX_SECURITY_ENABLE_EXTERNAL_IMPORTS = '1'. Follow your guide's quick start to collect or select the report. Run examples that use --repository . from the checkout root, or pass the same checkout path you used previously. Use --dry-run to review the repository, source key, findings, and exclusions. Keep the export private. In automation, direct stdout and stderr for collection, preview, confirmation, and readback to private files outside the checkout. For examples that use mktemp -d without a path, set TMPDIR to a private directory outside the checkout if temporary files would otherwise land inside it.

Save or publish and verify

The steps below apply to publish findings FILE. For import sonar, confirm the capture returned by the Sonar preview.

Local workbench. Run the same command with the same file, checkout, and source key. Remove --dry-run and confirm the prompt. For noninteractive use, add --yes after reviewing that preview. Read back the stored evidence using the checkout path from the preview:

codex-security findings imported /path/to/project --format json

Codex Security Cloud. Use a file-backed ChatGPT login for a deployment that accepts the provider and a repository environment you can publish to. See Cloud setup. Keep the file, provider, source key, and scanner-specific options. Set --to cloud and replace the local checkout in --repository with the connected repository URL or Cloud repository ID. Use the ID if several connectors share the URL. Run with --dry-run first. Check that cloudApiUrl is the intended API endpoint, then review the account, repository, environments, and exclusions. Remove --dry-run and confirm, or use --yes after that review. Check status, the verified and unacknowledged counts, and the failures and excluded lists. For a partial result, correct exclusions or resolve version conflicts before starting a new submission. If an interrupted result includes savedSubmission, resume from that checkpoint.

Work with imported findings

Imported records start with assessment state not_assessed. Use the source evidence to check whether a finding affects your repository. For the identity of a record, the fields each reader retains, and how repeat imports update evidence, see Imported finding identity and evidence.

For findings from a completed Codex scan, see Track findings in Linear, Jira, or GitHub or Export findings for ServiceNow.