Repository navigation
ci: pin every action to one SHA, drop stale audit suppressions - #2291
Merged
Merged
Conversation
Fixes a broken pin. `PyO3/maturin-action@3e2bdf6ba645...`, used twice in python-release.yml and commented `# v1.51.0`, is not a commit that exists: $ gh api repos/PyO3/maturin-action/commits/3e2bdf6ba645... No commit found for SHA (HTTP 422) The real v1.51.0 is e83996d1. Every maturin-action use now points at it. Nine actions carried more than one pin (checkout x3, upload-artifact x3, cache x3, setup-python, setup-node, download-artifact, maturin-action), which means each one is a separate update to review. Each is now a single SHA, chosen as the newest of the SHAs already in use here: actions/checkout -> de0fac2e v6.0.2 actions/cache -> 27d5ce7f v5.0.5 actions/download-artifact -> 3e5f45b2 v8.0.1 actions/setup-node -> 53b83947 v6.3.0 actions/setup-python -> a309ff8b v6.2.0 actions/upload-artifact -> 043fb46d v7.0.1 PyO3/maturin-action -> e83996d1 v1.51.0 Six uses were on moving refs and are now pinned, including huggingface/doc-builder@main -- a third-party reusable workflow tracking a branch, in a repo that otherwise pins carefully: dtolnay/rust-toolchain@stable, actions/stale@v9, astral-sh/setup-uv@v6, mozilla-actions/sccache-action@v0.0.9, .../build_main_documentation.yml@main rust-toolchain follows the convention already used in node.yml, docs-check.yml and rust-release.yml: SHA plus a `# stable` comment. Also drops three `cargo audit --ignore` flags that suppress nothing. Auditing main's resolved graph, only RUSTSEC-2024-0436 (paste) and RUSTSEC-2025-0119 (number_prefix) still fire; both are unmaintained-crate warnings with no fix. Of the three removed, RUSTSEC-2025-0014 is the clearest case -- that advisory (humantime) was withdrawn upstream on 2025-03-12, so it cannot fire at all. A suppression that matches nothing only hides a future recurrence. All 24 actions are now single-SHA pinned across 102 uses, and every workflow still parses.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Independent of the node dependency stack (#2286→#2290) — this one targets
maindirectly.A broken pin
PyO3/maturin-action@3e2bdf6ba645...is used twice inpython-release.yml, commented# v1.51.0. That commit does not exist:The real v1.51.0 is
e83996d1. All maturin-action uses now point there.Pin consolidation
Nine actions carried more than one pin —
checkout×3,upload-artifact×3,cache×3, plussetup-python,setup-node,download-artifact,maturin-action. Every distinct pin is a separate update to review, for no benefit.Each is now a single SHA, chosen as the newest of the SHAs already in use in this repo (verified via commit dates through the API, so nothing untrusted is introduced):
actions/checkoutde0fac2eactions/cache27d5ce7factions/download-artifact3e5f45b2actions/setup-node53b83947actions/setup-pythona309ff8bactions/upload-artifact043fb46dPyO3/maturin-actione83996d1Moving refs now pinned
Six uses tracked mutable refs. Most notable:
huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main— a third-party reusable workflow following a branch, in a repo that otherwise SHA-pins carefully.Also
dtolnay/rust-toolchain@stable,actions/stale@v9,astral-sh/setup-uv@v6,mozilla-actions/sccache-action@v0.0.9.rust-toolchainfollows the convention already proven innode.yml,docs-check.ymlandrust-release.yml: SHA plus a# stablecomment, notoolchain:input needed.Stale audit suppressions
cargo auditsuppressed five advisories. Auditing main's actual resolved graph, only two still fire —RUSTSEC-2024-0436(paste) andRUSTSEC-2025-0119(number_prefix), both unmaintained-crate warnings with no fix available. Those stay.The three removed:
RUSTSEC-2025-0014— clearest case: that humantime advisory was withdrawn upstream on 2025-03-12. It cannot fire at all.RUSTSEC-2025-0057(fxhash) andRUSTSEC-2026-0204(crossbeam-epoch) — neither fires on main, which resolvescrossbeam-epochto the patched 0.9.20.A suppression matching nothing isn't harmless: it silently hides a future recurrence of that same advisory.
maincommits noCargo.lock, so CI resolves fresh each run. Long-running branches that do commit locks (e.g.bitsplit) pincrossbeam-epoch0.9.18, which is exactlyRUSTSEC-2026-0204. With that ignore gone, audit will correctly flag it on merge — the fix is acargo update -p crossbeam-epoch, not restoring the suppression.Verification
cargo auditinvocations verified against a real audit runNot included
I had also flagged
pytest-asyncioas an unused test extra. That was wrong — it's used via@pytest.mark.asyncioon the async tests intests/bindings/test_tokenizer.py, which my import-only grep missed. It stays.