Skip to content

msvc analysis: suppress C26819/C28251 advisories, bump EOL actions#3117

Merged
borisbat merged 1 commit into
masterfrom
bbatkin/msvc-analysis-ruleset
Jun 12, 2026
Merged

msvc analysis: suppress C26819/C28251 advisories, bump EOL actions#3117
borisbat merged 1 commit into
masterfrom
bbatkin/msvc-analysis-ruleset

Conversation

@borisbat

Copy link
Copy Markdown
Collaborator

Follow-up to the CodeQL cleanup (#3112). The PREfast / MSVC /analyze workflow had left 16 alerts in the Security tab — all pure style/advisory, none memory-safety:

  • 14× C26819 (es.78, unannotated switch fallthrough) — ours are intentional and we don't annotate with [[fallthrough]]; several are last-label-before-brace misfires (e.g. default: DAS_ASSERT(0); break;, which isn't even a fallthrough). 5 of these are in vendored stb single-file headers.
  • 2× C28251 (inconsistent SAL annotation on free_list's global operator new / new[]) — our allocators intentionally carry no SAL annotations; nothing relies on the contract.

All 16 were dismissed (won't-fix) in the Security tab. This suppresses both rules at the ruleset source (CustomRules.ruleset, alongside the existing C26451/C26495/C26439/C26813/C6255 exclusions) so a future manual run stays clean rather than re-raising them as new alerts (the workflow is workflow_dispatch-only, so this only fires on a manual trigger anyway).

Also bumps the two EOL actions in this workflow to the repo standard used by the other workflows: codeql-action/upload-sarif v2→v3, actions/upload-artifact v3→v4. microsoft/msvc-code-analysis-action stays at v0.1.1 — no newer release exists.

Can't be CI-validated pre-merge (the workflow is manual-dispatch and Windows-only), but the changes are a ruleset rule-list addition + two action version pins.

🤖 Generated with Claude Code

The PREfast (MSVC /analyze) workflow surfaced 16 alerts that are pure
style/advisory, not memory-safety: 14x C26819 (es.78 unannotated switch
fallthrough — ours are intentional, we don't annotate [[fallthrough]];
several are last-label-before-brace misfires like default: assert+break)
and 2x C28251 (inconsistent SAL annotation on free_list's global
operator new/new[], which intentionally carry no SAL). All 16 were
dismissed in the Security tab; suppress both rules at the ruleset source
so a future manual run stays clean instead of re-raising them.

Also bump the two EOL actions in this workflow to the repo standard:
upload-sarif v2 -> v3, upload-artifact v3 -> v4. (msvc-code-analysis-action
stays v0.1.1 — no newer release exists.)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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.

Pull request overview

This PR keeps the MSVC /analyze (PREfast) manual workflow clean by suppressing two advisory-style diagnostics in the shared ruleset, and aligns the workflow’s action versions with the repository’s current standards.

Changes:

  • Suppress PREfast advisories C26819 (unannotated switch fallthrough) and C28251 (SAL annotation inconsistency) in CustomRules.ruleset.
  • Bump github/codeql-action/upload-sarif from v2 to v3 in the MSVC analysis workflow.
  • Bump actions/upload-artifact from v3 to v4 in the MSVC analysis workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
CustomRules.ruleset Adds suppressions for C26819 and C28251 to prevent re-raising dismissed advisories on manual /analyze runs.
.github/workflows/msvc.yml Updates SARIF upload and artifact upload actions to the repo-standard major versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@borisbat borisbat merged commit 23fb925 into master Jun 12, 2026
31 checks passed
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.

2 participants