Skip to content

Conversation

JohnTitor
Copy link
Contributor

Using third-party actions introduces some risks, and GitHub suggests that you should pin them to a full-length commit SHA: https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions
Also, GitHub recently shipped a feature to reject such a usage: https://github.blog/changelog/2025-08-15-github-actions-policy-now-supports-blocking-and-sha-pinning-actions/

This repo is exposed as a composite action; end-users cannot enable the above feature due to the Swatinem/rust-cache@v2 line, like: Error: The action swatinem/rust-cache@v2 is not allowed in owner/repo because all actions must be pinned to a full-length commit SHA.
This fixes that issue by pinning it.

@robjtede
Copy link
Contributor

after finding out that hash pinning works fine with dependabot, lgtm 👍🏻

@robjtede robjtede requested a review from jonasbb August 27, 2025 00:11
@jonasbb
Copy link
Member

jonasbb commented Aug 27, 2025

Thank you for the PR. This seems necessary for better security. Disabling the caching is not enough to prevent this error message.

The rust-cache action is not that active that it would be a burden to update the pinned hashes.

@jonasbb jonasbb merged commit 8b89091 into actions-rust-lang:main Aug 27, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants