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

[Request] Build SVG techniques matrix with only enabled TTPs in layer

Open NicolasKol opened this issue 2 months ago • 1 comments

Problem

The current way of building the SVG from my understanding, is to build all the TTP Blocks, if they are not excluded. Which for me means, if I want to build a matrix with only the TTPs used in my layer, I would need to include all the TTPs from a collection in my layer and then put the flag enabled to false. So every layer needs to be the full TTP collection for me to achieve my goal of building svgs with only my layer TTPs. I am not quite sure if I misunderstand the code, so if this is not the case feel free to correct me.

The code I am referring to is in the to_svg.py under navlayers/exporters and relevant for the functionality of get_tactic() in the svg_template.py

Solution suggestion

I would be forever grateful if I could build the svg with only scored or present TTPs rather than excluding all non used in my layer. A showSubtechniques = selective or something.

My workaround

I'm going to try and fill the exclude list with all the TTPs I am not using somehow, which is tricky because it's only accessible through the provided layers. Or copy the svg generation code and build my own logic for the matrix generation.

Personal note

Again if I misinterpreted something, I would be grateful if you correct me! Also if this is a feature you would add, I could contribute my solution, although this would be my first open source contribution, so I would probably need some guidance :)

NicolasKol avatar Apr 15 '24 14:04 NicolasKol