Skip to content

Add detector visualization, meta detectors, reload/save flows, and shortcuts#47

Merged
mathiasekstedt merged 23 commits into
mal-lang:mainfrom
isakhertin:main
Jul 3, 2026
Merged

Add detector visualization, meta detectors, reload/save flows, and shortcuts#47
mathiasekstedt merged 23 commits into
mal-lang:mainfrom
isakhertin:main

Conversation

@isakhertin

Copy link
Copy Markdown
Contributor

Summary

This PR adds GUI support for MAL detectors and meta detectors, improves model/scenario persistence, and adds several workflow shortcuts.

What’s New

  • Added detector parsing from .mal files.
  • Assets whose MAL type contains detector definitions are now marked in the GUI.
  • Draw.io exports now include detector markers for assets with detectors.
  • Added meta detector support:
    • Meta detectors can be created as their own item type.
    • Meta detector connections can be saved and loaded through model/scenario YAML.
    • Meta detector connection labels are persisted.
    • Meta detector labels can be edited from the connection context menu.
  • Added persistence for attacker metadata in model files:
    • position
    • entry points
    • goals
    • policy
  • Improved scenario loading:
    • resolves scenario lang_file paths more safely
    • falls back to the current language when needed
    • restores attacker policy data
  • Added current-file save/reload workflows:
    • save currently loaded model or scenario
    • reload currently loaded model/scenario
    • reload the MAL project and reopen the active file when possible
  • Added drag-to-pan mode with a toolbar button and shortcut.
  • Added/updated tests for:
    • detector parsing
    • detector markers
    • meta detector creation/save/load
    • attacker metadata persistence
    • reload/save behavior

New shortcuts

  • Ctrl+S: save current file
  • Ctrl+R: reload current file
  • Ctrl+Shift+R: reload MAL project
  • Ctrl+D: toggle drag mode

Notes

Tests were added for the new detector, meta detector, persistence, and reload behavior.
Detector syntax support is related to the thesis detector language work MasterThesis_DetectorsLang

@mathiasekstedt mathiasekstedt self-assigned this Jul 3, 2026
@mathiasekstedt mathiasekstedt marked this pull request as draft July 3, 2026 09:03
@mathiasekstedt mathiasekstedt marked this pull request as ready for review July 3, 2026 09:03
@mathiasekstedt mathiasekstedt self-requested a review July 3, 2026 09:04
@mathiasekstedt mathiasekstedt merged commit ec24d96 into mal-lang:main Jul 3, 2026
1 check passed
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.

2 participants