Skip to content

security: disable automatic lifecycle scripts during npm install - #66

Merged
max-ostapenko merged 1 commit into
mainfrom
fix/ignore-npm-scripts
Sep 9, 2026
Merged

security: disable automatic lifecycle scripts during npm install#66
max-ostapenko merged 1 commit into
mainfrom
fix/ignore-npm-scripts

Conversation

@max-ostapenko

Copy link
Copy Markdown
Contributor

Summary

Mitigates npm supply-chain compromise risk by disabling automatic execution of package lifecycle scripts (preinstall, install, postinstall) via .npmrc.

Changes

  • Added root .npmrc with ignore-scripts=true
  • Added test-project/.npmrc with ignore-scripts=true

Context & Impact

  • Resolves Oneleet Code Security findings: "npm: Elevated risk of supply chain compromise because dependencies can run arbitrary scripts".
  • Validated locally: npm run lint and npx jest pass 100% without issues.

@max-ostapenko
max-ostapenko merged commit 33e98d8 into main Sep 9, 2026
4 of 6 checks passed
@max-ostapenko
max-ostapenko deleted the fix/ignore-npm-scripts branch September 9, 2026 11:36
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.

1 participant