Add --base-scan-id / --base-commit-sha flags for diffing against a chosen baseline#261
Open
lelia wants to merge 3 commits into
Open
Add --base-scan-id / --base-commit-sha flags for diffing against a chosen baseline#261lelia wants to merge 3 commits into
--base-scan-id / --base-commit-sha flags for diffing against a chosen baseline#261lelia wants to merge 3 commits into
Conversation
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
… guidance Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
|
🚀 Preview package published! Install with: pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketsecurity==2.5.0.dev1Docker image: |
Eric Hibbs (flowstate)
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR scans always diff against the repository's latest head scan, which on very active repositories can include default-branch changes the PR never branched from, thereby misattributing or masking alerts.
This adds two (mutually exclusive) flags that let CI pin the diff baseline to a specific scan or commit, most usefully the PR's merge base (
git merge-base origin/main HEAD). Intended for teams whose default branch moves faster than their PRs and who scan every commit landing on it.Adds
--base-scan-id <id>to diff against a specific full scan ID--base-commit-sha <sha>to diff against the newest full scan for that commit3/--exit-code-on-api-error, or0with--disable-blocking) when no scan exists rather than silently falling back to the head scan.--configfile scenarios) and all baseline-resolution pathsChanges
create_new_diffnow flows through a singleresolve_base_full_scan_id()seam--base-scan-id/--base-commit-sha) is setFixes CE-304