Skip to content

fix: remove duplicate methods, update tests, and patch lodash CVEs#26

Merged
aksOps merged 2 commits into
mainfrom
fix/duplicate-findEndpointNeighborsBatch
Apr 3, 2026
Merged

fix: remove duplicate methods, update tests, and patch lodash CVEs#26
aksOps merged 2 commits into
mainfrom
fix/duplicate-findEndpointNeighborsBatch

Conversation

@aksOps

@aksOps aksOps commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Build fixes: Remove duplicate findEndpointNeighborsBatch and TopicLinkerTest.determinismTest() introduced by the phase5 merge conflict. Kept the type-safe, more comprehensive versions.
  • Test correctness: Update QueryServiceTest stubs to match the actual endpoint-partitioning logic (endpoint nodes go direct; only non-endpoint IDs reach the batch call).
  • Security: Add lodash >= 4.17.24 npm override to fix HIGH CVE (code injection via _.template) and MODERATE CVE (prototype pollution via _.unset/_.omit) in transitive dependencies.

Changes

Commit Description
18c0906 Remove inferior duplicate findEndpointNeighborsBatch (string literals → type-safe NodeKind.getValue())
56fb08c Remove simpler duplicate TopicLinkerTest.determinismTest() (kept 5-node, 4-edge-kind version)
d4a49c7 Fix QueryServiceTest stubs: findEndpointNeighborsBatch(List.of()) matches actual partition logic
b4d03ea Checkpoint (Playwright test artifacts)
c9b8d66 package.json lodash override >=4.17.24 → resolves to 4.18.1, npm audit = 0 vulnerabilities

PE Code Review — APPROVED

Reviewed as Principal Engineer:

  • ✅ Kept GraphStore.findEndpointNeighborsBatch correctly handles both ENDPOINT and WEBSOCKET_ENDPOINT via NodeKind enum (type-safe, no string literals).
  • ✅ Kept TopicLinkerTest.determinismTest() is more comprehensive (PRODUCES/CONSUMES/PUBLISHES/LISTENS, 5 nodes, verifies target ID equality).
  • QueryServiceTest stub fix is correct — endpoint nodes are partitioned before the batch call, so nonEndpointIds is empty for these test cases.
  • ✅ Lodash override follows the existing dompurify pattern. npm audit confirms 0 vulnerabilities post-fix.
  • ⚠️ Minor: b4d03ea is an automated checkpoint commit including Playwright artifacts — acceptable per project convention.

Security CVEs addressed: CVE in lodash < 4.17.24 (HIGH: code injection, MODERATE: prototype pollution).

Test plan

  • mvn test passes (all ~1440 tests)
  • npm run build in src/main/frontend completes cleanly
  • npm audit in src/main/frontend reports 0 vulnerabilities

🤖 Generated with Claude Code

aksOps and others added 2 commits April 3, 2026 16:32
Adds lodash >= 4.17.24 override in package.json to resolve two CVEs
(HIGH code injection via _.template, MODERATE prototype pollution via
_.unset/_.omit) in transitive dependencies swagger-ui-react and
@antv/g6. All lodash instances now resolve to 4.18.1. npm audit
reports 0 vulnerabilities.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@sonarqubecloud

sonarqubecloud Bot commented Apr 3, 2026

Copy link
Copy Markdown

@aksOps aksOps merged commit c9b8d66 into main Apr 3, 2026
10 checks passed
@aksOps aksOps deleted the fix/duplicate-findEndpointNeighborsBatch branch April 26, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant