Skip to content

CI: accept a missing trust anchor in the Windows runner trust probe - #3389

Merged
juenglin merged 4 commits into
NVIDIA:mainfrom
juenglin:windows-trust-probe-no-trust-anchor
Nov 5, 2026
Merged

juenglin merged 4 commits into
NVIDIA:mainfrom
juenglin:windows-trust-probe-no-trust-anchor

Conversation

@juenglin

@juenglin juenglin commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR refines a PASS/FAIL criterion for a trust store probe: the Windows "Compromised intermediates distrusted" check in the runner trust probe.

The check currently requires chain building to report ExplicitDistrust for all 16 compromised eMudhra intermediates, so it still fails on windows-2022, windows-latest and windows-11-arm after #3270 (run). Those images are already protected, because emSign ECC Root CA - G3 is gone from LocalMachine\Root and both test hosts are rejected. Microsoft's disallowed CTL is on the images but not enforced (DisableRootAutoUpdate=1), so chains end in UntrustedRoot or PartialChain instead.

The check now passes when each intermediate is explicitly distrusted or its chain no longer reaches a trusted root, and fails if the chain builds cleanly or the build fails for another reason. The classification is a new Get-ChainTrustState helper. It accepts UntrustedRoot or PartialChain only when no other chain status is reported, and the probe passes the vendored non-root issuers (emSign Root TLS CA - G3 from the host chains and the cross-signed emSign Root CS CA - G3 in ci/tools/runner_trust_probe_issuers/) to the chain build so a missing parent is not mistaken for a missing trust anchor. Test-ExplicitlyDistrusted, used by the stopgap action, is unchanged.

The endpoint check also changes: a non-certificate or network error (for example a timeout of dv-g3b-emudhra.we-have-a-problem.com) is retried once and then fails the probe, because the probe did not see the certificate rejected.

The first version of the criterion passed on all three Windows images (run). The tightened classification and issuer handling are verified locally with PowerShell 7 on Linux and still need a dispatched run on the Windows images.

Checklist

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

The hosted Windows images removed the emSign roots instead of enabling Microsoft's disallowed CTL, so chain building reports UntrustedRoot or PartialChain rather than ExplicitDistrust for the compromised intermediates. Pass the check when each intermediate is explicitly distrusted or its chain no longer reaches a trusted root.
@juenglin juenglin added this to the cuda.bindings next milestone Nov 5, 2026
@juenglin juenglin added the CI/CD CI/CD infrastructure label Nov 5, 2026
@juenglin juenglin self-assigned this Nov 5, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 5, 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 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test cc2dc81

@juenglin juenglin added the github_actions Pull requests that update GitHub Actions code label Nov 5, 2026
… errors

A timeout means the probe did not see the certificate rejected, so it cannot claim the runner is safe. Retry once, then fail instead of reporting INCONCLUSIVE.
@juenglin

juenglin commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c0d94c0

@juenglin
juenglin requested a review from jpascucci-nv November 5, 2026 17:36
@juenglin
juenglin marked this pull request as ready for review November 5, 2026 17:36
@juenglin
juenglin enabled auto-merge (squash) November 5, 2026 17:39
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Certificate checks now distinguish trusted, explicitly distrusted, no-trust-anchor, and indeterminate results, including relevant status details. The check fails if a chain is trusted or its status is indeterminate; explicitly distrusted chains and chains without a trusted anchor pass.
    • Endpoint probes retry network and other non-certificate errors once after five seconds. Successful responses, HTTP errors, hostname-mismatch-only errors, and errors still unresolved after the retry fail the check. Certificate-validation errors pass.

The change adds certificate chain state classification and updates the Windows runner trust probe. The probe accepts explicitly distrusted chains or chains with no trusted anchor, reports state counts, and retries unresolved endpoint errors once before failing.

Changes: Runner trust probe

Layer / File(s) Summary
Certificate chain state classification
.github/actions/upgrade-ca-certificates/emudhra_intermediates.ps1
Adds Get-ChainTrustState, which classifies chains as ExplicitDistrust, Trusted, NoTrustAnchor, or Indeterminate and returns the non-NoError status names.
Trust and endpoint probe outcomes
ci/tools/runner_trust_probe.ps1, ci/tools/runner_trust_probe_issuers/README.txt, .spdx-ignore
The intermediate check accepts ExplicitDistrust and NoTrustAnchor states and reports state counts. The probe loads issuer certificates and retries unresolved endpoint errors once. Unresolved errors, successful connections, HTTP responses, and hostname-only mismatches fail; certificate-validation errors pass.

Possibly related issues

  • NVIDIA/cuda-python#3257: The issue tracks the temporary runner trust probe; this change updates that probe’s chain classification and acceptance criteria.

Possibly related PRs

  • NVIDIA/cuda-python#3270: Introduced the eMudhra certificate data and Windows runner probe that this change extends.
  • NVIDIA/cuda-python#3340: Updated the shared certificate helper and runner probe for PowerShell 5.1, which this change continues to modify.
  • NVIDIA/cuda-python#3251: Introduced the Windows runner trust probe and its endpoint and trust-store checks.

Change: Bug fix

Merge Risk: Minimal · up to 4d78c

No confirmed blocking defect remains. Run the probe on the targeted Windows runners as part of normal validation.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 464c5db and 4d78c04.

Files ignored due to path filters: 1

  • ci/tools/runner_trust_probe_issuers/emsign-root-cs-ca-g3-cross.pem is excluded by !**/*.pem
Files selected for processing: 3

  • .spdx-ignore
  • ci/tools/runner_trust_probe.ps1
  • ci/tools/runner_trust_probe_issuers/README.txt

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e01e453 and c0d94c0.

Files selected for processing: 2

  • .github/actions/upgrade-ca-certificates/emudhra_intermediates.ps1
  • ci/tools/runner_trust_probe.ps1

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@jpascucci-nv

Copy link
Copy Markdown
Contributor

(Sol 6.1 High)
Found one additional issue in PR #3389 (c0d94c0), excluding CodeRabbit’s finding:

[P2] Supply issuer certificates before accepting PartialChain — emudhra_intermediates.ps1:94

Build($Cert) receives only the compromised certificate, with no issuers in ExtraStore. If its parent is absent from the cache and AIA downloads are disabled or unavailable, it can return PartialChain even while the root remains trusted. The helper then incorrectly reports NoTrustAnchor. Missing intermediates can prevent chain construction independently of root trust. Microsoft documentation

Supply the complete known issuer chains through ExtraStore before accepting this result. The two live TLS endpoints don’t cover the code-signing intermediates.

Validation: with the checked-in DV G3B certificate and the same trusted root, OpenSSL verification failed without its issuer and passed when the issuer was supplied. Windows/PowerShell execution remains unverified; neither runtime is available locally. No repository changes made.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor
Doc Preview CI
Preview removed because the pull request was closed or merged.

… build

Classify a chain as NoTrustAnchor only when UntrustedRoot and PartialChain are the only reported problems, and pass the vendored non-root issuer to the chain build so a missing parent is not mistaken for a missing trust anchor.
@juenglin

juenglin commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 464c5db

@jpascucci-nv

Copy link
Copy Markdown
Contributor

I asked Sol 6.1 high to re-review and it came up with:

Partially, at 464c5db:

  • CodeRabbit’s finding is fixed: NoTrustAnchor now requires that no flags other than UntrustedRoot or PartialChain are present.
  • My finding is fixed for TLS, but remains for code signing.

[P2] Include the code-signing issuer cross-certificate — runner_trust_probe.ps1:56

The vendored host chains supply emSign Root TLS CA - G3, but omit emSign Root CS CA - G3 cross-signed by ECC G3. That cross-certificate exists in eMudhra’s repository. Without it cached, the two native code-signing intermediates can still produce PartialChain and incorrectly pass as NoTrustAnchor.

I reproduced this for both CS G3B and G3C: verification failed using the current vendored certificates, then passed after adding the missing cross-certificate, with the same trusted root. Vendor that certificate and include it in ExtraStore to complete the fix.

The TLS reproducer now passes as expected. Windows/PowerShell execution remains unverified locally; the PR description also says the tightened implementation still needs a Windows runner run.

… probe

The code-signing intermediates are issued by the cross-signed emSign Root CS CA - G3, which the test hosts' chains do not carry. Without it a trusted emSign ECC Root CA - G3 would still produce PartialChain and be mistaken for a missing trust anchor.
@juenglin

juenglin commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 4d78c04

@juenglin
juenglin disabled auto-merge November 5, 2026 18:50
@juenglin
juenglin enabled auto-merge (squash) November 5, 2026 18:51
@juenglin
juenglin merged commit b3c5fb2 into NVIDIA:main Nov 5, 2026
131 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 6, 2026
Removed preview folders for the following PRs:
- PR #3305
- PR #3332
- PR #3343
- PR #3368
- PR #3380
- PR #3387
- PR #3388
- PR #3389
- PR #3391
- PR #3393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants