Skip to content

chore: deny esbuild and fsevents install scripts - #2077

Open
cliffhall wants to merge 1 commit into
fix/v1-audit-clearfrom
chore/v1-allowscripts
Open

chore: deny esbuild and fsevents install scripts#2077
cliffhall wants to merge 1 commit into
fix/v1-audit-clearfrom
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
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

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
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

2 participants