Skip to content

chore: deny esbuild and fsevents install scripts - #2077

Merged
olaservo merged 1 commit into
v1/mainfrom
chore/v1-allowscripts
Aug 24, 2026
Merged

chore: deny esbuild and fsevents install scripts#2077
olaservo merged 1 commit into
v1/mainfrom
chore/v1-allowscripts

Conversation

@cliffhall

@cliffhall cliffhall commented Aug 22, 2026

Copy link
Copy Markdown
Member

Closes #2079

Problem

npm 11.19 gates dependency lifecycle install scripts behind an allowScripts allowlist and warns on every install about packages not yet reviewed:

npm warn install-scripts 3 packages have install scripts not yet covered by allowScripts:
npm warn install-scripts   esbuild@0.28.1 (postinstall: node install.js)
npm warn install-scripts   fsevents@2.3.3 (install: (install scripts present))
npm warn install-scripts   fsevents@2.3.2 (install: (install scripts present))

Why deny rather than approve

Neither package needs its install script:

  • esbuild resolves its platform binary through optionalDependencies (@esbuild/darwin-* etc.); install.js is only a validation / fallback-download step. node_modules/.bin/esbuild --version reports correctly with the script skipped.
  • fsevents (2.3.3 at root, 2.3.2 under playwright/) ships a prebuilt fsevents.node in the tarball. Its install script is a node-gyp rebuild fallback.

Denying silences the warning without granting a standing "run this package's arbitrary install script" permission that would also apply to future versions.

Verification

Everything in this repo has been built and tested with these scripts skipped (npm ci --ignore-scripts) throughout: npm run build and npm run lint pass, and all suites pass (539 client + 37 server + 85 CLI). Vite/esbuild bundling works, and the app starts and serves normally. After the change, npm install-scripts ls reports No packages with unreviewed install scripts.

Scope note

AGENTS.md scopes v1/main to security fixes only. This is build-config hygiene rather than a security fix, so it does not have that justification — it is proposed because the warning only affects people building v1, and v1 is where it appears. Opened at the explicit direction of a maintainer (@cliffhall); close it if you would rather v1 not take chores.

Stacked on #2075 (base is fix/v1-audit-clear; GitHub retargets this to v1/main automatically as the stack merges). Merge order: #2073 -> #2075 -> #2077.

The change itself is independent of the other two — they touch overrides and the lockfile, this touches only a new top-level allowScripts key — so it can also be cherry-picked out and landed on its own if the stack is rejected or reordered.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gq5jMmxRUphrVbfNbYVmQH

@cliffhall cliffhall added v1 chore Maintenance: deps, build tooling, CI, cleanup — no user-facing behavior change labels Aug 22, 2026
@cliffhall
cliffhall force-pushed the chore/v1-allowscripts branch from 2ce797d to d15279e Compare August 22, 2026 17:07
@cliffhall
cliffhall changed the base branch from v1/main to fix/v1-audit-clear August 22, 2026 17:07
@cliffhall
cliffhall requested a balanced review from Copilot August 22, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds npm install-script denials for esbuild and fsevents. However, this non-security chore conflicts with the v1 branch policy.

Changes:

  • Adds allowScripts entries denying both packages’ lifecycle scripts.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json
olaservo
olaservo previously approved these changes Aug 24, 2026
Base automatically changed from fix/v1-audit-clear to v1/main August 24, 2026 02:51
@olaservo
olaservo dismissed their stale review August 24, 2026 02:51

The merge-base changed after approval.

npm 11.19 gates dependency lifecycle install scripts behind an
allowScripts allowlist and warns about any package not yet reviewed.
Three were pending: esbuild's postinstall and two copies of fsevents.

None of them is needed. esbuild resolves its platform binary through
optionalDependencies (@esbuild/darwin-*), so install.js is only a
validation/fallback-download step, and both fsevents copies ship a
prebuilt fsevents.node — their install script is just a node-gyp
rebuild fallback. Verified: builds and tests pass with the scripts
skipped.

Denying rather than approving keeps the warning quiet without granting
a standing "run this package's arbitrary install script" permission.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gq5jMmxRUphrVbfNbYVmQH
@olaservo
olaservo force-pushed the chore/v1-allowscripts branch from ee62fd2 to 8384f1f Compare August 24, 2026 02:51
@olaservo
olaservo merged commit 0681500 into v1/main Aug 24, 2026
5 checks passed
@olaservo
olaservo deleted the chore/v1-allowscripts branch August 24, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance: deps, build tooling, CI, cleanup — no user-facing behavior change v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1: npm 11.19 warns about unreviewed install scripts (esbuild, fsevents) on every install

3 participants