Skip to content

Suppress CodeQL SM02227 false positive on BinaryLogEventFilterException - #15592

Merged
ViktorHofer merged 1 commit into
mainfrom
janprovaznik-codeql-triage-resolution
Nov 18, 2026
Merged

ViktorHofer merged 1 commit into
mainfrom
janprovaznik-codeql-triage-resolution

Conversation

@JanProvaznik

Copy link
Copy Markdown
Member

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 from SerializationInfo.GetString/GetValue through virtual ToString/Flush dispatch across other VMR repos (runtime, winforms, nuget-client, sdk) and ends in eng/tools/BinaryToolKit File.Delete. The deserialization constructor only reads SerializationInfo values.

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.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: f8d5e6ae-c629-4d2a-9868-e6af55a54067
Copilot AI balanced review requested due to automatic review settings November 18, 2026 12:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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

@JanProvaznik
JanProvaznik enabled auto-merge (squash) November 18, 2026 13:12
@ViktorHofer
ViktorHofer disabled auto-merge November 18, 2026 13:34
@ViktorHofer
ViktorHofer enabled auto-merge (squash) November 18, 2026 13:34
@ViktorHofer
ViktorHofer merged commit c369aa0 into main Nov 18, 2026
21 checks passed
@ViktorHofer
ViktorHofer deleted the janprovaznik-codeql-triage-resolution branch November 18, 2026 13:48

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — a925743a Deployed Nov 18, 2026 by JanProvaznik via conclusion #1175
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.

4 participants