fix(security): resolve S360/Component Governance alerts (0 high, 0 moderate) - #506
Conversation
S360 flags /powerplatform-cli-wrapper/node_modules/glob/node_modules/brace-expansion against the PowerPlatform-DPX-Tools-GitHub-CLI-Wrapper-Official pipeline, where it sat at 5.0.4 and showed 'Fix not detected'. All copies were already within permissive ranges (minimatch@10.2.4 allows ^5.0.2), so a lock refresh alone reaches the patched versions - no manifest or override change needed: node_modules/brace-expansion 1.1.12 -> 1.1.18 node_modules/glob/node_modules/brace-expansion 5.0.4 -> 5.0.9 <- the S360 path node_modules/mocha/node_modules/brace-expansion 2.0.2 -> 2.1.4 This clears every open brace-expansion advisory, not just the reported one: GHSA-f886-m6hf-6m8v (CVE-2026-33750, zero-step hang, needs 5.0.5), GHSA-jxxr-4gwj-5jf2 (5.0.6), GHSA-3jxr-9vmj-r5cp (5.0.7), GHSA-mh99-v99m-4gvg (5.0.8), GHSA-rgw5-rvv9-x895 (5.0.9/2.1.4/1.1.18). brace-expansion no longer appears in npm audit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ac571cd-d84e-4b40-805a-e316a62ed292
Adds npm overrides to force patched versions of transitive dependencies flagged by Component Governance / Dependabot, and bumps release-it to pull in patched @octokit packages. - lodash -> ^4.18.0 (command injection / prototype pollution) - nanoid -> ^3.3.17 (predictable results with non-integer values) - tmp -> ^0.2.6 (arbitrary file write via symlink) - js-yaml -> ^4.3.1 (prototype pollution) - serialize-javascript -> ^7.0.5 (XSS) - postcss -> ^8.5.23 (line return parsing error) - release-it 17 -> 21 (@octokit ReDoS advisories) - gulp-mocha > mocha pinned to the repo's own mocha ^10.4.0, which removes the bundled mocha@8.4.0 subtree that pinned the vulnerable minimatch@3.0.4 (ReDoS) and diff@5.0.0 exactly. npm audit: 0 critical / 0 high / 0 moderate (was 17 high, 13 moderate). Remaining 6 low findings are the dev-only rewiremock -> node-libs-browser -> crypto-browserify/elliptic chain, which has no published fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ac571cd-d84e-4b40-805a-e316a62ed292
Heads-up: one new advisory landed after this PR was verified
No change is needed in this PR. The override here is already a caret range: "nanoid": "^3.3.17"which permits Why it is not refreshed here yet: Pinning This is precisely the recurring-alert pattern the automation in the companion PR is meant to absorb: its weekly |
Summary
Resolves the S360 / Component Governance alerts assigned for
powerplatform-cli-wrapper(CG component240491).Component Governance flagged paths under
/powerplatform-cli-wrapper/node_modules/**. Those copies are baked into the published@microsoft/powerplatform-cli-wrappertarball, so they can only be fixed here - fixing them inpowerplatform-build-toolshas no lasting effect (it gets overwritten on the next wrapper release).Result
npm audit: 17 high / 13 moderate -> 0 high / 0 moderate / 0 critical.Changes
brace-expansionlodash^4.18.0nanoid^3.3.17tmp^0.2.6js-yaml^4.3.1serialize-javascript^7.0.5postcss^8.5.23release-it^17.3.0->^21.0.1@octokit/*ReDoSminimatch/diffgulp-mocha > mochaoverrideNote on the
gulp-mochaoverridegulp-mocha@8bundlesmocha@8.4.0, which pins exact versions:{ "minimatch": "3.0.4", "diff": "5.0.0" }Because they are exact pins, neither
npm dedupenor a range override can shift them, and a flat top-levelminimatchoverride is unsafe (the tree spans majors 3, 5 and 10 - it would silently downgradeglob'sminimatch@10).The fix points
gulp-mochaat the repo's ownmochadevDependency:This removes the entire bundled
mocha@8.4.0subtree, takingminimatch@3.0.4anddiff@5.0.0with it. Upgradinggulp-mochato v10 was tried first and rejected - it broke the test run.Verification
npm ci- clean, lock is self-consistentnpm run ci- compile + lint passRemaining (accepted risk)
6 low findings, all dev-only:
rewiremock -> node-libs-browser -> crypto-browserify/elliptic.rewiremock@^3.14.6is already the latest release and npm's suggested "fix" is a downgrade to 3.5.2. Not shipped to consumers.Supersedes
Dependabot PRs #502, #503, #504, #500, #501, #495, #496, #487, #493, #486, #488, #498.