Skip to content

Leave the package manager cache off unless a caller asks for it - #107

Merged
mafintosh merged 2 commits into
holepunchto:mainfrom
bavulapati:setup-node-cache
Oct 12, 2026
Merged

mafintosh merged 2 commits into
holepunchto:mainfrom
bavulapati:setup-node-cache

Conversation

@bavulapati

@bavulapati bavulapati commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

actions/setup-node caches the package manager's global directory by default. In a workflow that publishes, that means the release build restores a cache other refs can write, which zizmor reports as a cache poisoning path into what we ship.

The version we already pin takes package-manager-cache, so this passes it through, defaulted off. Callers that want the cache ask for it.

Off is the right default here. Publishing is where the cache is dangerous, and it is the case a caller is least likely to think about. It also costs little: these packages do not commit a lockfile and do not set packageManager in package.json, which is what turns the automatic caching on, so for most repos this changes nothing but the declared intent.

Fixes the findings behind holepunchto/bare-kit#109 at the layer that owns them, so no publish workflow has to repeat the opt-out. holepunchto/bare-kit#113 closes in favour of this.

@bavulapati

Copy link
Copy Markdown
Contributor Author

@kasperisager FYI

@bavulapati bavulapati changed the title Let callers turn off the package manager cache Leave the package manager cache off unless a caller asks for it Aug 31, 2026
@mafintosh
mafintosh merged commit 3680a1d into holepunchto:main Oct 12, 2026
2 checks passed
@bavulapati
bavulapati deleted the setup-node-cache branch October 12, 2026 17:57
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.

3 participants