Skip to content

chore: Resolve the npm advisories the lock file can resolve - #90

Merged
hannesgao merged 2 commits into
mainfrom
chore-npm-audit
Oct 11, 2026
Merged

hannesgao merged 2 commits into
mainfrom
chore-npm-audit

Conversation

@hannesgao

@hannesgao hannesgao commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

What does this change and why?

Resolves the Dependabot alerts that the lock file can resolve. Development dependencies only (@wordpress/env and what it pulls in); nothing here is in the plugin package.

  • @wordpress/env 11.15.0 → 11.17.0 (within the declared range).
  • http-cache-semantics 4.2.0 → 4.3.0 (GHSA-ch52-4w7c-c8xp ends at 4.2.0).
  • qs 6.15.3 → 6.16.0 by an override, as express pins ~6.15.1 (two npm advisories; not yet on Dependabot).
  • argparse 1.0.10 → 2.0.1 by an override scoped to js-yaml, which removes sprintf-js (GHSA-hp3w-g68c-fv3c, no fixed version exists). js-yaml 3 loads argparse only in its command-line tool (bin/js-yaml.js), which wp-env never runs; wp-env calls yaml.dump() and yaml.safeLoad() of the library.

Not resolved here: the four simple-git alerts (GHSA-v5rq-49vh-5v5c, GHSA-x6jw-m9v5-85vh, GHSA-g4wm-2vf7-vfgr, GHSA-858h-whjf-mvg5). The fixed version is 4.x, which removed the default export that wp-env 11.17.0 uses (const SimpleGit = require( 'simple-git' )), so an override would break wp-env start. Upstream moved wp-env to simple-git 4 in WordPress/gutenberg#84137, merged on 2026-10-07 after 11.17.0 was published the same day; the next wp-env release should carry it.

npm audit after this change: 3 critical (all the simple-git chain), nothing else.

How was it tested?

  • npm install, npm ls (the chains above), npm audit.
  • wp-env start with the updated tooling, then RestoreImportTest through bin/test-integration.sh (16 tests, 810 assertions, OK).
  • Full suites on the head commit at default counts, single site and multisite (figures in the last comment), and CI.

Checklist

  • composer lint, composer analyse, composer test:unit and npm run test:integration pass (no PHP changed; integration through CI)
  • Works on PHP 7.4 (no PHP changed)
  • New endpoints check capabilities and nonces, with tests (none)
  • Output escaped, strings translatable (wp-checkpoint) (none)
  • Behaviour or archive format changes are described above (none)
  • All commits are signed off (git commit -s)

Development dependencies only; nothing here ships in the plugin. wp-env
moves to 11.17.0 within its range; http-cache-semantics to 4.3.0 and qs
to 6.16.0, the versions the advisories end at (qs by an override, as
express pins the vulnerable patch range); argparse to 2.0.1 by an
override, which drops sprintf-js (no fixed version exists; js-yaml 3
uses argparse only in its command-line tool, which wp-env does not run).
simple-git stays at 3.36.0: wp-env 11.17.0 requires the 3.x API (the
default export 4.0 removed), and the upstream change to simple-git 4
(WordPress/gutenberg#84137) was merged after 11.17.0 was published.

Signed-off-by: Hannes Gao <7233642+hannesgao@users.noreply.github.com>
Signed-off-by: Hannes Gao <7233642+hannesgao@users.noreply.github.com>
@hannesgao

Copy link
Copy Markdown
Member Author

Full suites on the head commit 0525e1d, default counts: single site 907 tests, 0 failures, 25 skipped; multisite 907 tests, 0 failures, 4 skipped. CI: 28 checks passed.

@hannesgao
hannesgao merged commit fd8c037 into main Oct 11, 2026
28 checks passed
@hannesgao
hannesgao deleted the chore-npm-audit branch October 11, 2026 18:55
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.

1 participant