Skip to content

chore(ci): use npm ci --ignore-scripts in Tekton install task - #2710

Open
aryamohanan wants to merge 2 commits into
mainfrom
chore-ci
Open

chore(ci): use npm ci --ignore-scripts in Tekton install task#2710
aryamohanan wants to merge 2 commits into
mainfrom
chore-ci

Conversation

@aryamohanan

Copy link
Copy Markdown
Contributor

Replace npm install --foreground-scripts with npm ci --ignore-scripts for dependency installs in the Tekton pipeline.

  • npm ci installs strictly from package-lock.json, preventing a compromised newer version from silently resolving in
  • --ignore-scripts blocks preinstall/postinstall/install lifecycle hooks from running in CI, closing the exact execution vector used by the CHAINDROP/Shai-Hulud npm supply chain worm (Aug 2026)

ref : https://nodejs.org/learn/getting-started/security-best-practices#supply-chain-attacks

https://www.elastic.co/security-labs/shai-hulud-chaindrop-npm-supply-chain#recommendations-how-to-respond-to-the-shai-hulud-compromise

@aryamohanan
aryamohanan requested a review from a team as a code owner August 12, 2026 05:03
echo "Skipping npm cache..."

echo "Installing npm dependencies..."
npm install --loglevel verbose --foreground-scripts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

--foreground-scripts added as part of f558acc

Since we ignore lifecycle scripts during installation, this option is no longer needed, so I removed it.

@kirrg001

Copy link
Copy Markdown
Contributor

Its a great idea to reconsider this. Lets wait for the new pipes to be in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants