Skip to content

fix(ci): add --ignore-scripts to platform test installs to block post install attacks - #2206

Merged
mandarini merged 2 commits into
masterfrom
fix/supply-chain-ignore-scripts
Mar 31, 2026
Merged

mandarini merged 2 commits into
masterfrom
fix/supply-chain-ignore-scripts

Conversation

@mandarini

@mandarini mandarini commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

Description

What changed?

Added --ignore-scripts to two npm install calls in the integration test workflow and the Expo Nx install target:

  • .github/workflows/integration-tests.yml: both npm install --legacy-peer-deps calls (Next.js and Expo platform test setup) now include --ignore-scripts
  • packages/core/supabase-js/test/integration/expo/project.json: the nx install expo-app convenience target now includes --ignore-scripts

Why was this change needed?

On March 30-31, 2026, a supply chain attack compromised [email protected] on npm. The malicious version introduced a dependency ([email protected]) with a postinstall hook that deploys a remote access trojan on install across macOS, Windows, and Linux.

The integration test workflow installs dependencies fresh from the registry in the Next.js and Expo subdirectories (without lockfile enforcement, due to preview packages using 0.0.0-automated versions that do not satisfy peer dependency ranges). This means any malicious postinstall hook in the resolved dependency tree would execute on the CI runner.

The --ignore-scripts flag prevents all postinstall hooks from executing during these installs. The plain-crypto-js payload is delivered entirely via postinstall, so this flag neutralises that attack vector categorically.

The repository was not compromised by this incident. Neither Next.js nor Expo pull axios transitively, and all other CI workflows use npm ci with a committed lockfile. This change is defence-in-depth to protect against similar attacks in the future.

Screenshots/Examples

N/A

Breaking changes

  • This PR contains no breaking changes

Checklist

  • I have read the Contributing Guidelines
  • My PR title follows the conventional commit format: <type>(<scope>): <description>
  • I have run npx nx format to ensure consistent code formatting
  • I have added tests for new functionality (if applicable)
  • I have updated documentation (if applicable)

Additional notes

Related incident: Supply Chain Attack on Axios Pulls Malicious Dependency from npm - Socket Research Team, March 31, 2026.

Copilot AI review requested due to automatic review settings March 31, 2026 09:06
@mandarini
mandarini requested review from a team as code owners March 31, 2026 09:06
@pkg-pr-new

pkg-pr-new Bot commented Mar 31, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2206

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2206

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2206

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2206

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2206

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2206

commit: da1f49e

grdsdev
grdsdev previously approved these changes Mar 31, 2026
staaldraad
staaldraad previously approved these changes Mar 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates CI/platform test dependency installation commands to disable npm lifecycle scripts, reducing exposure to post-install script attacks during integration test runs.

Changes:

  • Add --ignore-scripts to the Next.js and Expo dependency install steps in the integration test GitHub Actions workflow.
  • Add --ignore-scripts to the Expo integration test Nx install target.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/core/supabase-js/test/integration/expo/project.json Disables npm lifecycle scripts for the Expo Nx install target.
.github/workflows/integration-tests.yml Disables npm lifecycle scripts when installing Next.js/Expo integration test dependencies in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mandarini
mandarini dismissed stale reviews from staaldraad and grdsdev via da1f49e March 31, 2026 09:13
@mandarini
mandarini requested review from grdsdev and staaldraad March 31, 2026 09:27
@mandarini mandarini self-assigned this Mar 31, 2026
@mandarini
mandarini enabled auto-merge (squash) March 31, 2026 16:17
mandarini pushed a commit to supabase/ssr that referenced this pull request Apr 7, 2026
This PR updates `@supabase/supabase-js` to v2.102.1.

**Source**: supabase-js-stable-release

---

## Release Notes

## v2.102.1

## 2.102.1 (2026-04-07)

### 🩹 Fixes

- **functions:** add toJSON to FunctionsError for correct JSON
serialization
([#2226](supabase/supabase-js#2226))

### ❤️ Thank You

- oniani1
## v2.102.0

## 2.102.0 (2026-04-07)

### 🚀 Features

- **postgrest:** add automatic retries for transient errors
([#2072](supabase/supabase-js#2072))
- **postgrest:** add success discriminator field to PostgREST response
types ([#2198](supabase/supabase-js#2198))
- **supabase:** export PostgrestFilterBuilder and StorageApiError from
supabase-js ([#2222](supabase/supabase-js#2222))

### 🩹 Fixes

- **auth:** downgrade console.error to console.warn for missing session
([#2214](supabase/supabase-js#2214))
- **ci:** add --ignore-scripts to platform test installs to block post
install attacks
([#2206](supabase/supabase-js#2206))
- **postgrest:** add toJSON to PostgrestError for correct JSON
serialization
([#2212](supabase/supabase-js#2212))
- **postgrest:** reject excess properties in insert, update, and upsert
([#2186](supabase/supabase-js#2186))
- **storage:** set correct content-type for uploads
([#2211](supabase/supabase-js#2211))
- **storage:** avoid duplicate content-type headers in vector requests
([#2220](supabase/supabase-js#2220))

### ❤️ Thank You

- Clay
- Guilherme Souza
- Katerina Skroumpelou @mandarini
- oniani1
- Vaibhav @7ttp

This PR was created automatically.

Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
mandarini pushed a commit to supabase/supabase that referenced this pull request Apr 7, 2026
This PR updates @supabase/*-js libraries to version 2.102.1.

**Source**: supabase-js-stable-release

**Changes**:
- Updated @supabase/supabase-js to 2.102.1
- Updated @supabase/auth-js to 2.102.1
- Updated @supabase/realtime-js to 2.102.1
- Updated @supabase/postgest-js to 2.102.1
- Refreshed pnpm-lock.yaml

---

## Release Notes

## v2.102.1

## 2.102.1 (2026-04-07)

### 🩹 Fixes

- **functions:** add toJSON to FunctionsError for correct JSON
serialization
([#2226](supabase/supabase-js#2226))

### ❤️ Thank You

- oniani1
## v2.102.0

## 2.102.0 (2026-04-07)

### 🚀 Features

- **postgrest:** add automatic retries for transient errors
([#2072](supabase/supabase-js#2072))
- **postgrest:** add success discriminator field to PostgREST response
types ([#2198](supabase/supabase-js#2198))
- **supabase:** export PostgrestFilterBuilder and StorageApiError from
supabase-js ([#2222](supabase/supabase-js#2222))

### 🩹 Fixes

- **auth:** downgrade console.error to console.warn for missing session
([#2214](supabase/supabase-js#2214))
- **ci:** add --ignore-scripts to platform test installs to block post
install attacks
([#2206](supabase/supabase-js#2206))
- **postgrest:** add toJSON to PostgrestError for correct JSON
serialization
([#2212](supabase/supabase-js#2212))
- **postgrest:** reject excess properties in insert, update, and upsert
([#2186](supabase/supabase-js#2186))
- **storage:** set correct content-type for uploads
([#2211](supabase/supabase-js#2211))
- **storage:** avoid duplicate content-type headers in vector requests
([#2220](supabase/supabase-js#2220))

### ❤️ Thank You

- Clay
- Guilherme Souza
- Katerina Skroumpelou @mandarini
- oniani1
- Vaibhav @7ttp
## v2.101.1

## 2.101.1 (2026-03-31)

### 🩹 Fixes

- **storage:** support exactOptionalPropertyTypes
([#2200](supabase/supabase-js#2200))

### ❤️ Thank You

- Vaibhav @7ttp

This PR was created automatically.

Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
@mandarini mandarini mentioned this pull request May 13, 2026
5 of 6 tasks
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.

5 participants