mitreattack-python icon indicating copy to clipboard operation
mitreattack-python copied to clipboard

[Bug] showSubtechniques in SVGConfig does not show the sub techniques in the SVG

Open KustoKing opened this issue 3 months ago • 1 comments

Expected Behavior

Expanded sub techniques in SVG

Actual Behavior

SVG is not showing sub techniques, while the attack navigator does

Steps to Reproduce the Problem

  1. create a json with: layout: "expandedSubtechniques": "all" techniques "showSubtechniques": True "selectSubtechniquesWithParent": True
  2. Validate that the json contains: layout: "expandedSubtechniques": "all" techniques: "showSubtechniques": true "selectSubtechniquesWithParent": true
  3. Validate that the json works in attack explorer
  4. Import: from mitreattack.navlayers.exporters.to_svg import ToSvg, SVGConfig
  5. svgconf =SVGConfig(width=118.9, height=84.1, unit="cm", showHeader=False, fontSize=12, showSubtechniques="all")
  6. export with exporter = ToSvg(domain='enterprise', source='local', resource=resource_path, config=svgconf) exporter.to_svg(layerInit=layer, filepath="Coverage.svg")

Possible Solution

Review > mitreattack.navlayers.exporters.to_svg

KustoKing avatar Apr 08 '24 09:04 KustoKing