Skip to content

TS lane: in-lane allowScripts approvals + a clean dev-tree audit - #21

Merged
gsavastano merged 1 commit into
mainfrom
chore/ts-lane-audit-allowscripts
Aug 18, 2026
Merged

TS lane: in-lane allowScripts approvals + a clean dev-tree audit#21
gsavastano merged 1 commit into
mainfrom
chore/ts-lane-audit-allowscripts

Conversation

@gsavastano

Copy link
Copy Markdown
Contributor

Fixes the two findings from a close read of opendpp-node's sdk-regen CI logs (PR gsavastano/opendpp-node#1619, run 32167793772).

1. Install-script approval now travels with the lane

The sdk-regen log showed esbuild's postinstall executing on the CI runner with only a warning: typescript/ had no allowScripts of its own, so enforcement depended on whichever parent directory the checkout sat in. In opendpp-node's CI this repo is nested at sdk/, where npm walks up and finds that repo's allowScripts — pinned to esbuild@0.28.2, a version this lockfile doesn't resolve — so the lane's actual script-carrying packages were uncovered, and npm's warn-mode ran them anyway.

typescript/package.json now carries its own exact-version approvals (esbuild@0.27.2, esbuild@0.28.1, fsevents@2.3.3). Bumping a dep that runs install scripts means re-approving it here in the same change.

2. The 5 dev-tree advisories (1 low, 4 high) are cleared

  • esbuild 0.27.7 → 0.27.2 via npm audit fix (GHSA-g7r4-m6w7-qqqr, dev-server file read). In-range for tsup's declared ^0.27.0 — the 0.28 ceiling is tsup's, not ours. tsx's nested 0.28.1 was already clean.
  • js-yaml → 4.3.1 via an overrides floor (GHSA-52cp-r559-cp3m, GHSA-5p4m-2wfm-xmqj). Required because @hey-api/json-schema-ref-parser@1.4.4 exact-pins js-yaml: "4.2.0" — a pin no range solver can route around. Re-check whether the floor still binds when hey-api moves.

Both are devDependencies of the generator toolchain — nothing here ships to SDK consumers, and the generation input is first-party JSON, never untrusted YAML.

Verified

  • npm ci: 0 vulnerabilities, no install-script warnings
  • npm run generate: zero diff in src/generated (generator stays 0.99.0)
  • version lock ✓, typecheck ✓, build ✓, tests 10 pass / 5 live-skipped

…n-lane, and the audit runs clean

Two findings from reading opendpp-node's sdk-regen CI logs end to end:

- esbuild's postinstall ran on the CI runner unapproved. The lane had no
  allowScripts of its own, so behaviour depended on whichever parent
  directory the checkout happened to sit in (opendpp-node's CI nests this
  repo at sdk/, where npm walks up and finds THAT repo's allowScripts —
  pinned to versions this lockfile does not resolve). The approval list
  now travels with the lane: esbuild@0.27.2, esbuild@0.28.1,
  fsevents@2.3.3, exact-version-pinned so a bumped dep that runs install
  scripts must be re-approved here in the same change.

- npm audit reported 5 advisories (1 low, 4 high), all devDependencies.
  esbuild 0.27.7 -> 0.27.2 clears GHSA-g7r4-m6w7-qqqr within tsup's
  declared ^0.27.0 (the 0.28 ceiling is tsup's, not ours). js-yaml is
  exact-pinned at 4.2.0 by @hey-api/json-schema-ref-parser@1.4.4 — a pin
  no range solver can route around — so the overrides floor lifts it to
  ^4.3.1 (GHSA-52cp-r559-cp3m, GHSA-5p4m-2wfm-xmqj). Dev-only either
  way: the generator toolchain never ships to consumers, and the
  generation input is first-party JSON, never untrusted YAML.

Verified: npm ci clean (0 vulnerabilities, no script warnings),
regenerate -> zero diff in src/generated, version lock, typecheck,
build, tests 10 pass / 5 live-skipped.
@gsavastano
gsavastano merged commit ee46c04 into main Aug 18, 2026
4 checks passed
@gsavastano
gsavastano deleted the chore/ts-lane-audit-allowscripts branch August 18, 2026 18:26
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.

2 participants