mitre-attack / mitre-attack/mitreattack-python

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

Open
#171 1 comment 0 reactions 1 assignee View on GitHub

@clemiller is already working on this.

Since Apr 15, 2024.

Dominant language
HTML
Stars
743
Forks
176
PR merge metrics
No merged PRs in 30d

Description

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 :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.