Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/autogenerate attack tactics visualization 95 #613

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tmendonca28
Copy link
Contributor

What does this PR do?

Adds the functionality to generate stylized HTML coverage matrices for each platform with Columns: ATT&CK Tactics and Rows: Stratus Red Team techniques.
Integrates the GenerateCoverageMatrices function into the generate-docs.go workflow so that platform-specific matrices are generated by running make docs

  • Tested the output for correctness and styling (e.g., AWS.html, GCP.html).
  • Added hover effects and color coding to improve readability and likeness to Stratus Red Team color scheme.
  • Ensured no breaking changes to the existing codebase.
  • Verified that the generated HTML includes the favicon for branding.

Motivation

Resolves #95
This PR addresses the need for automatically generating stylized coverage matrices for all platforms currently covered by Stratus Red team, improving documentation usability and visibility for maintainers and users.

Checklist

N/A

Sample Screenshot of HTML Table

Screenshot 2025-01-01 at 23 58 35

- Added a call to the GenerateCoverageMatrices function within generate-docs.go.

Signed-off-by: Anthony Mendonca <[email protected]>
-Created generate-coverage-matrices.go in tools directory
-Added logic to dynamically generate stylized HTML tables for each platform
-Included in-line CSS for table styling and better readability

Signed-off-by: Anthony Mendonca <[email protected]>
@christophetd
Copy link
Contributor

Looks really good, thanks for giving it a stab! Do you think this is worth integrating it into the main docs website? Perhaps under a new "MITRE ATT&CK Coverage" page

@tmendonca28
Copy link
Contributor Author

tmendonca28 commented Jan 7, 2025

Thank you for the feedback! I think integrating the coverage matrix into the main docs website under a new “MITRE ATT&CK Coverage” page would be an excellent idea. It would potentially provide greater visibility and usability for users.

I’d be happy to explore this further and draft an implementation plan. Would you prefer a static integration, or should we explore automating updates to the page as new techniques are added? I personally would like the latter but I'm not quite sure (yet) how to do it. I'll have a look as how the main docs website is generated and see if this is possible.

Looking forward to your thoughts!

@christophetd
Copy link
Contributor

I think an automatic option that nukes and regenerates a static file (e.g. in docs/attack-techniques/mitre-attack.md/html) would be perfect, perhaps split by platform.

Thoughts?

@tmendonca28
Copy link
Contributor Author

Thanks @christophetd for the above clarification. I think regenerating a static file automatically seems feasible. Based on your input above, here is a draft implementation plan I propose:

  • File location/structure: The static file will contain MITRE ATT&CK coverage tables split by platform, probably with a main title (MITRE ATT&CK Coverage by Platform). The static file will be located at docs/attack-techniques/mitre-attack.md/html.
  • 'Nuking' process: Delete previous version of the file and regenerate it from scratch whenever needed. I would like to do this in the existing generate-docs workflow so it can be regenerated when running make docs.
  • File output: I think I will work on doing my best to create a markdown file for this for integration into the main docs website but might prove a bit finicky.

Let me know if you'd like any adjustments. I'm happy to start working on this!

@christophetd
Copy link
Contributor

christophetd commented Jan 8, 2025

That sounds absolutely great! It's possible that the HTML version works as-is if you throw it in a .md file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-generate ATT&CK coverage matrices
2 participants