Skip to content

Make Rust CI workflows zizmor compliant#38

Open
fedonman wants to merge 1 commit into
Rust-for-CPython:rust-in-cpythonfrom
fedonman:zizmor-compliant-rust-ci
Open

Make Rust CI workflows zizmor compliant#38
fedonman wants to merge 1 commit into
Rust-for-CPython:rust-in-cpythonfrom
fedonman:zizmor-compliant-rust-ci

Conversation

@fedonman

@fedonman fedonman commented Jul 18, 2026

Copy link
Copy Markdown

The Rust CI additions introduced action references that the repository's zizmor blanket policy flags: 6 unpinned-uses errors and 1 misfeature finding (see the failing run).

This pins every action in the Rust CI files to a full commit SHA (with a version comment), matching how the rest of the repo pins its actions:

  • dtolnay/rust-toolchain@1.91.1ab40b01f54fe82bdf65693ea090a1e4942c136e7 # 1.91.1 (in setup-rust-windows/action.yml, build.yml ×2, reusable-wasi.yml)
  • dtolnay/rust-toolchain@stable4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable (cargo.yml)
  • actions/checkout@v69c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 (cargo.yml), the same pin used everywhere else in the repo

dtolnay/rust-toolchain derives the toolchain from the action ref, so hash-pinning it breaks that inference. I've added an explicit toolchain: input wherever it was pinned to a hash and one wasn't already present.

For the remaining misfeature finding, the x64 Install LLVM for bindgen step is switched from shell: cmd to shell: pwsh, mirroring the existing ARM64 step in the same file (same Test-Path guard and GITHUB_ENV write).

Fixes #37

Pin every action reference in the Rust CI additions to a full commit
SHA, as required by the repository's zizmor blanket policy:

* dtolnay/rust-toolchain -> ab40b01 (1.91.1) and 4cda84d (stable)
* actions/checkout -> 9c091bb (v7.0.0), matching the rest of the repo

dtolnay/rust-toolchain derives the installed toolchain from the action
ref, so hash-pinning it requires an explicit `toolchain:` input; add one
wherever it was not already present.

Also switch the x64 "Install LLVM for bindgen" step from `shell: cmd` to
`shell: pwsh`, mirroring the existing ARM64 step, to resolve the
remaining zizmor misfeature finding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Rust CI action zizmor compliant

1 participant