Skip to content

Fix correctness defects from security audit (GDS-321) - #429

Merged
FlorentinD merged 1 commit into
mainfrom
gds-321-fix-minor-bugs-discovered-by-audit
Aug 14, 2026
Merged

Fix correctness defects from security audit (GDS-321)#429
FlorentinD merged 1 commit into
mainfrom
gds-321-fix-minor-bugs-discovered-by-audit

Conversation

@FlorentinD

Copy link
Copy Markdown
Collaborator

Address five findings from the python-graph-visualization security audit
(F-01 XSS and L-04 parser recursion are handled separately / deferred):

  • L-01: remove_data now deletes relationships left dangling by a node-only
    removal, instead of leaving them and silently rendering an empty graph.
  • L-02: remove_data compares ids as strings on both sides, so a numeric id
    (Node(id=1)) matches its text form (remove_data(nodes="1")).
  • F-02: resize_nodes/color_nodes raise a clear ValueError naming the missing
    property instead of crashing with min() iterable argument is empty.
  • F-03: color_nodes continuous raises a clear ValueError suggesting
    ColorSpace.DISCRETE for non-numeric values instead of a TypeError.
  • L-03: max_allowed_nodes is threaded into GraphWidget and enforced by
    add_data, so the draw-time node limit cannot be bypassed afterwards.

Address five findings from the python-graph-visualization security audit
(F-01 XSS and L-04 parser recursion are handled separately / deferred):

- L-01: remove_data now deletes relationships left dangling by a node-only
  removal, instead of leaving them and silently rendering an empty graph.
- L-02: remove_data compares ids as strings on both sides, so a numeric id
  (Node(id=1)) matches its text form (remove_data(nodes="1")).
- F-02: resize_nodes/color_nodes raise a clear ValueError naming the missing
  property instead of crashing with min() iterable argument is empty.
- F-03: color_nodes continuous raises a clear ValueError suggesting
  ColorSpace.DISCRETE for non-numeric values instead of a TypeError.
- L-03: max_allowed_nodes is threaded into GraphWidget and enforced by
  add_data, so the draw-time node limit cannot be bypassed afterwards.

# Conflicts:
#	changelog.md
@FlorentinD
FlorentinD force-pushed the gds-321-fix-minor-bugs-discovered-by-audit branch from 8f17dc7 to 3a8d615 Compare August 14, 2026 11:47
@FlorentinD
FlorentinD merged commit c6f57a7 into main Aug 14, 2026
11 checks passed
@FlorentinD
FlorentinD deleted the gds-321-fix-minor-bugs-discovered-by-audit branch August 14, 2026 11:57
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