Repository navigation
fix: update axios and js-yaml to resolve semgrep findings - #62
joelkeener wants to merge 3 commits into
Conversation
Ref:AUTOTOOL-5480
Ref:AUTOTOOL-5480
| "brace-expansion": "^5.0.12", | ||
| "deepmerge": "^4.3.1", | ||
| "diff": "^9.0.0", | ||
| "flatted": "^3.4.2", | ||
| "follow-redirects": "^1.16.0", | ||
| "js-yaml": "^4.1.1", | ||
| "js-yaml": "^4.3.2", | ||
| "math-expression-evaluator": "^1.4.0", | ||
| "merge-lite": "^1.0.2", | ||
| "minimatch": "^10.2.5", | ||
| "minimatch": "^11.0.5", | ||
| "mustache": "^4.2.0", | ||
| "picomatch": "^4.0.4", |
There was a problem hiding this comment.
brace-expansion, diff, flatted, follow-redirects, minimatch, and picomatch are not directly used by f5-fast-core. I think they can be safely removed.
If they were being used to override sub-dependency versions, we can use the overrides option instead.
There was a problem hiding this comment.
Agreed, none of these are imported anywhere, so I removed brace-expansion, diff, flatted, follow-redirects, minimatch and picomatch from dependencies.
They still resolve as transitive dependencies at patched versions, so no overrides were needed, except:
follow-redirects (via axios) now has an override as a hard floor (^1.16.3).
minimatch is covered by the existing dev-only override, which stays because mocha and nyc pin older majors.
picomatch is no longer installed. npm audit reports 0 vulnerabilities, and tests and lint pass.
Ref:AUTOTOOL-5480
| "follow-redirects": "^1.16.3", | ||
| "glob": "^14.0.6", | ||
| "minimatch": "^11.0.8" |
There was a problem hiding this comment.
Can we change this override block to avoid overriding older, non-vulnerable packages?
"overrides": {
"mocha": {
"glob": "^14.0.6",
"minimatch": "^11.0.8"
},
"nyc": {
"glob": "^14.0.6"
},
"test-exclude": {
"glob": "^14.0.6",
"minimatch": "^11.0.8"
}
}We can also drop follow-redirects because the axios update already fixes this.
| "follow-redirects": "^1.16.0", | ||
| "js-yaml": "^4.1.1", | ||
| "axios": "^1.21.1", | ||
| "deepmerge-ts": "^8.0.2", |
There was a problem hiding this comment.
Suggest keeping deepmerge and allowlisting the advisory instead of swapping to deepmerge-ts
GHSA-gcqx-w48m-w2h4 looks like a false positive, and the replacement has its own problems.
The advisory has been rejected upstream
- CVE-2026-93753 was marked Rejected in NVD on 2026-11-02 ("does not describe a security vulnerability"). VulnCheck, the CNA, rejected it after a dispute:
Object.prototypeis never modified, and the null-target case only lets an attacker set values they could set as plain own keys anyway. See TehShrike/deepmerge#285 and #273. - The GitHub advisory hasn't been withdrawn yet. github/advisory-database#10910 asks GitHub to withdraw it.
- The maintainer closed the report and no fix is coming. The latest release is still 4.3.1.
Problems with deepmerge-ts
- It fails to load in mystique's Node 8 build. Its
mainis./dist/index.cjswith no rootindex.js. Mystique's Babel step with--copy-fileswritesdist/index.jsinstead, so on Node 8.17 I gotCannot find module 'deepmerge-ts'.lib/template.jsrequires it at load time, so the worker would fail at startup. - Results are no longer cloned. Editing the return value of
getCombinedParameters({})changedtemplate.defaultParameters, and a later call returned the edited default. On 0.26.1 defaults were unaffected. __proto__is kept as an own key. WithskipValidation: true, a{"__proto__":{"injected":"PWNED"}}parameter renderedPWNEDinto a{{injected}}placeholder. On 0.26.1 it rendered an empty string. The validated path rejected my payload.
I ran the six template sets in test/templatesets and all 44 in mystique's templates/ through both versions, and the output was identical. The differences above are outside what those cover.
Suggestion: keep deepmerge@^4.3.1 and allowlist GHSA-gcqx-w48m-w2h4 and 1243505, noting that the CVE was rejected. Drop the allowlist entry once GitHub withdraws the advisory.
Proposed changes
Upgrades vulnerable dependencies to resolve the Semgrep Supply Chain findings (
Semgrep_Supply_Chain_Findings_2026_11_12.csv).npm auditnow reports 0 vulnerabilities.Production dependencies
axios^1.15.2→^1.21.1(lockfile 1.21.1). Addresses GHSA-m8m8-qj5v-23w3 (prototype pollution), GHSA-mghh-pgcx-3jjj (shouldBypassProxyReDoS), and relatedNO_PROXY,config.proxy, redirectProxy-Authorizationleak and cookies ReDoS advisories.js-yaml^4.1.1→^4.3.2(lockfile 4.3.2). Addresses GHSA-2883-xcg3-v3hh (merge keys), GHSA-5p4m-2wfm-xmqj (!!omap) and the merge-chain advisory CVE-2026-59869. Stays on 4.x to avoid the 5.x major bump.adm-zip^0.5.10→^0.6.1.deepmergereplaced withdeepmerge-ts^8.0.2(GHSA-gcqx-w48m-w2h4; no patcheddeepmergerelease exists).lib/template.jsusesdeepmergeCustomwith a last-value-winsmergeArrays, so the two formerarrayMerge: arrayMergeOverwritecall sites still overwrite arrays.brace-expansion,diff,flatted,follow-redirects,minimatchandpicomatch, per review. None are imported by this repo. They resolve only as transitive dependencies at patched versions, andpicomatchis no longer installed.overridespinsfollow-redirectsto^1.16.3(resolves 1.16.3 viaaxios) as a version floor.form-datais 4.0.6 in the lockfile.Dev dependencies
mocha^11.7.5→^12.0.3, which clears thediffandserialize-javascriptfindings. Mocha 12 requires Node^20.19.0 || >=22.12.0.overridespinglobto^14.0.6andminimatchto^11.0.8, becausemochaandnycstill depend on older majors that have no patched release.js-yaml(vianyc) is refreshed from 3.14.2 to 3.15.2.npm audit fixrefreshed the lockfile forajv,uuid,@babel/core,browserslist,baseline-browser-mappingand nestedbrace-expansion.CHANGELOG.mdhas a new v0.26.2 entry. The version inpackage.jsonis not bumped.Not covered:
nockmocks, with no live-network or proxy test.deepmerge-tsalso mergesMapandSetvalues, whichdeepmergedid not. Templates only merge plain JSON and YAML data, so no change is expected.npm ciornpm run audit-production.Checklist
contributing guidelines.npm test171 passing,npm run test.cli24 passing,npm run lintclean.)README.mdand/orCHANGELOG.md). (CHANGELOG only.)Ref: AUTOTOOL-5480