npm security audit fixes#1924
Merged
Merged
Conversation
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.
ERN Platform — CVE Remediation Summary
Overview
Remediates 14 unique CVEs identified in the ERN Platform Vulnerability Assessment across 8 ERN packages (v0.53.7). The platform is sunsetting in ~1 year, so only targeted security patches are applied — no feature changes.
Each vulnerable package was evaluated against the 6-tier Fix Classification Decision Tree, starting at Priority 1 (most preferred) and escalating only when higher-priority fixes were not viable.
Per-Package Decision Tree Analysis
1.
semver— ReDoS VulnerabilityDependency chain:
ern-api-impl-gen→semver@7.3.5(direct)semveris a direct dependency ofern-api-impl-gen. Bumping7.3.5→^7.5.2is a semver-compatible minor/patch upgrade. No API changes — drop-in replacement.Fix applied: Updated
ern-api-impl-gen/package.json—"semver": "7.3.5"→"semver": "^7.5.2"Additional: Added
"semver": "^7.5.2"to rootresolutionsto cover any other transitive instances across the monorepo.2.
@octokit/rest— Multiple CVEs in v18 Transitive Dependency TreeDependency chain:
ern-core→@octokit/rest@18.5.3(direct),ern-orchestrator→@octokit/rest@18.5.3(direct)^20.1.1and adaptedGitHubApi.tsto handle Octokit v20 breaking changes.Fix applied:
ern-core/package.json—"@octokit/rest": "18.5.3"→"@octokit/rest": "^20.1.1"ern-orchestrator/package.json—"@octokit/rest": "18.5.3"→"@octokit/rest": "^20.1.1"ern-core/src/GitHubApi.ts— Two categories of code changes:Buffer.from()encoding — Adapted content encoding to match Octokit v20's API contract: Promise<any>return type annotations — Added explicit return types oncreateBranch,deleteBranch,createTag,deleteTag, andupdateFileContentto resolve TypeScript compilation errors caused by Octokit v20's overhauled type definitions3.
plist/xmldom— XML Parsing VulnerabilityDependency chain:
ern-core→xcode-ern→simple-plist→plist→xmldomplistis not a direct dependency — it's 3 levels deep.xcode-ernis abandoned — no newer version exists with updated transitive deps.xcode-ernis a forked Xcode project parser tightly integrated into ERN's iOS container generation. Replacing it would require significant refactoring beyond security-patch scope.plistto^3.0.5across the monorepo, which includes the patchedxmldom.Fix applied: Root
package.jsonresolutions —"plist": "^3.0.5"4.
simple-plist— Inherited Vulnerability viaplistDependency chain:
ern-core→xcode-ern→simple-plist@1.1.0xcode-ernis abandoned.simple-plistto^1.3.1which depends on the patchedplist.Fix applied: Root
package.jsonresolutions —"simple-plist": "^1.3.1"5.
deep-extend— Prototype PollutionDependency chain: Transitive dependency via archived/unmaintained parent packages
deep-extendto^0.6.0which includes the prototype pollution fix.Fix applied: Root
package.jsonresolutions —"deep-extend": "^0.6.0"6.
ip— SSRF VulnerabilityDependency chain: Transitive via
http-proxy-agentchainipversion.ipto^2.0.1which patches the SSRF vulnerability.Fix applied: Root
package.jsonresolutions —"ip": "^2.0.1"7.
validator— ReDoS VulnerabilityDependency chain:
ern-api-gen→sway→json-refs→path-loader→ ... →validatorswayhas only one published version — no upgrade path exists.swayis a Swagger validation library deeply integrated into ERN's API generation. Replacing it is out of scope.validatorto^13.15.22which includes the ReDoS fix.Fix applied: Root
package.jsonresolutions —"validator": "^13.15.22"8.
trim-newlines— ReDoS VulnerabilityDependency chain: Transitive dependency via unmaintained parent packages
trim-newlinesto^3.0.1which includes the ReDoS fix.Fix applied: Root
package.jsonresolutions —"trim-newlines": "^3.0.1"9.
@tootallnate/once— Transitive Vulnerability viahttp-proxy-agentDependency chain: Transitive via
http-proxy-agent→agent-base→@tootallnate/once@tootallnate/onceto>=3.0.1.Fix applied: Root
package.jsonresolutions —"@tootallnate/once": ">=3.0.1"Summary of Fix Distribution
semver@octokit/rest(2 packages + 1 source file)plist,simple-plist,deep-extend,ip,validator,trim-newlines,@tootallnate/onceWhy Are Most Fixes P6 (Yarn Resolutions)?
The majority of vulnerable packages are deeply nested transitive dependencies behind abandoned (
xcode-ern), archived (code-push), single-version (sway), or deprecated (bugsnag-sourcemaps) parent packages. With no upstream maintainer to release patched versions, yarn resolutions are the only mechanism to force safe versions without forking or replacing entire dependency subtrees — which would be disproportionate effort for a platform sunsetting in ~1 year.Files Changed
package.json(root)resolutionsblock with 8 transitive dependency overridesern-api-impl-gen/package.jsonsemver:7.3.5→^7.5.2ern-core/package.json@octokit/rest:18.5.3→^20.1.1ern-orchestrator/package.json@octokit/rest:18.5.3→^20.1.1ern-core/src/GitHubApi.tsBuffer.from()updates +: Promise<any>return type annotationsyarn.lockregistry.yarnpkg.com)Validation
yarn installcompletes successfullyyarn buildpasses across all packagesyarn auditconfirms all 14 original CVEs resolvedyarn.lockuses only public registry (registry.yarnpkg.com) — no internal registry referencesern run-android/ern run-iosruntime validation against a consumer miniapp