Skip to content

fix(security): run npm ci with --ignore-scripts#929

Open
jcchavezs wants to merge 2 commits into
jsonwebtoken:masterfrom
jcchavezs:ci_ignore_scripts
Open

fix(security): run npm ci with --ignore-scripts#929
jcchavezs wants to merge 2 commits into
jsonwebtoken:masterfrom
jcchavezs:ci_ignore_scripts

Conversation

@jcchavezs

Copy link
Copy Markdown

This would avoid malicious scripts in vulnerable packages to be executed on CI

@jonathanp-okta

Copy link
Copy Markdown
Contributor

@jcchavezs, thanks for the contribution. This is a useful defense-in-depth improvement: --ignore-scripts prevents dependency lifecycle scripts from executing during npm ci.

I tested the project with a clean npm ci --ignore-scripts installation, and all Vitest and Playwright tests passed. Please rebase this branch onto the latest master to resolve the current workflow conflicts. Once it is rebased and CI passes, this should be good to review.

For clarity, this mitigates install-time script execution but does not prevent malicious dependency code from running when explicitly loaded by tests, builds, or CLI commands.

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.

2 participants