Skip to content

Commit

Permalink
Set extras to empty dictionary instead of empty list if missing when …
Browse files Browse the repository at this point in the history
…loading attack graph from file.
  • Loading branch information
andrewbwm committed Jul 26, 2024
1 parent 0db73ad commit 388349a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maltoolbox/attackgraph/attackgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _from_dict(
'mitre_info' in node_dict else None
ag_node.tags = node_dict['tags'] if \
'tags' in node_dict else []
ag_node.extras = node_dict.get('extras', [])
ag_node.extras = node_dict.get('extras', {})

# Add AttackGraphNode to AttackGraph
attack_graph.add_node(ag_node, node_id=node_dict['id'])
Expand Down

0 comments on commit 388349a

Please sign in to comment.