(8.1) OTOOLS-115: Remove and upgrade vulnerable dependencies - #302
Open
sencha-digit wants to merge 1 commit into
Open
(8.1) OTOOLS-115: Remove and upgrade vulnerable dependencies#302sencha-digit wants to merge 1 commit into
sencha-digit wants to merge 1 commit into
Conversation
- Drop node-find-folder (pulled is-file flagged by Kiuwan as CVE-2007-1536, plus vulnerable glob@7/minimatch@3.1.2/brace-expansion chain); replaced with a local fs-based findFolder() in both viewpackage.js files - Drop unused glob dependency from ext-gen - Drop uuid; generate v4 UUIDs via crypto.randomBytes (works on all Node versions, no dependency) - Replace abandoned prompt-list/prompt-input/prompt-confirm (toggle-array prototype-pollution advisories, no fix upstream) with the maintained 'prompts' package behind a same-API shim (prompt.js) - Bump cross-spawn ^7.0.6, lodash ^4.18.1, underscore ^1.13.8 - Declare semver explicitly (was only satisfied transitively via cross-spawn@6, which dropped it in v7) - Generated-app templates: add npm overrides pinning cross-spawn ^6.0.6 (fixes @sencha/ext-webpack-plugin -> cross-spawn-with-kill high advisory) and replace -> minimatch ^3.1.5; keep webpack-dev-server ^4.2.1 for Node 12+ compatibility Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Jira
OTOOLS-115 — Sencha ExtGen and Cmd uses library with known vulnerabilities (customer portal ticket 60478)
Findings
npm auditreported 15 vulnerabilities inpackages/ext-gen(3 high) and 6 inpackages/ext-build(3 high), and a freshly generated app reported 6 more (3 high), including the customer's original complaint:@sencha/ext-webpack-plugin → cross-spawn-with-kill → cross-spawn <6.0.6(ReDoS, GHSA-3xgq-45jj-v275, "no fix available"). A Kiuwan scan additionally flagged CVE-2007-1536 — a false positive triggered byjsdevelstrings inside theis-filepackage, a dependency ofnode-find-folder.Root cause
node-find-folder@0.1.32(unmaintained) pulledis-file(the Kiuwan flag) and a staleglob@7 → minimatch@3.1.2 → brace-expansion@1.1.12chain — used in exactly two files just to locate a folder namedview.globwas declared by ext-gen but never used;uuid@^3andunderscore@^1.9/lodashranges predated fixed releases.prompt-list/prompt-input/prompt-confirmare abandoned upstream; theirtoggle-arrayprototype-pollution advisories have no fixed versions.cross-spawnpulled by@sencha/ext-webpack-plugin(separate repo).Fix
node-find-folderfrom ext-gen and ext-build; replaced with a localfs-basedfindFolder()in bothgenerate/viewpackage.jsfiles (with a clear error when noviewfolder exists).globfrom ext-gen.uuid; v4 UUIDs now come from a dependency-freecrypto.randomByteshelper (works on all Node versions, including the Node 14 build machine).prompt-*packages with the maintainedpromptsbehind a same-API shim (packages/ext-gen/prompt.js) — all 17 interactive call sites unchanged.cross-spawn→^7.0.6,lodash→^4.18.1,underscore→^1.13.8; declaredsemverexplicitly (previously satisfied only transitively via cross-spawn 6, which dropped it in v7 — latent breakage fixed)."overrides": { "cross-spawn": "^6.0.6", "replace": { "minimatch": "^3.1.5" } }(productizes the workaround documented on the Jira ticket).webpack-dev-serverstays at^4.2.1deliberately — wds 5/6 require Node ≥18.12/≥22.15 and would break users on Node 12–16.Verification
npm audit: 0 vulnerabilities inext-build-generate-app; ext-gen and ext-build each show only 2 moderates that trace to the published@sencha/ext-build-generate-app@8.0.0(registry copy still declaresuuid@^3) — they clear automatically when the three packages publish together from this change.ext-gen app -a -t moderndesktop): highs eliminated (cross-spawn@6.0.6 overriddenconfirmed in the tree); dev server boots and serves HTTP 200;ext-gen viewpackage settings -t basicexercises the newfindFolder()and generates all files correctly;app.jsongets a valid v4uniqueId.npm installclean with no engine errors, all changed files parse and run, prompt shim / findFolder / UUID helper verified, CLI works.Known residual
Generated apps retain 3 moderate advisories, all one cluster:
webpack-dev-server@4+ itssockjs → uuidtransitives. No fix exists inside the wds 4/5 lines; clearing them requireswebpack-dev-server@6, which needs Node ≥22.15. Users on Node ≥22 can opt in by bumpingwebpack-dev-serverto^6.0.0in their generated app.🤖 Generated with Claude Code