Skip to content

fix: merge duplicate security models instead of failing the run - #99

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
fix/merge-duplicate-models
Sep 21, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
fix/merge-duplicate-models

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Closes #92.

What

SecurityModelRegistry.register raised ModelError on the second model of the same kind for a symbol, and engine.plugin_models merged every plugin without catching it: two plugins describing the same symbol aborted the whole analysis.

  • An identical model is registered once.
  • Two Sink models on one symbol merge their kinds and positions — the rule ModelTable.extended already applied, now shared through Sink.merged.
  • Any other difference is a real conflict: ModelError names both plugins (plugin_models passes the plugin name as origin).

Tests

Full suite: 892 passed. ruff check and mypy src clean.

Docs

Plugin guide states the merge rule; changelog entry under Unreleased.

A second model for a symbol aborted the whole run with ModelError, so two
plugins could not describe the same symbol. An identical model is now
registered once, sinks merge their kinds and positions as ModelTable.extended
already did, and a real conflict names both plugins.

Closes #92
@SizzleUnrlsd
SizzleUnrlsd merged commit d092f0f into main Sep 21, 2026
10 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the fix/merge-duplicate-models branch September 21, 2026 23:52
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.

Plugin API: merge duplicate security models instead of failing the run

1 participant