Repository navigation
CI hardening: pinned actions and Python, hash-pinned Poetry, lint, Renovate - #166
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 of the org CI overhaul for this repo.
What changed
actions/setup-python(SHA-pinned) with the exact version 3.14.10, in place of the floating3.14.pipx install poetry(unpinned) is replaced bypip install --require-hashes --no-deps -r .github/poetry-requirements.txt. That file is poetry 2.3.1 (the version that wrotepoetry.lock) and every package it needs, compiled withpip-compile --generate-hashesfrom.github/poetry-requirements.in. The site's own packages still come frompoetry.lock, whose per-file hashespoetry installchecks, so the install is hash-pinned end to end. Thecache: poetryoption of setup-python is dropped: it needs Poetry installed before setup-python runs. The build takes about 30s without it.cli-driftandstd-drift: the runner's own Rust (whatever its image holds that week) is replaced bydtolnay/rust-toolchainat exactly 1.99.1, the toolchain the CLI pins; it is part of the cache key. The binary is stillcargo install --locked --git ... --rev <sha>at the CLI's default-branch tip.raw.githubusercontent.com,git clone/git fetchof public repos, and onegh apicall. That call resolved the CLI's default branch withGH_TOKEN: ${{ github.token }}; it is nowgit ls-remote https://github.com/ComlineProject/cli HEAD, which yields the same commit and needs no token at all.gh issue,gh pr, create-PR action orissues:/pull-requests:scope anywhere). Every workflow iscontents: read, and the only write scopes arepages: writeandid-token: writeon thedeployjob ofdocs.yml, as before.ubuntu-24.04(was-latest),timeout-minuteson every job, every action pinned to a 40-hex SHA with a version comment (includingactions/cachev4 to v6.1.0 andactions/checkoutv7),persist-credentials: falseon every checkout (nothing pushes), harden-runner (audit) first in every job, concurrency keyed on workflow and ref.docs.ymlhadcancel-in-progress: trueon every ref, so a second push tomaincould cancel a run that was deploying to Pages; now a run onmainis never cancelled, and its deploy queues.github.event.*into a script; the one${{ }}that was in arun:(the CLI's commit in--rev) goes throughenv:now. Nopull_request_targetorworkflow_runtriggers.lint.yml(the org's reusable lint) andrenovate.json: the org preset, plus two rules grouping the poetry lockfile updates and the Poetry tooling requirements into one weekly PR each. Renovate'spoetry,pip_requirementsandgithub-actionsmanagers are all on by default inconfig:recommended, so nothing had to be enabled.echolines incli-drift.ymlandstd-drift.ymlthat held backticks inside single quotes now use double quotes: the new lint (shellcheck through actionlint) flags them (SC2016).What stayed as it was, and why
poetry.lock; I did not move it to a plain requirements file (see below).pygments-comline,develop = true), whichpip --require-hashescannot take, andpoetry.lockalready carries the hashes. Poetry's own requirements file is the one thing pip installs. The drift checks use only the standard library, so they install nothing with pip.Red check that is not from this PR
language-support-driftfails with a 404 onruntime/main/runtime/conformance/features.json: the runtime reorganisation moved that file (toruntime/conformance/spec/features.json), and the script still reads the old path. It was already failing onmain(the scheduled run of 2026-11-09). I tried the path-only change locally: it then fails further in, on a feature id (sizes-packed) the reports do not know yet, so it is a content fix to the script and the reports (the downstream path updates tracked in runtime#111) and is left out of this PR.Only verifiable after merge
buildjob runs on this PR (it passes), the upload anddeploysteps are gated tomain, so the first push tomainis the first real run. The environment and Pages settings are unchanged..github/poetry-requirements.txt(that it updates the hashes along with the versions).