|
| 1 | +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | +# |
| 5 | +# Temporary, report-only probe of OS and bundled Node.js certificate stores |
| 6 | +# across hosted and self-hosted runner labels for the eMudhra/emSign CA |
| 7 | +# incident. Delete this workflow and ci/tools/runner_trust_probe* once all |
| 8 | +# runner labels pass and the rollout is complete. |
| 9 | + |
| 10 | +name: "CI: Runner trust probe" |
| 11 | + |
| 12 | +on: |
| 13 | + schedule: |
| 14 | + # Weekly on Mondays at 06:23 UTC |
| 15 | + - cron: "23 6 * * 1" |
| 16 | + workflow_dispatch: |
| 17 | + inputs: |
| 18 | + label-filter: |
| 19 | + description: "Optional regex to filter runner labels (e.g. '^(ubuntu-latest|linux-amd64-cpu8)$'; empty probes all)" |
| 20 | + required: false |
| 21 | + default: "" |
| 22 | + type: string |
| 23 | + |
| 24 | +permissions: |
| 25 | + contents: read |
| 26 | + |
| 27 | +defaults: |
| 28 | + run: |
| 29 | + shell: bash --noprofile --norc -xeuo pipefail {0} |
| 30 | + |
| 31 | +jobs: |
| 32 | + compute-matrix: |
| 33 | + name: Compute runner label sets |
| 34 | + if: ${{ github.repository_owner == 'nvidia' }} |
| 35 | + runs-on: ubuntu-latest |
| 36 | + timeout-minutes: 5 |
| 37 | + outputs: |
| 38 | + host: ${{ steps.compute.outputs.host }} |
| 39 | + linux_gpu: ${{ steps.compute.outputs.linux_gpu }} |
| 40 | + steps: |
| 41 | + - name: Checkout ${{ github.event.repository.name }} |
| 42 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 43 | + with: |
| 44 | + filter: blob:none |
| 45 | + persist-credentials: false |
| 46 | + |
| 47 | + - name: Compute runner labels |
| 48 | + id: compute |
| 49 | + env: |
| 50 | + LABEL_FILTER: ${{ inputs.label-filter || '' }} |
| 51 | + run: | |
| 52 | + # Hosted and self-hosted CPU labels are listed explicitly; GPU labels |
| 53 | + # are derived from ci/test-matrix.yml. |
| 54 | + labels_json="$(yq -o json '.' ci/test-matrix.yml | jq -c --arg filter "${LABEL_FILTER}" ' |
| 55 | + { |
| 56 | + host: ( |
| 57 | + [ |
| 58 | + "ubuntu-latest", |
| 59 | + "linux-amd64-cpu8", |
| 60 | + "linux-arm64-cpu8", |
| 61 | + "linux-amd64-cpu4", |
| 62 | + "windows-latest", |
| 63 | + "windows-2022", |
| 64 | + "windows-11-arm" |
| 65 | + ] + [ |
| 66 | + (.windows["pull-request"][]?, .windows["nightly"][]?) |
| 67 | + | "windows-\(.ARCH)-gpu-\(.GPU)-\(if .DRIVER == "latest" or .DRIVER == "earliest" then .DRIVER else "latest" end)-\(.GPU_COUNT)" |
| 68 | + ] |
| 69 | + ), |
| 70 | + linux_gpu: [ |
| 71 | + (.linux["pull-request"][]?, .linux["nightly"][]?) |
| 72 | + | "\(.FLAVOR // "linux")-\(.ARCH)-gpu-\(.GPU)-\(if .DRIVER == "latest" or .DRIVER == "earliest" then .DRIVER else "latest" end)-\(.GPU_COUNT)" |
| 73 | + ] |
| 74 | + } |
| 75 | + | map_values(unique | if $filter != "" then map(select(test($filter))) else . end) |
| 76 | + ')" |
| 77 | +
|
| 78 | + echo "host=$(jq -c '.host' <<< "${labels_json}")" | tee -a "${GITHUB_OUTPUT}" |
| 79 | + echo "linux_gpu=$(jq -c '.linux_gpu' <<< "${labels_json}")" | tee -a "${GITHUB_OUTPUT}" |
| 80 | +
|
| 81 | + probe-host: |
| 82 | + name: Probe (${{ matrix.label }}) |
| 83 | + needs: compute-matrix |
| 84 | + if: ${{ needs.compute-matrix.outputs.host != '[]' }} |
| 85 | + strategy: |
| 86 | + fail-fast: false |
| 87 | + matrix: |
| 88 | + label: ${{ fromJSON(needs.compute-matrix.outputs.host) }} |
| 89 | + runs-on: ${{ matrix.label }} |
| 90 | + timeout-minutes: 15 |
| 91 | + steps: |
| 92 | + - name: Checkout ${{ github.event.repository.name }} |
| 93 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 94 | + with: |
| 95 | + filter: blob:none |
| 96 | + persist-credentials: false |
| 97 | + |
| 98 | + - name: Probe Linux OS trust store |
| 99 | + if: ${{ runner.os != 'Windows' }} |
| 100 | + env: |
| 101 | + TRUST_PROBE_LABEL: "${{ matrix.label == 'ubuntu-latest' && 'OS trust store (before ca-certificates upgrade)' || 'OS trust store' }}" |
| 102 | + run: ./ci/tools/runner_trust_probe.sh |
| 103 | + |
| 104 | + - name: Probe Linux OS trust store after ca-certificates upgrade (ubuntu-latest) |
| 105 | + if: ${{ always() && matrix.label == 'ubuntu-latest' }} |
| 106 | + env: |
| 107 | + TRUST_PROBE_LABEL: "OS trust store (after ca-certificates upgrade)" |
| 108 | + run: | |
| 109 | + sudo apt-get update |
| 110 | + sudo apt-get install --only-upgrade -y ca-certificates |
| 111 | + ./ci/tools/runner_trust_probe.sh |
| 112 | +
|
| 113 | + - name: Probe Windows OS trust store |
| 114 | + if: ${{ runner.os == 'Windows' }} |
| 115 | + shell: pwsh |
| 116 | + run: ./ci/tools/runner_trust_probe.ps1 |
| 117 | + |
| 118 | + - name: Probe Node 20 action runtime (informational) |
| 119 | + if: ${{ always() }} |
| 120 | + continue-on-error: true |
| 121 | + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 (declares node20) |
| 122 | + with: |
| 123 | + script: | |
| 124 | + const probe = require(`${process.env.GITHUB_WORKSPACE}/ci/tools/runner_trust_probe_node.js`); |
| 125 | + await probe({ core, heading: 'Node 20 action runtime (informational)', gating: false }); |
| 126 | +
|
| 127 | + - name: Probe bundled Node runtime and trust store |
| 128 | + if: ${{ always() }} |
| 129 | + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 |
| 130 | + with: |
| 131 | + script: | |
| 132 | + const probe = require(`${process.env.GITHUB_WORKSPACE}/ci/tools/runner_trust_probe_node.js`); |
| 133 | + await probe({ core }); |
| 134 | +
|
| 135 | + probe-linux-gpu: |
| 136 | + name: Probe (${{ matrix.label }}) |
| 137 | + needs: compute-matrix |
| 138 | + if: ${{ needs.compute-matrix.outputs.linux_gpu != '[]' }} |
| 139 | + strategy: |
| 140 | + fail-fast: false |
| 141 | + matrix: |
| 142 | + label: ${{ fromJSON(needs.compute-matrix.outputs.linux_gpu) }} |
| 143 | + runs-on: ${{ matrix.label }} |
| 144 | + timeout-minutes: 15 |
| 145 | + # Match test-wheel-linux.yml container setup so the probe inspects the exact |
| 146 | + # container environment that Linux GPU test jobs see. |
| 147 | + container: |
| 148 | + options: -u root --security-opt seccomp=unconfined --shm-size 16g |
| 149 | + image: ubuntu:24.04 |
| 150 | + steps: |
| 151 | + - name: Checkout ${{ github.event.repository.name }} |
| 152 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 153 | + with: |
| 154 | + filter: blob:none |
| 155 | + persist-credentials: false |
| 156 | + |
| 157 | + - name: Setup proxy cache |
| 158 | + uses: nv-gha-runners/setup-proxy-cache@main |
| 159 | + continue-on-error: true |
| 160 | + |
| 161 | + - name: Install container CA certificates and probe tools |
| 162 | + uses: ./.github/actions/install_unix_deps |
| 163 | + with: |
| 164 | + dependencies: "ca-certificates curl openssl" |
| 165 | + dependent_exes: "curl openssl" |
| 166 | + |
| 167 | + - name: Probe container OS trust store |
| 168 | + env: |
| 169 | + TRUST_PROBE_LABEL: "Container OS trust store (ubuntu:24.04)" |
| 170 | + run: ./ci/tools/runner_trust_probe.sh |
| 171 | + |
| 172 | + - name: Probe Node 20 action runtime (informational) |
| 173 | + if: ${{ always() }} |
| 174 | + continue-on-error: true |
| 175 | + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 (declares node20) |
| 176 | + with: |
| 177 | + script: | |
| 178 | + const probe = require(`${process.env.GITHUB_WORKSPACE}/ci/tools/runner_trust_probe_node.js`); |
| 179 | + await probe({ core, heading: 'Node 20 action runtime (informational)', gating: false }); |
| 180 | +
|
| 181 | + - name: Probe bundled Node runtime and trust store |
| 182 | + if: ${{ always() }} |
| 183 | + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 |
| 184 | + with: |
| 185 | + script: | |
| 186 | + const probe = require(`${process.env.GITHUB_WORKSPACE}/ci/tools/runner_trust_probe_node.js`); |
| 187 | + await probe({ core }); |
0 commit comments