Skip to content

upload-copy: leave source-suppressed results out of code-scanning uploads - #29

Merged
markope merged 1 commit into
mainfrom
fix/upload-copy-source-suppressions
Nov 4, 2026
Merged

markope merged 1 commit into
mainfrom
fix/upload-copy-source-suppressions

Conversation

@markope

@markope markope commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

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 reviewed nosemgrep comment therefore opened a code-scanning alert on every pull request of a caller, although sarif-summary.py report counted zero findings. First seen on IronFlock/ironflockos#104 for the secrets: inherit line every release.yml carries.

  • upload-copy now drops results suppressed in the source, as collect already does for the report; the predicate is one shared function, suppressed_in_source.
  • A rejected suppression (status: rejected) keeps the result, as before.
  • A run whose results are all suppressed is still written empty, so the upload closes the alerts earlier uploads opened.
  • Docstring and the upload log line updated.

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-patch on main publishes the next v1.x.y and moves v1, which is when callers stop seeing the alert.

…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.
@markope
markope merged commit bee28a9 into main Nov 4, 2026
81 checks passed
@markope
markope deleted the fix/upload-copy-source-suppressions branch November 4, 2026 14:59
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