mitre-attack / mitre-attack/mitreattack-python

[Request] Update drawSvg Library to latest version

Open
#116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We have a dependency on drawSvg both in the requirements-dev.txt and setup.py files. It is used in the mitreattack/navlayers section of the library, specifically in the svg_templates.py and svg_objects.py files.

The documentation for drawSvg is here: https://github.com/cduck/drawsvg

It would be great to update our dependency to use the latest version of drawSvg, but the last time we did that, we had the following error: https://github.com/mitre-attack/mitreattack-python/issues/106

Test

After upgrading the dependency, a good way to test that it worked may be as follows:

  • Download the G0016 Navigator Layer file
  • Download the Enterprise ATT&CK v13.1 STIX file
  • Run the following command in a python virtual environment with the updated version of the mitreattack-python library
    • layerExporter_cli G0016-enterprise-layer.json -m svg -s local --resource enterprise-attack.json -o my-G0016-svg-output.svg
  • Check out the my-G0016-svg-output.svg file to see if it looks right!

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.

Research direction

Update the drawSvg dependency references in requirements-dev.txt and setup.py, then inspect mitreattack/navlayers/exporters/svg_templates.py and svg_objects.py for compatibility. Use the G0016 layer and Enterprise ATT&CK v13.1 STIX file with the provided layerExporter_cli command, and confirm that the generated SVG looks correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.