fix(deps): resolve serialize-javascript RCE, uuid + fast-uri advisories (+Claude) - #230
fix(deps): resolve serialize-javascript RCE, uuid + fast-uri advisories (+Claude)#230dhruv-parekh-cs wants to merge 5 commits into
Conversation
npm advisories 11 -> 4.
Overrides added (transitive, no direct upgrade reaches them):
serialize-javascript ^7.1.1 RCE via RegExp.flags/Date + CPU-exhaustion DoS (was 6.0.2, high)
uuid ^11.1.1 missing buffer bounds check in v3/v5/v6 (stale 8.3.2 copy)
Raised stale override:
fast-uri ^3.1.5 -> ^3.1.7 SNYK-JS-FASTURI-19502739 / -19502854 (both high,
newly published by Snyk during this run)
NOT fixed - see PR body: adm-zip (high) needs 0.6.0, which changes
writeZipPromise from Promise<boolean> to Promise<void>; src/adapters/file-upload.ts
uses that return value as a success flag, so the bump breaks the build and
adapting it is a behavior decision. Reverted to ^0.5.18.
Validation: build green; 129 tests + 8 suites passing.
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The dependency fix in the previous commit changed package-lock.json, so its pinned .talismanrc checksum went stale and the secrets-scan check fails. Talisman flags npm's standard sha512- integrity fields as base64 'secrets'; this repo's existing convention is a checksum-pinned allowlist entry, so this refreshes that value rather than reworking the lockfile. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
🔵 Needs a closer look
Broad dependency overrides currently force versions outside some dependents’ declared semver ranges and need manual validation of compatibility/regenerated lockfile impacts.
Pull request overview
This PR updates dependency resolutions to remediate known npm advisories (including a high-severity serialize-javascript issue) primarily via npm audit fix and targeted overrides, and refreshes the repo’s Talisman allowlist checksum due to the lockfile change.
Changes:
- Bump
fast-urioverride to^3.1.7and add overrides forserialize-javascript@^7.1.1anduuid@^11.1.1. - Update
package-lock.jsonto reflect new resolved versions (notablyfast-uri,serialize-javascript,uuid, and related transitive reshaping). - Refresh
.talismanrcchecksum forpackage-lock.jsonto keep secrets-scan hooks passing.
File summaries
| File | Description |
|---|---|
| package.json | Updates npm overrides to address security advisories (fast-uri/serialize-javascript/uuid). |
| package-lock.json | Regenerates the resolved dependency tree to match updated overrides and audit fixes. |
| .talismanrc | Updates the pinned checksum entry for package-lock.json after lockfile changes. |
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Addresses Copilot review on PR #230. The global "uuid": "^11.1.1" override was a real regression: the root copy was already uuid@14.0.2 (SAFE - the advisory is uuid <11.1.1), and only istanbul-lib-processinfo's nested 8.3.2 was vulnerable. The global override therefore DOWNGRADED the safe root copy three majors, against @contentstack/cli-utilities' declared uuid ^14.0.0. Scoped both to the actual parents, matching this file's existing convention (eslint > ajv, minimatch@N > brace-expansion): "mocha": { "serialize-javascript": "^7.1.1" } "istanbul-lib-processinfo": { "uuid": "^11.1.1" } Resolved tree now: root uuid@14.0.2 (restored), istanbul's nested uuid@11.1.1 (patched), serialize-javascript@7.1.1 (patched). Same security posture as the global form - npm audit 4, snyk 1 high (adm-zip) - with no downgrade. Validation: build green; 129 tests + 8 suites passing. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Scoping the overrides changed package-lock.json again, so the pinned checksum from the earlier commit is stale. Same false-positive/allowlist convention as before (Talisman reads npm's sha512- integrity fields as base64 secrets). #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are confined to dependency overrides/lockfile updates for security remediation and appear consistent with the stated validation (install/build/tests).
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
Review comments addressed1 comment, verified as correct, fixed.
Copilot was right, and the Now scoped, matching this file's existing convention ( "mocha": { "serialize-javascript": "^7.1.1" },
"istanbul-lib-processinfo": { "uuid": "^11.1.1" }Resolved tree: root Also: branch updated from Validation: build green; 129 tests + 8 suites passing. Still needs a human: |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to dependency metadata/lockfile updates, the overrides are correctly scoped to avoid regressions, and the repository’s Node engine constraint (>=22) is compatible with the updated transitive packages’ engine requirements.
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
Harshi-Shah-CS
left a comment
There was a problem hiding this comment.
base branch needs to changed to development
|
Closing in favour of #231, which targets Not a retarget, because the bases have diverged: Most of what this PR did is already on
The only real gap left was Thanks @Copilot — the |
Summary
Automated dependency-vulnerability remediation (snyk-fix run of 03-Sep-2026). npm advisories 11 → 4, including a high-severity RCE. 1 high remains and needs a decision — see below.
RegExp.flags/Date+ CPU-exhaustion DoSserialize-javascript(transitive)6.0.2→7.1.1fast-uri(transitive)^3.1.5→^3.1.7uuid— missing buffer bounds check in v3/v5/v6 whenbufis provideduuid(transitive)8.3.2copy →11.1.114.0.2.mochanpm audit fix, non-breaking.body-parser,express,qsnpm audit fix, non-breaking.adm-zip(direct)nyc,istanbul-lib-processinfo,sinon,diffisSemVerMajorjumps of dev tooling.All three overrides use caret ranges at the loosest safe granularity, so future patches float in without another PR. Confirmed in the resolved tree:
serialize-javascript@7.1.1 overridden,uuid@11.1.1 overridden,fast-uri@3.1.7.adm-zipneeds a behavioural decisionThe advisory requires
adm-zip@0.6.0. Under 0.x semver a minor bump is the breaking boundary, and this one really is breaking:writeZipPromisechanged fromPromise<boolean>toPromise<void>.The bump was attempted and the TypeScript build caught it:
The code at
src/adapters/file-upload.ts:339uses that return value as a success flag:On
0.6.0,statusis alwaysundefined, soif (!status)would fire on every successful zip — turning a working upload into an unconditionalexit(1). Deciding how success should now be detected (rely solely on the.catch? stat the output file?) changes runtime behaviour, which this skill does not do unattended. Reverted to^0.5.18.Mitigating context for prioritisation: the advisory is about reading a crafted ZIP, and this code path only writes archives (
addLocalFolder,addLocalFile,writeZipPromise). That is not a reason to leave it — just useful for triage.Ecosystem-native audit pass (npm)
npm audit fix(non-breaking,--forcenever used) resolved 3 → 8 remainingserialize-javascripthigh) → 4 remainingadm-zip→0.6.0,nyc→18.0.0,sinon→22.1.0 (allisSemVerMajor)Self code review
One review round. No High or Medium findings on the diff.
fast-uri ^3.1.5is exactly the rot step 2.5 exists to catch: still applying, but below the patched version. Raised rather than removed, since it's still doing real work.adm-ziprevert was verified by rebuilding (green) rather than assumed; the API surface actually used was checked method-by-method against0.6.0before the attempt.package.json+package-lock.json, plus.talismanrc(below).Second commit —
.talismanrcchecksum refreshThe lockfile change made this repo's pinned
.talismanrcchecksum forpackage-lock.jsonstale, so the secrets-scan pre-commit hook fails. Talisman flags npm's standardsha512-integrity fields as base64 "secrets" — a false positive, and this repo's existing convention (see its.talismanrchistory) is a checksum-pinned allowlist entry rather than reworking the lockfile. The value was computed from the committed blob (talisman --checksum) and committed separately; the hook passes on that commit, which is what confirms the refresh is correct.Validation
npm install— cleannpm run build(tsc -b+ oclif manifest) — greennpm test— 129 tests, 8 suites, all passingsnyk test --all-projectsre-scan — theserialize-javascript/uuid/fast-urifindings are gone; 1 remaining (the unfixableadm-ziphigh)