Skip to content

Pin actions/cache to SHA#230

Closed
takac wants to merge 1 commit into
pre-commit:mainfrom
takac:patch-1
Closed

Pin actions/cache to SHA#230
takac wants to merge 1 commit into
pre-commit:mainfrom
takac:patch-1

Conversation

@takac
Copy link
Copy Markdown

@takac takac commented Aug 18, 2025

Pin the action/cache action in action.yml to a specific SHA, this change will allow usage of the pre-commit action when enforcement of SHA pinning on actions is set[1]. SHA pinning helps prevent supply chain attacks as versions/releases of actions are not immutable and can be updated at any time. Pinning to a SHA makes the release immutable from the consumer perspective.

SHA pinning enforcement applies to downstream dependencies, i.e. if I include pre-commit/action in my workflows I cannot use SHA pinning because actions/cache is currently unpinned.

[1] https://github.blog/changelog/2025-08-15-github-actions-policy-now-supports-blocking-and-sha-pinning-actions/#enforce-sha-pinning

Pin the action/cache action in action.yml to a specific SHA, this change will allow usage of the pre-commit action when enforcement of SHA pinning on actions is set[1]. SHA pinning helps prevent supply chain attacks as versions/releases of actions are not immutable and can be updated at any time. Pinning to a SHA makes the release immutable from the consumer perspective.

SHA pinning enforcement applies to downstream dependencies, i.e. if I include pre-commit/action in my workflows I cannot use SHA pinning because actions/cache is currently unpinned.

[1] https://github.blog/changelog/2025-08-15-github-actions-policy-now-supports-blocking-and-sha-pinning-actions/#enforce-sha-pinning
@asottile
Copy link
Copy Markdown
Member

as much as this is a good practice I can't rationalize the maintenance trade off at this time

feel free to use your fork though!

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.

2 participants