GithubHelp home page GithubHelp logo

Comments (7)

azkasadaf avatar azkasadaf commented on August 15, 2024 1

sure,
thanks for the quick response!
here is the layer's json I'm using to generate the above SVG

from mitreattack-python.

azkasadaf avatar azkasadaf commented on August 15, 2024 1

Hi @clemiller I just checked with version 12 and it's working like a charm.

image

Although the legend is still an issue, but I guess I'll work for a while with it pinned to the header.
As for the font size I'll look into the update you've mentioned.
Thanks for the update.

from mitreattack-python.

clemiller avatar clemiller commented on August 15, 2024

This issue was addressed in PR #95. Let us know if you still run into any problems.

from mitreattack-python.

azkasadaf avatar azkasadaf commented on August 15, 2024

Hi,

I just checked the update; and it's working quite well (highly appreciate the efforts) but (sadly) it's not yet completely fixed

Expected SVG

image

Actual SVG

image

  • some fields are still showing in the final SVG regardless of the fact that hideDisabled is set to True in json config
  • in addition to that the legend is not appearing if it's NOT pinned to the header and there is visible irregularity in the font size as well

from mitreattack-python.

clemiller avatar clemiller commented on August 15, 2024

Hi @azkasadaf,

Thank you for letting us know! I will look into this further. Would you be able to provide a link to the layer that is rendering incorrectly? Thanks!

from mitreattack-python.

azkasadaf avatar azkasadaf commented on August 15, 2024

Hi,
I wanted to ask if there is any update on the issue so far?

from mitreattack-python.

clemiller avatar clemiller commented on August 15, 2024

Hi @azkasadaf,

Apologies for the delay in response! The discrepancy with techniques in your SVG appears to be caused by an outdated layer file (ATT&CK v10). The techniques that are unexpectedly appearing in your SVG are techniques which have been added or modified since ATT&CK v10 (the ATT&CK version of your layer file), so it looks like the Matrix is being generated from the latest ATT&CK v12.

For example, Serverless Execution (T1648) is displayed because enabled is not set to false for T1648 in either example layer files you provided. This technique was added in ATT&CK v12.

I'd recommend upgrading your layer file to v12 or checking the ATT&CK version that is being used to generate the underlying Matrix in the ToSvg() function. You can download the enterprise-attack.json file from the ATT&CK v10.1 Release and use the local file to generate the underlying matrix with v10:

from mitreattack.navlayers import Layer, ToSvg

lay = Layer()
lay.from_file("layer.json")

svg = ToSvg(domain='enterprise', source='local', resource='enterprise-attack-v10.1.json')
svg.to_svg(layerInit=lay, filepath="layer.svg")

As for the issue with the legend- there is a bug in how the legend is generated when legendDocked is false and some inconsistency with the font sizes. We are currently working on a fix for this. The font size has been a bit of an ongoing issue in the Navigator. We've made some adjustments in the past (see Navigator#394) for more consistency, but these changes have not been reflected in the Python library.

from mitreattack-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.