chore(ci): canary/trusted publishing shouldn't use any caching#11795
Merged
chore(ci): canary/trusted publishing shouldn't use any caching#11795
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
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.
Motivation
We have recently set up Trusted Publishing for canary releases (#11712), and would like our stable releases to use it soon, too.
This workflow is quite sensitive since it's the only one that can publish to npm.
However, using a shared GitHub Actions cache in a sensitive, high-privileged workflow is risky, but this is what we do today by using
setup-nodewithcache: yarn.https://github.com/facebook/docusaurus/actions/caches
Another workflow could be compromised and write something harmful to that cache, that later gets restored/run by the publish workflow.
We have seen popular npm packages become compromised that way, see actions/setup-node#1445 (comment)
For that reason, sensitive workflows should not use any shared cache.
Test Plan
CI