Skip to content

added --ignore-scripts for all npm/yarn installs#60

Merged
jkosanam merged 1 commit intomainfrom
npm-update
Dec 15, 2025
Merged

added --ignore-scripts for all npm/yarn installs#60
jkosanam merged 1 commit intomainfrom
npm-update

Conversation

@jkosanam
Copy link
Collaborator

@jkosanam jkosanam commented Nov 26, 2025

A widespread ongoing NPM supply-chain attack is exploiting the preinstall lifecycle phase to execute malicious code during package installation. Disabling lifecycle scripts prevents any untrusted or compromised packages from executing arbitrary code during npm install / yarn install.

These scripts can:

  1. Execute harmful code on your machine or CI/CD servers
  2. Create unauthorized GitHub workflow files (.github/workflows/discussion.yaml)
  3. Potentially steal tokens, modify repos, inject malware, etc.

Made changes to use npm install --ignore-scripts instead of regular installs.
This prevents execution of preinstall/postinstall lifecycle scripts as part of the ongoing NPM supply-chain security incident.

https://do-internal.atlassian.net/browse/SERVERLESS-3668

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please share the ticket/context of the security ticket

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have any ticket for this. It came as an announcement mail. Added more context in the PR description.

@jkosanam jkosanam merged commit 18f4a39 into main Dec 15, 2025
8 checks passed
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