Skip to content

ci(smoke): fail soft when the Windows Defender scan engine can't run#959

Open
DeusData wants to merge 1 commit into
mainfrom
fix/smoke-defender-engine-error
Open

ci(smoke): fail soft when the Windows Defender scan engine can't run#959
DeusData wants to merge 1 commit into
mainfrom
fix/smoke-defender-engine-error

Conversation

@DeusData

@DeusData DeusData commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Problem

The Windows Defender scan step in _smoke.yml treated any non-zero MpCmdRun exit as a malware detection ("BLOCKED: flagged binary!"; exit 1). But MpCmdRun -Scan returns 2 for a real detection and 0 for clean; any other non-zero means the scan engine could not run at all — e.g. hr=0x800106ba, the Defender antimalware service being unavailable on the runner, a chronic transient flake on GitHub's windows-arm64 runners.

This false-failed the v0.9.0 release on its first attempt (a re-run on a fresh runner passed). Worse, the "flagged binary!" wording mislabels a runner outage as malware.

Change

Distinguish the two: only exit 2 (an actual detection) hard-blocks; an engine failure emits ::warning:: and continues.

CI-change scope (per repo policy)

  • Gating: reduces false-fails from a runner-side AV outage; a real detection (exit 2) still hard-blocks. Net: fewer flake-driven release failures, same real protection.
  • Cost / trigger scope / matrix: unchanged — same scan runs on the same jobs.
  • Flake surface: strictly reduced (this is the fix for that flake).

The Defender step treated any non-zero MpCmdRun exit as 'flagged binary!'
and failed the job. But MpCmdRun -Scan returns 2 for a real detection and
0 for clean; any other non-zero means the scan engine itself could not run
(e.g. hr=0x800106ba: the Defender antimalware service is unavailable on the
runner), which is a transient runner-side flake, not a detection. This
false-failed the v0.9.0 release on its first attempt. Only exit 2 now hard-
blocks; an engine failure emits a warning and continues.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@DeusData DeusData added bug Something isn't working stability/performance Server crashes, OOM, hangs, high CPU/memory labels Jul 8, 2026
@DeusData DeusData added this to the 0.9.1-rc milestone Jul 8, 2026
@DeusData DeusData added github_actions Pull requests that update GitHub Actions code priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working github_actions Pull requests that update GitHub Actions code priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. stability/performance Server crashes, OOM, hangs, high CPU/memory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant