Repository navigation
Suppress CodeQL SM02227 false positive on BinaryLogEventFilterException - #15592
Conversation
Co-authored-by: Copilot App <[email protected]> Copilot-Session: f8d5e6ae-c629-4d2a-9868-e6af55a54067
There was a problem hiding this comment.
🔵 Needs a closer look
The CodeQL alert trace and suppression results are unavailable, so a human must verify the false-positive assessment and confirm the SDL scan recognizes the suppression.
No open issues 🎉
What changed in this PR
Extends the existing CodeQL false-positive suppression approach to BinaryLogEventFilterException in MSBuild’s binary logging code.
Changes:
- Adds an inline SM02227 suppression explaining the VMR call-graph false positive.
- Changes comments only; runtime behavior and serialization remain unchanged.
| File | Description |
|---|---|
src/Build/Logging/BinaryLogger/BinaryLogEventFilter.cs |
Adds the suppression comment above BinaryLogEventFilterException, matching the previously suppressed types. |
Review effort: Balanced
There was a problem hiding this comment.
✅ 24/24 dimensions clean — no findings.
Reviewed the complete one-line diff adding the CodeQL SM02227 false-positive suppression comment. The change is documentation-only, matches the stated VMR call-graph over-approximation context, and introduces no runtime, API, compatibility, logging, security, or test-impact concerns.
Generated by Expert Code Review (on open) for #15592 · copilot · gpt56 · 203.2 AIC · ⌖ 0.526 AIC · ⊞ 20.9K
Related issue(s): Follow-up to #15347 and #15465 (S360 CodeQL SDL-required items).
Context
#14693 added
BinaryLogEventFilterException, a[Serializable](.NET Framework only) exception. The VMR Windows CodeQL scan (vmr_vertical_build_windows_pgo_arm64) flagged it as SM02227 ("Deserialization of this type may call System.IO.File.Delete"). This is the same false positive as the 25[Serializable]types suppressed in #15465: the reported path goes fromSerializationInfo.GetString/GetValuethrough virtualToString/Flushdispatch across other VMR repos (runtime, winforms, nuget-client, sdk) and ends ineng/tools/BinaryToolKitFile.Delete. The deserialization constructor only readsSerializationInfovalues.Changes Made
Added the inline
// CodeQL [SM02227] ...suppression above the class, using the same wording as the other suppressed types.Testing
Comment-only change; no build or test needed.