Repository navigation
upload-copy: leave source-suppressed results out of code-scanning uploads - #29
Merged
Merged
Conversation
…oads GitHub code scanning does not read SARIF `suppressions` (its SARIF support lists no such property), so a result Semgrep marked suppressed by a reviewed `nosemgrep` comment opened an alert on every pull request although the report counted zero findings. The upload copy now drops such results, as `collect` already does for the report; the predicate is shared. A run whose results are all suppressed is still written empty, so the upload closes the alerts earlier uploads opened.
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.
What and why
GitHub code scanning does not read SARIF
suppressions(its SARIF support lists no such property). A result Semgrep marked suppressed by a reviewednosemgrepcomment therefore opened a code-scanning alert on every pull request of a caller, althoughsarif-summary.py reportcounted zero findings. First seen on IronFlock/ironflockos#104 for thesecrets: inheritline everyrelease.ymlcarries.upload-copynow drops results suppressed in the source, ascollectalready does for the report; the predicate is one shared function,suppressed_in_source.status: rejected) keeps the result, as before.How it was tested
python3 -I scripts/test_sarif_summary.py: the upload-copy test now expects the suppressed result left out and the rejected one kept; a new test covers the all-suppressed run uploaded empty. 17 tests pass.After the merge:
just release-patchonmainpublishes the next v1.x.y and movesv1, which is when callers stop seeing the alert.