ATLAS-5348: Atlas React UI: Upgrading frontend transitive dependencies - #703
Open
Brijesh619 wants to merge 6 commits into
Open
ATLAS-5348: Atlas React UI: Upgrading frontend transitive dependencies#703Brijesh619 wants to merge 6 commits into
Brijesh619 wants to merge 6 commits into
Conversation
Contributor
Author
Contributor
Author
Contributor
Author
Contributor
Author
We can currently solve 0 of the remaining 3 vulnerabilities without causing major issues for this PR. Here is exactly why we can't safely fix them right now: quill (1 vuln): There is simply no patched version published on npm yet for this specific advisory (GHSA-v3m3-f69x-jf25). We are physically unable to fix it until the package maintainers release a patch. |
Brijesh619
force-pushed
the
ATLAS-5348
branch
2 times, most recently
from
August 19, 2026 05:33
d2a353c to
fbd566d
Compare
Contributor
Author
Contributor
Author
Contributor
Author
Contributor
Author
Contributor
Author
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.











What changes were proposed in this pull request?
This PR resolves ATLAS-5348 by upgrading several outdated frontend transitive dependencies in the Atlas React UI (
/dashboard).Previously, this patch relied heavily on manual
overridesinpackage.jsonto bump specific sub-dependencies. However, forcing those overrides (likeminimatch,js-yaml, andpostcss) caused "invalid tree" errors and forced modern tooling (like Vite and ESLint) backward.Instead, this PR safely updates
package-lock.json, upgrades the main libraries responsible for bringing in vulnerable sub-dependencies, and only uses an override when strictly necessary to avoid breaking changes.Main Library Upgrades:
recharts(bumped to^3.10.1): Resolves thelodashvulnerability by removing older dependencies (likevictory-vendor).react-quill-new(bumped to^3.8.3): Resolves thelodash-esvulnerability.Recharts v3 Migration & Code Quality Improvements:
Because upgrading to Recharts v3 introduced significant API changes, this PR includes a comprehensive refactor of the dashboard's charting components to ensure production stability, strict type safety, and accessibility:
anytypes across all chart components (ClassificationDistributionCard,EntityStatsChart,EntityStatusDonut,EntityTypeBarChart,MessageConsumptionChart), replacing them withunknownand strict type guards. Recharts click event payloads are now properly type-checked using a dedicatedRechartsEventPayloadinterface instead of unsafe object casting.<Tooltip>and<LabelList>components to comply with the stricter v3formattersignatures (RenderableText), and removed the manualactiveIndexstate from<Pie>which is now handled natively.<Legend>implementation inEntityStatsChart. The legacypayloadmanipulation was replaced with a customcontentrenderer utilizing native MUI<ButtonBase>components. This restores native keyboard accessibility (Enter/Spacekeys) and semantic ARIA roles without customonKeyDownhandlers. Payload parsing is wrapped inuseMemoto prevent array reallocations.sxprops, and object-based style constants (e.g.,RESPONSIVE_CONTAINER_STYLE) across charting components. These were completely migrated to semantic SCSS classes withinstats.scss. For strictly data-derived math properties (e.g. dynamic Recharts series colors), standard HTMLstyleattributes were used to safely bypass the MUI styling engine.EntityStats.test.tsxto correctly query the new custom Legend DOM structure (data-testid="legend-Active") and assert on visibility toggles rather than obsolete null checks. Additionally, introduced a brand-new dedicated test suite (EntityStatusDonut.test.tsx) to ensure 100% coverage on pie slice navigation and tooltip formatters.Overrides Added:
d3-color(Override added for3.1.0): Mitigates a High-severity ReDoS vulnerability. We opted for an override here because upgrading the maind3library from v5 to v7 introduces significant architectural breaking changes to the graph components.(Note: Prior overrides for
brace-expansion,js-yaml,postcss,semver,minimatch,lodash, andlodash-eswere removed as they are either resolved via the upgrades above or were creating invalid dependency trees).This PR also incorporates fixes for the following automated Dependabot PRs targeting the dashboard:
(Note: Dependabot PRs #644 (qs) and #584 (serialize-javascript / webpack) which targeted /dashboard/src/views/Lineage/atlas-lineage are now obsolete. That sub-directory and its package files were deleted in commit ATLAS-5328.)
Known / Unresolved Issues & Deferred Upgrades
While running
npm audit, there are a few items intentionally excluded from this PR:1. Deferred to Separate Jiras (Breaking Changes):
react-router-dom: Upgrading this package to v7 involves significant architectural changes and deprecations that introduce breaking issues in the current test suite. This migration has been isolated into its own Jira to be handled carefully without blocking these security patches.sanitize-html: Upgrading this library from v1 to v2 introduces breaking ESM syntax via its underlyinghtmlparser2dependency, causing the Jest test environment to completely crash. This will be handled in a separate Jira so we can properly implement Jest mocks and isolated testing.2. No Patched Version Available:
quill(=2.0.3): There is currently 1 low-severity vulnerability flagged for this package. However, 2.0.3 is currently the latest version available on npm. There is no patched version available yet, so this cannot be resolved until the maintainers release a newer update.How was this patch tested?
npm auditlocally in the/dashboarddirectory to verify that all fixable warnings (that do not cause breaking framework issues) have been successfully cleared andnpm lsreturns a perfectly valid dependency tree.npm run build,npm run typecheck, andnpm run lintto ensure the React UI complies strictly with TypeScript configurations without emitting any warnings or errors.npm run test(Jest + React Testing Library) to verify all 4,700+ assertions continue to pass successfully, explicitly verifying that the Recharts v3 custom Legend DOM interactions execute correctly.