Skip to content

Add Pivotick static HTML export format to gen_graphml.py#1181

Merged
adulau merged 1 commit intomainfrom
codex/add-static-html-export-for-gen_graphml.py
Apr 14, 2026
Merged

Add Pivotick static HTML export format to gen_graphml.py#1181
adulau merged 1 commit intomainfrom
codex/add-static-html-export-for-gen_graphml.py

Conversation

@adulau
Copy link
Copy Markdown
Member

@adulau adulau commented Apr 14, 2026

Motivation

  • Provide a simple static HTML export from gen_graphml.py so generated MISP galaxy graphs can be opened directly in a browser and viewed using the Pivotick visualization library without a separate build step.

Description

  • Add to_pivotick_html(nodes, edges, pivotick_library_url) which serializes the graph into an embedded JSON payload and returns a self-contained HTML page that dynamically imports Pivotick as an ES module and boots it in viewer mode.
  • Add a new pivotick-html output format to --output-format and map it to the .html extension in output_suffix.
  • Add a --pivotick-library-url CLI option (defaulting to the Pivotick develop branch jsDelivr URL) so consumers can override the module URL used by the generated page.
  • Wire the main output branch to write the generated Pivotick HTML while preserving existing graphml, dot, and json-graph behavior.

Testing

  • Ran python -m py_compile tools/gen_graphml.py and the file compiled successfully.
  • Ran python tools/gen_graphml.py --output-format pivotick-html -o /tmp/misp-pivotick.html --select-name ransomware --cross-cluster-matching value --no-existing-relationships and the tool printed a success message indicating the HTML was written (example: "pivotick-html graph written to /tmp/misp-pivotick.html with 3 galaxies and 2102 clusters.").

Codex Task

@adulau adulau merged commit aba28a7 into main Apr 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant