Defer MITRE data loading in tag validators to first use#465
Merged
thomaspatzke merged 1 commit intomainfrom Apr 14, 2026
Merged
Defer MITRE data loading in tag validators to first use#465thomaspatzke merged 1 commit intomainfrom
thomaspatzke merged 1 commit intomainfrom
Conversation
ATTACKTagValidator and D3FENDTagValidator previously loaded MITRE data eagerly in __init__(), triggering network requests during plugin discovery before set_url() could be called. Now data loading is deferred to the first validate_tag() call using a None sentinel pattern. Agent-Logs-Url: https://github.com/SigmaHQ/pySigma/sessions/cf64b814-14a4-4562-a117-8c43a2c14914 Co-authored-by: thomaspatzke <1845601+thomaspatzke@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
thomaspatzke
April 14, 2026 13:27
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ATTACKTagValidatorandD3FENDTagValidatoreagerly load MITRE data in__init__(), triggering network requests during plugin discovery — beforeset_url()can redirect to a local source. This causes timeouts in offline environments when using sigma-cli with--url.Changes
sigma/validators/core/tags.py: Replace eager data loading in__init__()with lazy initialization via aNonesentinel. Data is now fetched on firstvalidate_tag()call through a_load_allowed_tags()method.The
sigma.datamodules themselves already use lazy loading via__getattr__— the problem was solely in the consumer side.