Skip to content

[CHAIN] feat(ui): expand attack paths node legend coverage#11016

Merged
Alan-TheGentleman merged 1 commit intoPROWLER-1273/react-flow-migrationfrom
PROWLER-1273/attack-path-node-icon-coverage
May 8, 2026
Merged

[CHAIN] feat(ui): expand attack paths node legend coverage#11016
Alan-TheGentleman merged 1 commit intoPROWLER-1273/react-flow-migrationfrom
PROWLER-1273/attack-path-node-icon-coverage

Conversation

@Alan-TheGentleman
Copy link
Copy Markdown
Contributor

@Alan-TheGentleman Alan-TheGentleman commented May 5, 2026

🔗 Part of Chained PRs

Field Value
Feature Branch PROWLER-1273/react-flow-migration
Main PR #10686
Chain Position 9 of 11
Depends on #11015 (graph exploration + legend)

Chain Overview

#10701 → #10705 → #10756 → #10800 → #10970 → #11010 → #11013 → #11014 → #11015 → 📍 #11016 → #11017 → #11020 → #10686

Context

This closes the icon/legend coverage gap for real Attack Paths node labels. The previous legend was too category-oriented; reviewers need the legend to explain the concrete node types visible in the graph, using the same colors as the nodes themselves.


Description

Changes:

  • Expand resolveNodeVisual() coverage for AWS labels used by predefined Attack Paths queries, including RDS, Lambda, SageMaker notebooks, load balancers, listeners, network interfaces, IP nodes, groups, principals, and tags.
  • Make the legend dynamic from the currently visible graph state.
  • List concrete node types such as AWS User, AWS Managed Policy, AWS Policy Statement, and Permission Role instead of generic categories like Identity.
  • Use the same label-based node colors in the legend as the actual graph nodes.
  • Pass expanded-resource and filtered-view state into the legend so hidden findings do not appear until visible.
  • Add focused unit tests for concrete node type legend behavior and expanded AWS node visual coverage.

Steps to review

  1. Run a query with identity/policy nodes and confirm the legend lists concrete visible types.
  2. Confirm legend node badges match actual graph node colors.
  3. Confirm hidden findings do not appear in the legend until Show findings reveals them.
  4. Run pnpm exec vitest run --project unit "app/(prowler)/attack-paths/(workflow)/query-builder/_components/graph/graph-legend.test.tsx" "app/(prowler)/attack-paths/(workflow)/query-builder/_lib/node-visuals.test.ts" from ui/.

Checklist

Community Checklist
  • This feature/issue is listed in here or roadmap.prowler.com
  • Is it assigned to me, if not, request it via the issue/feature in here or Prowler Community Slack

UI

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

export const GraphLegend = ({ data }: GraphLegendProps) => {
export const GraphLegend = ({
data,
expandedResources = new Set(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When no prop passed, this will create a new Set each render with a different ref, trigger unnecessary renders

@Alan-TheGentleman Alan-TheGentleman force-pushed the PROWLER-1273/attack-path-legend-redesign branch from 651fa45 to b20ad88 Compare May 8, 2026 11:58
@Alan-TheGentleman Alan-TheGentleman force-pushed the PROWLER-1273/attack-path-node-icon-coverage branch from c309218 to bc212d5 Compare May 8, 2026 12:07
Base automatically changed from PROWLER-1273/attack-path-legend-redesign to PROWLER-1273/react-flow-migration May 8, 2026 12:48
@Alan-TheGentleman Alan-TheGentleman force-pushed the PROWLER-1273/attack-path-node-icon-coverage branch from bc212d5 to bd8880b Compare May 8, 2026 12:51
@Alan-TheGentleman Alan-TheGentleman merged commit d50782d into PROWLER-1273/react-flow-migration May 8, 2026
3 checks passed
@Alan-TheGentleman Alan-TheGentleman deleted the PROWLER-1273/attack-path-node-icon-coverage branch May 8, 2026 12: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.

2 participants