Skip to content

Commit 2828358

Browse files
authored
CI: pin and verify sccache via a shared composite action (#3248)
CI: add temporary runner certificate trust store probe (#3251) Add a report-only workflow (weekly schedule + workflow_dispatch with an optional label-filter regex) that checks whether each hosted and self-hosted runner label still trusts the compromised eMudhra "emSign ECC Root CA - G3" anchor. For each label it probes: - the OS trust store: emSign G3 absent from the CA bundle or Windows Root store, and curl / Invoke-WebRequest reject the test endpoint; - the runner agent's bundled Node.js: Node 24 >= v24.22.1, and https.get rejects the test endpoint (plus an informational node20 check). Linux GPU labels are probed in the ubuntu:24.04 container used by test jobs; ubuntu-latest is probed before and after upgrading ca-certificates. Probe files are added to IGNORED_PATHS so probe-only changes skip the wheel builds. Delete the workflow and ci/tools/runner_trust_probe* once all labels pass and the rollout is complete. Refs #3195
1 parent 5d65e6f commit 2828358

3 files changed

Lines changed: 80 additions & 13 deletions

File tree

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Install pinned rapidsai/sccache
6+
description: Download, verify, and install a pinned rapidsai/sccache binary on Linux
7+
8+
# Regenerate hashes when bumping SCCACHE_VERSION:
9+
# for arch in x86_64 aarch64; do
10+
# curl -fsSL "https://github.com/rapidsai/sccache/releases/download/<tag>/sccache-${arch}-unknown-linux-musl.tar.gz" | sha256sum
11+
# done
12+
# Cross-check against the `.sha256` files published on the GitHub release.
13+
#
14+
# Security note (eMudhra/emSign CA incident):
15+
# - Every version bump MUST repeat the embedded-roots check on the extracted
16+
# `sccache` binary:
17+
# grep -ac 'ISRG Root X1' sccache # >0 means a root list is embedded
18+
# grep -ac 'emSign ECC Root CA - G3' sccache # must be 0
19+
# Pass criteria: either no embedded root list (both return 0; binary defers
20+
# to the OS trust store via `rustls-platform-verifier`, as verified for
21+
# `rapidsai/sccache` v0.18.0-rapids.7), or an embedded `webpki-roots` list
22+
# at 1.0.10+ where `ISRG Root X1` matches and `emSign ECC Root CA - G3`
23+
# returns 0. Match the full root name: 1.0.10 removes only that emSign root
24+
# and still ships other emSign roots.
25+
# - Do NOT switch to or bump `mozilla/sccache` to v0.19.0 (or later without
26+
# repeating the roots check): `mozilla/sccache` v0.19.0 re-embeds
27+
# `webpki-roots` 1.0.5, which still trusts `emSign ECC Root CA - G3`.
28+
29+
runs:
30+
using: composite
31+
steps:
32+
- name: Install pinned rapidsai/sccache
33+
shell: bash --noprofile --norc -xeuo pipefail {0}
34+
env:
35+
SCCACHE_VERSION: v0.18.0-rapids.7
36+
run: |
37+
if [[ "$(uname -s)" != "Linux" ]]; then
38+
echo "::error::install-sccache only supports Linux (got $(uname -s))" >&2
39+
exit 1
40+
fi
41+
42+
arch="$(uname -m)"
43+
case "${arch}" in
44+
x86_64)
45+
expected_sha256="44106a2e01aeff99767e66b1a5ae6be074306c518458b367f75287de4532974c"
46+
;;
47+
aarch64)
48+
expected_sha256="1bad10208481786f2c2e943d7cca8006eaa7e620d122859ef2d61861a733d3d1"
49+
;;
50+
*)
51+
echo "::error::Unsupported architecture for install-sccache: ${arch}" >&2
52+
exit 1
53+
;;
54+
esac
55+
56+
tarball="sccache-${arch}-unknown-linux-musl.tar.gz"
57+
url="https://github.com/rapidsai/sccache/releases/download/${SCCACHE_VERSION}/${tarball}"
58+
59+
tmp_dir="$(mktemp -d)"
60+
trap 'rm -rf "${tmp_dir}"' EXIT
61+
62+
curl -fsSL -o "${tmp_dir}/${tarball}" "${url}"
63+
(
64+
cd "${tmp_dir}"
65+
echo "${expected_sha256} ${tarball}" | sha256sum --check --strict -
66+
)
67+
68+
if [[ "$(id -u)" -eq 0 ]]; then
69+
tar -C /usr/local/bin -xvzf "${tmp_dir}/${tarball}" --wildcards --strip-components=1 -x '*/sccache'
70+
else
71+
sudo tar -C /usr/local/bin -xvzf "${tmp_dir}/${tarball}" --wildcards --strip-components=1 -x '*/sccache'
72+
fi
73+
74+
echo "SCCACHE_PATH=/usr/local/bin/sccache" >> "${GITHUB_ENV}"
75+
/usr/local/bin/sccache --version

‎.github/workflows/build-wheel.yml‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,9 @@ jobs:
7979
# the job level instead of linking into the diff.
8080
run: echo "::add-matcher::.github/matchers/compiler.json"
8181

82-
- name: Install latest rapidsai/sccache
82+
- name: Install rapidsai/sccache
8383
if: ${{ startsWith(inputs.host-platform, 'linux') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true') }}
84-
run: |
85-
curl -fsSL "https://github.com/rapidsai/sccache/releases/latest/download/sccache-$(uname -m)-unknown-linux-musl.tar.gz" \
86-
| sudo tar -C /usr/local/bin -xvzf - --wildcards --strip-components=1 -x '*/sccache'
87-
echo "SCCACHE_PATH=/usr/local/bin/sccache" >> "$GITHUB_ENV"
84+
uses: ./.github/actions/install-sccache
8885

8986
# The runner only exposes these values to actions, not to `run:` steps or
9087
# the cibuildwheel container, so re-export them for sccache's GHA backend.

‎.github/workflows/test-sdist-linux.yml‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,10 @@ jobs:
8787
pathfinder_uri="file://$(realpath "${pathfinder_wheels[0]}")"
8888
printf 'cuda-pathfinder @ %s\n' "${pathfinder_uri}" | tee wheel-constraints/cuda-bindings.txt
8989
90-
# Cython packages need CTK + sccache.
91-
# The env vars ACTIONS_CACHE_SERVICE_V2, ACTIONS_RESULTS_URL, and ACTIONS_RUNTIME_TOKEN
92-
# are exposed by this action.
93-
- name: Enable sccache
90+
# Cython packages need CTK + sccache (local disk cache only in this job).
91+
- name: Install rapidsai/sccache
9492
if: ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' }}
95-
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # 0.0.11
96-
with:
97-
version: v0.18.0
98-
disable_annotations: 'true'
93+
uses: ./.github/actions/install-sccache
9994

10095
- name: Setup proxy cache
10196
if: ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' }}

0 commit comments

Comments
 (0)