Fix correctness defects from security audit (GDS-321) - #429
Merged
Conversation
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
force-pushed
the
gds-321-fix-minor-bugs-discovered-by-audit
branch
from
August 14, 2026 11:47
8f17dc7 to
3a8d615
Compare
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.
Address five findings from the python-graph-visualization security audit
(F-01 XSS and L-04 parser recursion are handled separately / deferred):
removal, instead of leaving them and silently rendering an empty graph.
(Node(id=1)) matches its text form (remove_data(nodes="1")).
property instead of crashing with min() iterable argument is empty.
ColorSpace.DISCRETE for non-numeric values instead of a TypeError.
add_data, so the draw-time node limit cannot be bypassed afterwards.