fix(security)!: disable node scripts by default#717
Open
xnyo wants to merge 4 commits into
Open
Conversation
xnyo
commented
May 12, 2026
| run: | | ||
| if [ -f "./cspell.config.json" ]; then | ||
| npx --yes cspell@6.13.3 -c cspell.config.json "**/*.{ts,tsx,js,go,md,mdx,yml,yaml,json,scss,css}" | ||
| npx --yes --ignore-scripts cspell@6.13.3 -c cspell.config.json "**/*.{ts,tsx,js,go,md,mdx,yml,yaml,json,scss,css}" |
Member
Author
There was a problem hiding this comment.
cspell doesn't have any lifecycle scripts for install, so it's safe to always skip the, regardless of the value of node-package-manager-allow-scripts
KristianGrafana
approved these changes
May 12, 2026
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.
Disables scripts before running npm/yarn/pnpm install in the frontend action and playwright action. This improves security and protects against npm supply chain attacks that use pre-install, install or post-install scripts to inject malicious payloads.
If those scripts are required, the new
node-package-manager-allow-scriptsinput can be used to restore the old behavior.For repositories using pnpm, a better approach than using
node-package-manager-allow-scriptsis to allowlist only the specific packages that genuinely need build scripts, reducing the blast radius. The setting to use depends on the pnpm version:pnpm ≤9 and pnpm 10 (before 10.26) — add to
package.json:{ "pnpm": { "onlyBuiltDependencies": ["esbuild", "sharp"] } }pnpm 10.26+ — add to
pnpm-workspace.yaml:pnpm 11+ — same as above (
onlyBuiltDependenciesis removed in pnpm 11,allowBuildsis the only supported option):