Repository navigation
fix(deps): move test runner to 1.x for extract-zip - #532
Conversation
extract-zip <= 2.0.1 (GHSA-7pqw-9j4j-h8q3) has no patched release. It came in via @web/test-runner -> @web/test-runner-chrome -> puppeteer-core -> @puppeteer/browsers 2.x, which pins it. @puppeteer/browsers 3.x no longer depends on it, and the Modern Web 1.x line pulls it in: - @web/test-runner ^0.18/^0.19 -> ^1.0.0 in all packages - @web/test-runner-playwright ^0.11.0 -> ^1.0.0 (same test-runner-core) - @web/dev-server-esbuild ^1.0.2 -> ^2.0.0 (dev-server-core 1.x, used by the shared web-test.runner-config.mjs) The 1.x line (puppeteer-core 25 included) needs Node.js 22.12 or later, which CI (22, 24) and the docs (22 or later, now 22.12) expect; the root engines field goes from >=18.0.0 to >=22.12.0 to match. The engines of the published packages are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR removes the high-severity, unpatched extract-zip vulnerability from the development dependency tree by upgrading the Modern Web test runner stack and regenerating the lockfile, while aligning the repository's Node.js engine documentation with the new tooling requirement. Flow diagram for the Node.js requirement updateflowchart LR
Node[Node.js 22.12 or later] --> Tooling[Modern Web test runner 1.x]
Tooling --> Repository[Repository development and tests]
Documentation[README requirement] --> Node
Engine[package.json engines] --> Node
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Documentation build overview
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #532 +/- ##
=======================================
Coverage 70.68% 70.68%
=======================================
Files 23 23
Lines 5598 5598
Branches 188 188
=======================================
Hits 3957 3957
Misses 1636 1636
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/ecc-client-elixir-cloud-registry/package.json" line_range="63" />
<code_context>
"@web/dev-server": "^0.1.34",
"@web/dev-server-esbuild": "^0.3.0",
- "@web/test-runner": "^0.19.0",
+ "@web/test-runner": "^1.0.0",
"commander": "*",
"concurrently": "^5.3.0",
</code_context>
<issue_to_address>
**Package watch tests cannot start**
When a developer runs `test:watch` in an affected package, `wtr --watch` loads the package-local runner config and its `@web/dev-server-esbuild` 0.x plugin, which is incompatible with the runner’s dev-server-core 1.x stack; watch-mode tests fail to start.
Upgrade the package-local `@web/dev-server-esbuild` plugin to a version compatible with dev-server-core 1.x.
Also at `packages/ecc-client-elixir-drs-filer/package.json:64`, `packages/ecc-client-elixir-trs-filer/package.json:64`, `packages/ecc-client-ga4gh-drs/package.json:61`, `packages/ecc-client-ga4gh-service-registry/package.json:61`, `packages/ecc-client-ga4gh-tes/package.json:57`, `packages/ecc-client-ga4gh-trs/package.json:61`, `packages/ecc-client-ga4gh-wes/package.json:63`, `packages/ecc-utils-design/package.json:60`, `packages/ecc-client-elixir-ro-crate/package.json:34`.
</issue_to_address>Linked issues
#527 fix(deps): extract-zip advisory via test runner · 1 of 2 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Remove vulnerable extract-zip from the dependency tree. | ✅ Met | The updated package-lock.json has no extract-zip entry. |
| 2 | Move the Modern Web test stack to its 1.x/2.x majors in the root and packages. | 🟡 Partly met | The test runner, root Playwright adapter, and root esbuild plugin are upgraded, but @web/dev-server remains on 0.x and package-level dev-server and esbuild declarations remain on older versions. |
Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: packages/ecc-client-elixir-cloud-registry/package.json:63
Summary
Removes
extract-zip<= 2.0.1 (GHSA-7pqw-9j4j-h8q3, high, no patched release; Dependabot alert #354, also #340) from the dependency tree by moving the Modern Web test stack to its 1.x line:@web/test-runner^0.18/^0.19 -> ^1.0.0 in all ten packages@web/test-runner-playwright^0.11.0 -> ^1.0.0 (same@web/test-runner-core1.x as the runner)@web/dev-server-esbuild^1.0.2 -> ^2.0.0 (dev-server-core 1.x, used by the sharedweb-test.runner-config.mjs)extract-zipcame in via@web/test-runner-chrome->puppeteer-core22/23 ->@puppeteer/browsers2.x (exact pin). The 1.x runner usespuppeteer-core25 ->@puppeteer/browsers3.x, which no longer depends on it. Anoverridesentry was not an option: it would cross a major of an exact pin (3.x is ESM-only), and npm did not apply it to the existing lockfile.The 1.x line needs Node.js 22.12 or later, so the root
enginesgoes from>=18.0.0to>=22.12.0and the README says 22.12. CI (22.x, 24.x), Read the Docs (24) and the Dockerfile (24) are already newer. The published packages'dependencies,peerDependenciesandenginesare unchanged: this only touches dev tooling.Reachability before this PR: dev-only, and not exercised.
extract-ziponly runs when@puppeteer/browsersunpacks a downloaded browser, and our tests launch browsers through Playwright.Closes #527
Verification
npm installafter the bump: noextract-zipinpackage-lock.json; nanoid 3.3.20 and js-yaml 3.15.2/4.3.2 from fix(deps): bump nanoid and js-yaml in lockfile #529 keptnpm run lint: passednpm run build: passed (docs app included)cloud-registryandwespassed.designhad 18 passed and 1 failed, the same as with the old runner: the ace editor's JSON worker comes from cdn.jsdelivr.net, which the sandbox blocks. With the new runner, that failed worker load also logs a harmlessTypeError ... reading 'has'fromwatchFilesMiddleware(Koa cannot parse the blob URL; the code is the same in 0.13 and 1.0). It doesn't happen with network access.CI passed)engines) is fixedRisks and notes
test:watch,wtr --watchwith the package-local configs) was not run locally.@web/test-runner-coreand@web/dev-server-corestay hoisted, because@open-wc/testing->@web/test-runner-commands0.9 and the root@web/dev-server^0.4 need them. The 1.x packages get nested copies. That costs install size only; nothing relies on shared instances today. Deduplicating needs@web/dev-server1.x and an override for@web/test-runner-commands: left for a follow-up.npm auditnow also reaches the existingbasic-ftpadvisory through@puppeteer/browsers3 -> proxy-agent.basic-ftpwas already in the tree via@turbo/gen. It is not new and is out of scope here.@web/dev-server/@web/dev-server-esbuilddevDeps look unused (only the shared root config imports the esbuild plugin). Cleanup left for a follow-up.Declined review findings
@webcores (low): it needs further majors and an override; it costs install size only. See above.@web/dev-server*devDeps (low): out of scope for an advisory fix.Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Upgrade the development test stack to eliminate the vulnerable extract-zip dependency.
Bug Fixes:
Enhancements:
Build:
Documentation: