Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): stop npm's audit stalling every pnpm setup (#95127)

Julian Bez221bcc1d20c0
diff --git a/.depot/actions/pnpm-install/action.yml b/.depot/actions/pnpm-install/action.yml
index 7f8d69cc3648..74ce13213980 100644
--- a/.depot/actions/pnpm-install/action.yml
+++ b/.depot/actions/pnpm-install/action.yml
@@ -39,6 +39,11 @@ runs:
steps:
- name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
+ env:
+ # Kept in sync with .github/actions/pnpm-install: npm's audit blocks the pnpm
+ # bootstrap and gates nothing.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
- name: Fix node-gyp permissions
shell: bash
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index 72246a883bf5..989daa27d551 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -1997,7 +1997,7 @@ jobs:
shell: bash
run: |
if [[ -f products/canvas/packages/canvas_builder/package.json ]]; then
- npm ci --ignore-scripts --omit=dev --prefix products/canvas/packages/canvas_builder
+ npm ci --ignore-scripts --omit=dev --no-audit --no-fund --prefix products/canvas/packages/canvas_builder
fi
- name: Install the working version of hogql-parser
if: ${{ needs.changes.outputs.backend == 'true' && steps.hogql-parser-diff.outputs.changed == 'true' }}
diff --git a/.github/actions/pnpm-install/action.yml b/.github/actions/pnpm-install/action.yml
index f0542459e96c..bbf06e15587d 100644
--- a/.github/actions/pnpm-install/action.yml
+++ b/.github/actions/pnpm-install/action.yml
@@ -41,6 +41,13 @@ runs:
steps:
- name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
+ env:
+ # The action bootstraps pnpm with `npm ci`, which audits by default. That audit
+ # covers two packages and gates nothing, but it blocks until npm answers, so a
+ # degraded audit endpoint stalls the step until npm's 300s fetch timeout. That
+ # alone exhausts a 5 minute job budget before any test runs.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
- name: Fix node-gyp permissions
shell: bash
diff --git a/.github/workflows/build-hogql-parser-npm.yml b/.github/workflows/build-hogql-parser-npm.yml
index 95324befdcab..50bb73702845 100644
--- a/.github/workflows/build-hogql-parser-npm.yml
+++ b/.github/workflows/build-hogql-parser-npm.yml
@@ -14,6 +14,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
check-package-version:
name: Check npm package version
diff --git a/.github/workflows/ci-agent-proxy.yml b/.github/workflows/ci-agent-proxy.yml
index e02508cce28d..d7f5cf82b693 100644
--- a/.github/workflows/ci-agent-proxy.yml
+++ b/.github/workflows/ci-agent-proxy.yml
@@ -14,6 +14,11 @@ permissions:
contents: read
pull-requests: read
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
changes:
runs-on: ubuntu-latest
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index 48ff8e84298f..9c404b123e90 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -2955,7 +2955,7 @@ jobs:
shell: bash
run: |
if [[ -f products/canvas/packages/canvas_builder/package.json ]]; then
- npm ci --ignore-scripts --omit=dev --prefix products/canvas/packages/canvas_builder
+ npm ci --ignore-scripts --omit=dev --no-audit --no-fund --prefix products/canvas/packages/canvas_builder
fi
- name: Install the working version of hogql-parser
diff --git a/.github/workflows/ci-e2e-playwright.yml b/.github/workflows/ci-e2e-playwright.yml
index 19b41a384a92..1db45c9a04ce 100644
--- a/.github/workflows/ci-e2e-playwright.yml
+++ b/.github/workflows/ci-e2e-playwright.yml
@@ -65,6 +65,9 @@ env:
# matches the Node plugins container's non-prod default, so Django<->Node internal calls authenticate.
INTERNAL_API_SECRET: posthog123
RUNS_ON_INTERNAL_PR: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
@@ -978,7 +981,7 @@ jobs:
- name: Install VR CLI
if: always() && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push')
- run: cd products/visual_review/cli && npm ci && npm run build && npm link
+ run: cd products/visual_review/cli && npm ci --no-audit --no-fund && npm run build && npm link
- name: Create VR run
id: vr-create
@@ -1274,7 +1277,7 @@ jobs:
restore-keys: npm-vr-cli-${{ runner.os }}-
- name: Install VR CLI
- run: cd products/visual_review/cli && npm ci && npm run build && npm link
+ run: cd products/visual_review/cli && npm ci --no-audit --no-fund && npm run build && npm link
- name: Complete Visual Review run
# On master pushes the run was created with --purpose observe (tracking-only), but
diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml
index 9a9282d6f60a..6d2f70a7b672 100644
--- a/.github/workflows/ci-frontend.yml
+++ b/.github/workflows/ci-frontend.yml
@@ -40,6 +40,9 @@ permissions:
env:
RUNS_ON_INTERNAL_PR: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
jobs:
# Job to decide if we should run frontend ci
diff --git a/.github/workflows/ci-hog.yml b/.github/workflows/ci-hog.yml
index d37a817559d2..f85aaa0c6b58 100644
--- a/.github/workflows/ci-hog.yml
+++ b/.github/workflows/ci-hog.yml
@@ -16,6 +16,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
# Job to decide if we should run backend ci
# See .github/actions/paths-filter/README.md for filter semantics
diff --git a/.github/workflows/ci-integration-service.yml b/.github/workflows/ci-integration-service.yml
index be36b410adce..415dbde9e58a 100644
--- a/.github/workflows/ci-integration-service.yml
+++ b/.github/workflows/ci-integration-service.yml
@@ -25,6 +25,11 @@ concurrency:
permissions:
contents: read
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
integration-service:
name: Integration Service checks
diff --git a/.github/workflows/ci-paths-filter.yml b/.github/workflows/ci-paths-filter.yml
index 8444ead49924..dd0cdba348ce 100644
--- a/.github/workflows/ci-paths-filter.yml
+++ b/.github/workflows/ci-paths-filter.yml
@@ -27,7 +27,7 @@ jobs:
with:
node-version-file: .nvmrc
token: ${{ github.token }}
- - run: npm ci
+ - run: npm ci --no-audit --no-fund
- run: npx tsc --noEmit
- run: npx jest
# The action runs the committed dist/index.js. Rebuild from src and fail if it
diff --git a/.github/workflows/ci-storybook.yml b/.github/workflows/ci-storybook.yml
index bc4d6cd13511..5af3c1f8ef6f 100644
--- a/.github/workflows/ci-storybook.yml
+++ b/.github/workflows/ci-storybook.yml
@@ -27,6 +27,9 @@ permissions:
env:
RUNS_ON_INTERNAL_PR: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
jobs:
# Job to decide if we should run storybook ci
@@ -380,7 +383,7 @@ jobs:
restore-keys: npm-vr-cli-${{ runner.os }}-
- name: Install VR CLI
- run: cd vr-cli/products/visual_review/cli && npm ci && npm run build
+ run: cd vr-cli/products/visual_review/cli && npm ci --no-audit --no-fund && npm run build
- name: Save VR CLI npm cache
# The only writer for every VR CLI install, here and in
@@ -616,7 +619,7 @@ jobs:
- name: Install VR CLI
if: always() && needs.vr-setup.outputs.run_id != ''
- run: cd vr-cli/products/visual_review/cli && npm ci && npm run build
+ run: cd vr-cli/products/visual_review/cli && npm ci --no-audit --no-fund && npm run build
- name: Upload snapshots to Visual Review
if: always() && needs.vr-setup.outputs.run_id != ''
@@ -874,7 +877,7 @@ jobs:
restore-keys: npm-vr-cli-${{ runner.os }}-
- name: Install VR CLI
- run: cd vr-cli/products/visual_review/cli && npm ci && npm run build
+ run: cd vr-cli/products/visual_review/cli && npm ci --no-audit --no-fund && npm run build
- name: Complete Visual Review run
# Pass the same --purpose vr-setup created the run with. The backend reports zero
diff --git a/.github/workflows/desktop-agent-release-verify.yml b/.github/workflows/desktop-agent-release-verify.yml
index a96d7629279d..777e8cc716cd 100644
--- a/.github/workflows/desktop-agent-release-verify.yml
+++ b/.github/workflows/desktop-agent-release-verify.yml
@@ -19,6 +19,11 @@ on:
- 'products/desktop/pnpm-lock.yaml'
- 'products/desktop/pnpm-workspace.yaml'
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
verify:
name: Verify agent release build
diff --git a/.github/workflows/desktop-agent-release.yml b/.github/workflows/desktop-agent-release.yml
index ae75bbb96081..aea9f2ebd88a 100644
--- a/.github/workflows/desktop-agent-release.yml
+++ b/.github/workflows/desktop-agent-release.yml
@@ -9,6 +9,11 @@ concurrency:
group: desktop-agent-release
cancel-in-progress: false
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
release:
name: Publish agent to npm
diff --git a/.github/workflows/desktop-build-test.yml b/.github/workflows/desktop-build-test.yml
index d0b92efba649..e4cd426f8a9d 100644
--- a/.github/workflows/desktop-build-test.yml
+++ b/.github/workflows/desktop-build-test.yml
@@ -24,6 +24,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
build-macos:
# Fork PRs never receive the signing/AWS secrets, so only same-repo PRs
diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml
index 3b937be9b91c..188d84af2558 100644
--- a/.github/workflows/desktop-build.yml
+++ b/.github/workflows/desktop-build.yml
@@ -17,6 +17,11 @@ concurrency:
group: desktop-build-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
changes:
runs-on: depot-ubuntu-24.04
diff --git a/.github/workflows/desktop-mobile-build.yml b/.github/workflows/desktop-mobile-build.yml
index 0d0e12cc9021..d233fac7b7cb 100644
--- a/.github/workflows/desktop-mobile-build.yml
+++ b/.github/workflows/desktop-mobile-build.yml
@@ -28,6 +28,11 @@ concurrency:
group: desktop-mobile-build-${{ github.ref }}-${{ inputs.profile }}
cancel-in-progress: false
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
build:
name: Build (${{ matrix.platform }})
diff --git a/.github/workflows/desktop-mobile-promote.yml b/.github/workflows/desktop-mobile-promote.yml
index 8ae14a9d1669..ec3089b8b73a 100644
--- a/.github/workflows/desktop-mobile-promote.yml
+++ b/.github/workflows/desktop-mobile-promote.yml
@@ -48,6 +48,11 @@ concurrency:
group: desktop-mobile-promote-${{ github.ref }}
cancel-in-progress: false
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
submit:
name: Submit (${{ matrix.platform }})
diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml
index ad71fb2e4cb5..4ac8328242ba 100644
--- a/.github/workflows/desktop-release.yml
+++ b/.github/workflows/desktop-release.yml
@@ -9,6 +9,11 @@ concurrency:
group: desktop-release
cancel-in-progress: false
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
prepare-release:
runs-on: depot-ubuntu-24.04
diff --git a/.github/workflows/desktop-test.yml b/.github/workflows/desktop-test.yml
index 72cc548b320a..23343a6f8eab 100644
--- a/.github/workflows/desktop-test.yml
+++ b/.github/workflows/desktop-test.yml
@@ -21,6 +21,11 @@ concurrency:
group: desktop-test-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
changes:
runs-on: depot-ubuntu-24.04
diff --git a/.github/workflows/desktop-typecheck.yml b/.github/workflows/desktop-typecheck.yml
index 5a4262d4dd14..e77264a5c318 100644
--- a/.github/workflows/desktop-typecheck.yml
+++ b/.github/workflows/desktop-typecheck.yml
@@ -17,6 +17,11 @@ concurrency:
group: desktop-typecheck-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
changes:
runs-on: depot-ubuntu-24.04
diff --git a/.github/workflows/desktop-update-e2e.yml b/.github/workflows/desktop-update-e2e.yml
index be9f5eff6bc8..f01551d2024f 100644
--- a/.github/workflows/desktop-update-e2e.yml
+++ b/.github/workflows/desktop-update-e2e.yml
@@ -25,6 +25,11 @@ concurrency:
group: desktop-update-e2e-${{ github.ref }}
cancel-in-progress: true
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
update-e2e-macos:
runs-on: depot-macos-26
diff --git a/.github/workflows/desktop-warm-caches.yml b/.github/workflows/desktop-warm-caches.yml
index fc72f1d70a8f..bcbd9cf6ee88 100644
--- a/.github/workflows/desktop-warm-caches.yml
+++ b/.github/workflows/desktop-warm-caches.yml
@@ -23,6 +23,11 @@ concurrency:
# the older run's, so cancelling that run loses nothing.
cancel-in-progress: true
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
linux:
runs-on: depot-ubuntu-24.04-4
diff --git a/.github/workflows/publish-quill-npm.yml b/.github/workflows/publish-quill-npm.yml
index bd0b3cafba34..d2bb11a1fae4 100644
--- a/.github/workflows/publish-quill-npm.yml
+++ b/.github/workflows/publish-quill-npm.yml
@@ -23,6 +23,11 @@ concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
+env:
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
+
jobs:
publish:
name: Build and publish
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 80fcecc23555..ee973b6a059b 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -13,6 +13,9 @@ env:
SAMPO_VERSION: 0.17.4
CARGO_DIST_VERSION: 0.32.0
CARGO_DIST_INSTALLER_SHA256: b657cf8c04a8b7bc28f39d220f7e6dd11bbd2bdb072c552262bd9ccf597261b5
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
concurrency:
group: release-cli
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 32e2ccd152c8..2c59e546dedd 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -14,6 +14,9 @@ permissions:
env:
CARGO_DIST_VERSION: 0.32.0
CARGO_DIST_INSTALLER_SHA256: b657cf8c04a8b7bc28f39d220f7e6dd11bbd2bdb072c552262bd9ccf597261b5
+ # npm's audit blocks the pnpm bootstrap. See .github/actions/pnpm-install for why.
+ NPM_CONFIG_AUDIT: 'false'
+ NPM_CONFIG_FUND: 'false'
# Publishing is handled by the Release CLI workflow after Release environment approval.
# Reusable workflow, called by pr-housekeeping.yml on every PR push.
diff --git a/Dockerfile b/Dockerfile
index 318f6e599984..9f0c9fd7117e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -150,7 +150,7 @@ RUN --mount=type=cache,id=pnpm,target=/tmp/pnpm-store-v24 \
COPY products/canvas/packages/canvas_builder/ products/canvas/packages/canvas_builder/
RUN --mount=type=cache,id=npm,target=/root/.npm \
- npm ci --ignore-scripts --omit=dev --prefix products/canvas/packages/canvas_builder
+ npm ci --ignore-scripts --omit=dev --no-audit --no-fund --prefix products/canvas/packages/canvas_builder
# The transpiler bundle externalizes @babel/standalone (its only external runtime require — a
# self-contained 24MB package with no deps). Materialize it as real files inside the transpiler's