Skip to content

[no-ci] CI: verify the Authenticode signature of vc_redist.x64.exe (13.4.x backport) - #3444

Merged
juenglin merged 2 commits into
NVIDIA:13.4.xfrom
juenglin:emudhra-vc-redist-authenticode-13.4.x
Nov 12, 2026
Merged

juenglin merged 2 commits into
NVIDIA:13.4.xfrom
juenglin:emudhra-vc-redist-authenticode-13.4.x

Conversation

@juenglin

Copy link
Copy Markdown
Contributor

Description

Backport of #3443 to 13.4.x. Refs #3195.

The nightly PyTorch rows in test-wheel-windows.yml download vc_redist.x64.exe from aka.ms and run it silently with admin rights, without checking its signature. Start-Process -Wait without -PassThru also ignored the installer's exit code, so a failed install went unnoticed until PyTorch failed to import.

This PR:

  • Requires a Valid Authenticode signature from O=Microsoft Corporation before running the installer. Get-AuthenticodeSignature only reports Valid after Windows builds the chain to a trusted root, so a tampered or redirected download fails the step.
  • Fails the step on installer errors. Exit codes 1638 (a newer version is already installed) and 3010 (success, reboot required) are accepted.
  • Downloads into RUNNER_TEMP instead of the workspace.

Validation

pre-commit (including actionlint) passes. This step only runs in ci-nightly.yml (test-mode: nightly-pytorch), so PR CI does not exercise it; the next nightly run will.

Checklist

  • I have read the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

The nightly PyTorch rows in test-wheel-windows.yml downloaded and silently
ran vc_redist.x64.exe without checking its signature or the installer's exit
code. Require a valid Microsoft Authenticode signature before running it,
fail on installer errors (allowing 1638 and 3010), and download into
RUNNER_TEMP. This matches the existing vc_redist.arm64.exe check.

Refs NVIDIA#3195
@juenglin juenglin added the CI/CD CI/CD infrastructure label Nov 10, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@juenglin juenglin self-assigned this Nov 10, 2026
@juenglin juenglin changed the title CI: verify the Authenticode signature of vc_redist.x64.exe (13.4.x backport) [no-ci] CI: verify the Authenticode signature of vc_redist.x64.exe (13.4.x backport) Nov 10, 2026
@juenglin

Copy link
Copy Markdown
Contributor Author

/ok to test 6701c82

@juenglin juenglin added the bug Something isn't working label Nov 10, 2026
The substring check on SignerCertificate.Subject also accepted an
organization such as "Microsoft Corporation Services Ltd" or a CN that
embeds "O=Microsoft Corporation". Compare the parsed organization
attribute (OID 2.5.4.10) instead, and check the signature status first so
an unsigned file gets a clear error.

Refs NVIDIA#3195
@juenglin

Copy link
Copy Markdown
Contributor Author

/ok to test 4082211

@juenglin
juenglin merged commit 4d3cd46 into NVIDIA:13.4.x Nov 12, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD CI/CD infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants