Skip to content

feat: import Semgrep SAST findings to Cloud - #1690

Draft
mldangelo-oai wants to merge 13 commits into
mdangelo/codex/endor-findings-adapterfrom
mdangelo/codex/semgrep-findings-adapter
Draft

mldangelo-oai wants to merge 13 commits into
mdangelo/codex/endor-findings-adapterfrom
mdangelo/codex/semgrep-findings-adapter

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds --provider semgrep for Semgrep Code JSON and SARIF, including native Semgrep PRO output. Users can preview selected SAST findings, confirm publication, and repeat imports through the existing publisher. Stacked on #1689.

Behavior

Uses native fingerprints when available and a deterministic rule/path/range identity for Community Edition findings. Native SARIF %SRCROOT% paths preserve literal percent characters; direct URI paths are decoded once. Equivalent JSON and SARIF locations share their fallback identity. Moving a Community Edition finding changes that identity. Unresolved artifact indexes and custom bases remain unmapped; fingerprinted findings retain their evidence, while CE findings without a usable identity are excluded.

Requires --source-repository-url to identify the source and match the selected Cloud repository. GitHub and Enterprise matching preserves scheme and explicit-port distinctions. Saved requests continue to use the immutable repository identity during retries.

Retains selected original evidence, locations, snippets, ignored state, and source severity. Rejects incomplete scans, ambiguous duplicate identities, and unsupported products. Imported claims remain unassessed. Scan-wide path inventories and timing data are excluded from individual evidence.

Validation

  • 411 focused tests across seven adapter/publication suites passed, including native percent paths, JSON/SARIF identity parity, repository matching, retries, and readback.
  • Fifteen pinned public reports yielded 18 accepted findings, one expected incomplete-report rejection, and two expected duplicate-identity rejections from upstream-masked fingerprints.
  • Types, generated contracts, formatting, build, Python checks, and nine portable checks passed.
  • The 650-entry package passed installed SDK, CLI, types, plugin lifecycle, and nested-worker smoke checks.
  • Both full SDK runs (seeds 12345 and 1347274054) had 5,305 passes, 75 skips, and one installed-hook test failure also reproduced on unchanged main. There were no other failures; these local runs are not reported as fully green.
  • Three fresh native reviews and an independent verifier found no actionable introduced issues in this exact diff.

Hosted CI must qualify this updated head. Live Semgrep tenant testing remains pending; this qualification uses public fixtures. Semgrep JSON/SARIF documentation.

Compatibility

Cloud must support the semgrep provider before publication is available. This change does not enable rollout gates, start scans, or fetch report URLs.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant