fix(deps): clear production npm audit advisories - #146
Open
BenSheridanEdwards wants to merge 1 commit into
Open
BenSheridanEdwards wants to merge 1 commit into
BenSheridanEdwards wants to merge 1 commit into
Conversation
The production audit reported 24 high and 1 low advisory. All 25 entries resolve to nine transitive leaf packages; no advisory targets wdio, appium or webdriverio themselves, so npm's suggested @wdio/local-runner@7.40.0 remedy is a major downgrade of the runner that fixes nothing at the source. Pin the vulnerable leaves with npm overrides instead, keeping each within its own major line where a patched release exists: - brace-expansion 1.1.18 / 2.1.4 / 5.0.9 (per-major selectors; three copies) - undici 6.28.0 / 7.29.0 (two copies) - body-parser 2.3.0, fast-uri 3.1.6, js-yaml 4.3.2, shell-quote 1.10.0 - deepmerge-ts 8.0.2 — major bump; latest wdio 9.31.4 still pins ^7.0.3, so no wdio release clears this and an override is the only lever - @puppeteer/browsers 3.2.1 — drops extract-zip, whose advisory (GHSA-jmr9-qjv8-65gv) covers all published versions and has no fix Raise the appium floor to ^3.7.0; @appium/support 7.2.7 already carries patched shell-quote and body-parser, clearing the @appium/* cluster. npm audit --omit=dev --audit-level=high now exits 0 with no residue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The production audit reported 24 high + 1 low advisories and blocked the
NativeProof checksBuildkite pipeline. All 25 entries collapse to ninetransitive leaf packages — no advisory targets
wdio,appiumorwebdriveriothemselves. Every@wdio/*,@appium/*,webdriver,expect-webdriverioand@puppeteer/browsersentry was propagation from one ofthose leaves.
That is why npm's suggested remedy (
@wdio/local-runner@7.40.0) was rejected: itis a major downgrade of the runner that fixes nothing at the source. It only
appears because npm walked backwards looking for a wdio tree not depending on
vulnerable
deepmerge-ts.Fixed at the source with npm
overrides— the lever this repo already uses forserialize-javascript— keeping each leaf inside its own major line wherever apatched release exists:
brace-expansionundicibody-parserfast-urijs-yamlshell-quoteip-addressdeepmerge-ts@puppeteer/browsersextract-zipTwo cases needed more than a version bump:
deepmerge-ts— the newest wdio (9.31.4, already inside our^9.29.1range) still pins
deepmerge-ts@^7.0.3, so no wdio release clears this,forwards or backwards. An override is the only lever.
extract-zip— advisoryGHSA-jmr9-qjv8-65gvhas range*; latest(2.0.1) is the newest ever published and there is no patched release. Rather
than accept it as permanent residue,
@puppeteer/browsers@3.2.1drops thedependency entirely, so
extract-zipis now absent from the tree.appiumis floored at^3.7.0:@appium/support@7.2.7already carries patchedshell-quoteandbody-parser, clearing the whole@appium/*cluster withoutan override. The old
^3.5.2floor could still resolve to the vulnerable 3.5.2.No residue — nothing had to be accepted or silenced, so there is no
documented-exception section.
Proof
npm run checknpm testnpm test—package-smoke.test.tspacks the real tarball and exercises theinit/onboard scaffold (
packed package exposes the onboarding CLI bins and ESM scaffold, 1592ms). No CLI, template or device behaviour changed.All commands run from a clean
npm cion this branch.The gate that was failing:
Zero residue even at the strictest thresholds:
Repo gates:
Because the unit suite only loads
@wdio/globals, it would not have caught abroken named ESM import from the two major overrides — a bad import throws at
module load, not at call time. Verified the runtime surface explicitly:
And that
deepmerge-ts@8preserves the exact semantics wdio relies on:Risk
deepmerge-ts7 → 8 (major). wdio imports onlydeepmergeanddeepmergeCustom. v8 is purely additive on exports (addsdeepmergeFastUnsafe*,getKeysOfObjects); both used exports survive, andboth merge behaviours are asserted identical above. The real v8 break is an
engine floor of
node >=16.9.0— this package already requiresnode >=20.@puppeteer/browsers2 → 3 (major). wdio imports eight names(
install,canDownload,resolveBuildId,detectBrowserPlatform,Browser,ChromeReleaseChannel,computeExecutablePath); all are stillexported by 3.2.1, confirmed against its actual export list. This module is
only reached by
startWebDriverfor desktop-browser driver downloads, whichNativeProof's native-mobile lane never invokes.
overridesonly for the rootproject, so consumers installing the published
nativeproofpackage do notinherit these pins and may still resolve the vulnerable transitives. This PR
fixes NativeProof's own gate; propagating the pins to generated projects would
be a separate change to the init template.
Notes
no device, Appium or driver behaviour changed, so the device lane adds no
signal beyond the runtime load check above.
not per fix commit (none of the last four fix commits touched it).
PR Proof Law
.agents/DEFINITION_OF_DONE.mdand.agents/skills/pr-inline-screenshot-proof/SKILL.md., or the proof section saysNot applicablewith the technical reason.Not applicable — this change alters only the resolved dependency tree
(
package.json+package-lock.json). It renders no UI and changes noon-device behaviour, so there is no visual surface to screenshot. The
proof surface is command exit codes, reproduced verbatim above.