Merged
Conversation
92a125b to
3e902e3
Compare
nandakishoreleburu-rgb
approved these changes
Apr 29, 2026
Collaborator
nandakishoreleburu-rgb
left a comment
There was a problem hiding this comment.
"yarn": "^1.22.10" is still in the
electrode-native/ern-core/package.json
Line 74 in 92a125b
Just update the PR description from 14 to 13 packages fix.
We can take the yarn in another PR
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 13 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.
Two-Phase Approach
Per-Package Decision Tree Analysis
1.
semver— ReDoS VulnerabilityDependency chain: Direct dependency in 11 ERN packages
semveris a direct dependency. Bumping^7.3.5→^7.5.2is a semver-compatible minor/patch upgrade. No API changes — drop-in replacement.Fix applied:
semverfrom^7.3.5→^7.5.2across all 11 packages that depend on it:ern-core,ern-api-gen,ern-api-impl-gen,ern-cauldron-api,ern-composite-gen,ern-container-gen,ern-container-gen-android,ern-container-gen-ios,ern-local-cli,ern-orchestrator,ern-runner-gen-ios"semver": "^7.5.2"to rootresolutionsto cover any transitive instances.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 Vulnerabilities (CVE-2021-37712, CVE-2022-39353)Dependency chain:
ern-core→xcode-ern→simple-plist→plist→xmldomxcode-ernis abandoned — no newer version exists.xcode-ernasern-xcode. Updatedsimple-plistfrom^0.2.1→^1.3.1which includes patchedplist/xmldom. Also removeduuiddependency entirely (replaced with Node.js built-incrypto.randomUUID()), fixing CVE-2024-6096.Fix applied (Phase 2 — Published Package Fix):
ern-xcode@1.0.14with updated depsern-xcodeinstead ofxcode-ern:ern-core/package.json—"xcode-ern": "^1.0.13"→"ern-xcode": "^1.0.14"ern-api-impl-gen/package.json— sameern-container-gen/package.json— sameern-container-gen-ios/package.json— sameimport xcode from 'xcode-ern'→import xcode from 'ern-xcode')typings/modules.d.tsdeclarations4.
bugsnag-sourcemaps→@bugsnag/source-maps— deep-extend & trim-newlines CVEsDependency chain:
ern-core→bugsnag-sourcemaps→deep-extend,trim-newlinesbugsnag-sourcemapsis deprecated — no newer version.@bugsnag/source-mapsexists with proper TypeScript types and no vulnerable transitive deps.Fix applied (Phase 2 — Published Package Fix):
ern-core/package.json—"bugsnag-sourcemaps": "^1.3.0"→"@bugsnag/source-maps": "^2.3.3"ern-core/src/bugsnagUpload.ts— Rewrote to use@bugsnag/source-mapsAPI (reactNative.uploadOne())5.
code-push— @tootallnate/once & ip CVEsDependency chain:
ern-core→code-push@4.0.5→superagent-proxy→proxy-agent@5→pac-proxy-agent→@tootallnate/once,pac-resolver→ipcode-push@4.2.3(latest) removedsuperagent-proxyentirely and replaced it withproxy-agent@^6.3.0as a direct dependency. API is fully backward compatible — same constructor signature and methods.Fix applied (Phase 2 — Published Package Fix):
ern-core/package.json—"code-push": "4.0.5"→"code-push": "4.2.3"6.
sway→ern-sway— validator & deep-extend CVEsDependency chain:
ern-api-gen→sway@1.0.0→z-schema@^3.16.1→validator@^10.0.0(vulnerable to 3 CVEs)ern-api-gen→sway@1.0.0→json-schema-faker@^0.2.8→deref→deep-extend(CVE)sway@1.0.0usesz-schema@^3.xwhich pinsvalidator@^10.0.0(forever vulnerable). Evensway@2.0.6still usesz-schema@^3.22.0.sway@2.0.6asern-sway. Updatedz-schemafrom^3.22.0→^5.0.6(which usesvalidator@^13.7.0→ resolves to 13.15.35, fixing all 3 validator CVEs). Also benefits fromjson-schema-faker@^0.5.0which dropped thederef/deep-extendchain.Fix applied (Phase 2 — Published Package Fix):
ern-sway@2.0.8withz-schema@^5.0.6ern-api-gen/package.json—"sway": "^1.0.0"→"ern-sway": "^2.0.7"ern-api-gen/src/java/Swagger.ts— Updated all 5 imports fromsway→ern-swayindex.d.tsin fork:declare module 'sway'→declare module 'ern-sway'Summary of Fix Distribution
semver(11 packages)@octokit/rest(2 packages + 1 source file)code-push(version bump 4.0.5 → 4.2.3)xcode-ern→ern-xcode,bugsnag-sourcemaps→@bugsnag/source-maps,sway→ern-swayPhase 1 → Phase 2 Evolution
In Phase 1, 7 of 9 fixes relied on P6 Yarn Resolutions — the quickest fix for the workspace but ineffective for published packages. Phase 2 replaced all P6 resolutions with proper P1–P5 fixes by forking abandoned packages, replacing deprecated packages with maintained alternatives, and upgrading where newer versions existed. All 13 CVEs are now resolved in both the workspace AND published packages.
Files Changed
Phase 1 (Workspace Fixes)
package.json(root)resolutionsblock with transitive dependency overridesern-core/src/GitHubApi.tsBuffer.from()updates +: Promise<any>return type annotationsyarn.lockregistry.yarnpkg.com)Phase 2 (Published Package Fixes)
ern-core/package.jsonxcode-ern→ern-xcode@^1.0.14,bugsnag-sourcemaps→@bugsnag/source-maps@^2.3.3,code-push4.0.5 → 4.2.3,@octokit/rest→^20.1.1,semver→^7.5.2ern-core/src/bugsnagUpload.ts@bugsnag/source-mapsAPIern-core/src/iosUtil.tsern-xcodeern-core/typings/modules.d.tsdeclare module 'ern-xcode'ern-api-gen/package.jsonsway→ern-sway@^2.0.7,semver→^7.5.2ern-api-gen/src/java/Swagger.tsern-swayern-api-impl-gen/package.jsonxcode-ern→ern-xcode@^1.0.14,semver→^7.5.2ern-api-impl-gen/src/.../ApiImplIosGenerator.tsern-xcodeern-api-impl-gen/typings/modules.d.tsdeclare module 'ern-xcode'ern-container-gen/package.jsonxcode-ern→ern-xcode@^1.0.14,semver→^7.5.2ern-container-gen-ios/package.jsonxcode-ern→ern-xcode@^1.0.14,semver→^7.5.2ern-container-gen-ios/src/IosGenerator.tsern-xcodeern-container-gen-ios/typings/modules.d.tsdeclare module 'ern-xcode'ern-orchestrator/package.json@octokit/rest→^20.1.1,semver→^7.5.2ern-cauldron-api/package.jsonsemver→^7.5.2ern-composite-gen/package.jsonsemver→^7.5.2ern-container-gen-android/package.jsonsemver→^7.5.2ern-local-cli/package.jsonsemver→^7.5.2ern-runner-gen-ios/package.jsonsemver→^7.5.2typings/modules.d.ts(root)declare module 'ern-xcode'External Forks Published to npm
ern-xcode@1.0.14xcode-ernsimple-plist→^1.3.1, removeduuid(usescrypto.randomUUID())ern-sway@2.0.8swayz-schema→^5.0.6,json-schema-faker→^0.5.0Validation
yarn installcompletes successfullyyarn buildpasses across all 15 packagesyarn test:unit)yarn.lockuses only public registry (registry.yarnpkg.com)