ci(binskim): clean go/dotnet/rust configurations end-to-end#176
Merged
Conversation
The BinSkim go configuration on main was showing the warning 'unsuccessful tool execution, exit code 0' because BinSkim sets invocations[0].executionSuccessful=false when it can't load a PDB for the Go binary (ERR997.ExceptionLoadingPdb). Go's toolchain does not emit MSVC PDBs — this is the documented limitation, not a tool failure or a security finding. Changes: - scripts/security/filter_binskim_sarif.py: new _normalize_invocations step. Walks toolConfigurationNotifications, demotes ones matching binskim_suppressions.json[invocation_notifications] from error to note (with audit-trail suppression entry), and flips executionSuccessful back to True when no error-level notifications remain. - scripts/security/binskim_suppressions.json: add documented invocation_notifications entry for ERR997.ExceptionLoadingPdb on omnivec.exe with a security justification (Go security posture is enforced by Go toolchain + runtime, not by MSVC linker switches). - .github/workflows/binskim.yml: wire binskim-dotnet and binskim-go jobs through filter_binskim_sarif.py before SARIF upload. Rust was already wired (PR #175). After this PR all three configurations (binskim-dotnet, binskim-go, binskim-rust) should show clean on the BinSkim configuration page with no errors and no warnings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Cleans the BinSkim
binskim-goconfiguration on the code-scanning page, which currently shows the warning "unsuccessful tool execution, exit code 0".Root cause
BinSkim sets
invocations[0].executionSuccessful = falsewhen it can't load a PDB for the Go binary (ERR997.ExceptionLoadingPdb). Go's toolchain does not emit MSVC PDB files — this is the documented limitation, not a tool failure or a security finding. The Go security posture is enforced by the Go toolchain (govulncheck, runtime bounds-checking, W^X-by-default) rather than the MSVC linker switches BinSkim inspects.Fix
scripts/security/filter_binskim_sarif.py— new_normalize_invocationsstep. WalkstoolConfigurationNotifications, demotes notifications matchingbinskim_suppressions.json[invocation_notifications]fromerrortonote(with an audit-trailsuppressionsentry), and flipsexecutionSuccessfulback totruewhen no error-level notifications remain.scripts/security/binskim_suppressions.json— newinvocation_notificationsentry forERR997.ExceptionLoadingPdbonomnivec.exewith a documented security justification..github/workflows/binskim.yml— wires thebinskim-dotnetandbinskim-gojobs throughfilter_binskim_sarif.pybefore SARIF upload (binskim-rust was already wired by ci(binskim): fix 'expected a result message' SARIF upload errors #175).Verification
Tested locally against the actual SARIF artifact from the most recent failed run on
main:Rust SARIF re-tested for regression — still clean.
After this PR all three BinSkim configurations (dotnet / go / rust) should show clean with no errors and no warnings.