Skip to content

Clear npm audit findings in dev dependencies (@wordpress/scripts tree) #26

Closed

Description

@Herm71

Problem

npm ci in CI (first seen on #25) reports 96 vulnerabilities: 2 critical, 35 high, 59 moderate.

All of them are in dev dependencies. npm ls --omit=dev is empty, and the release zip contains no npm packages. They run on developer machines and in CI only.

  • The only direct dependency flagged is @wordpress/scripts (high, through its dependency tree). npm audit says the fix is @wordpress/scripts 36.1.0, a semver-major upgrade from the current ^34.

  • The two critical advisories are transitive, from the webpack dev-server tree:

    • proxy-addr: IP spoofing via an IPv4-mapped IPv6 trust subnet.
    • websocket-driver: resource-limit bypass via compression, and message corruption via length headers.

    This plugin has no src/ and never runs wp-scripts start, so that code is installed but never executed.

What uses @wordpress/scripts here

  • wp-scripts plugin-zip: the release build (npm run zip, release.yml).
  • wp-scripts format: the pre-commit hook and the CI formatting check.
  • wp-scripts lint-pkg-json: CI.
  • lint:js / lint:style scripts exist but nothing runs them.

Fix

  • Try npm audit fix (no --force) first, and see what's left.
  • Upgrade @wordpress/scripts to the version npm audit recommends (36.x).
  • Check the Node requirement of the new version against Move CI and release workflows off deprecated Node.js 20 #27.
  • Check plugin-zip still produces a single jc-core-functionality/ root folder containing vendor/, acf-json/ and LICENSE. tests/update-checker-config.test.js covers the files list but not the zip layout.
  • Check wp-scripts format output is unchanged, or commit the new formatting separately; the CI format check will flag drift.
  • Check lint:pkg-json still passes.
  • Re-run npm audit and record what's left, if anything, with a reason.

Acceptance

  • npm audit has no critical or high findings, or each one left is explained in this issue.
  • CI is green, and a release zip built locally has the same layout as v1.2.0's.

Activity

  1. added this to the v1.3.0 — Maintenance milestone on Oct 7, 2026
  2. added
    securitySecurity hardening
    toolingBuild, lint, CI, release tooling
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitySecurity hardeningtoolingBuild, lint, CI, release tooling

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions