Defer MITRE ATT&CK data imports in analyze.py to avoid network fetch on CLI startup#89
Merged
thomaspatzke merged 1 commit intomainfrom Apr 18, 2026
Merged
Conversation
… requests on CLI startup Agent-Logs-Url: https://github.com/SigmaHQ/sigma-cli/sessions/6807949e-b72e-452b-80df-8795263fd99a Co-authored-by: thomaspatzke <1845601+thomaspatzke@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
thomaspatzke
April 15, 2026 15:25
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.
sigma/cli/analyze.pyimportsmitre_attack_techniques_tactics_mappingandmitre_attack_versionat module level. Sincemain.pyunconditionally importsanalyze_groupfrom this module, every CLI invocation triggers a MITRE ATT&CK data download — includingsigma pysigma update-cache --url mitre_attack:"./enterprise-attack.json", which is specifically intended to load from a local file on offline systems.sigma.data.mitre_attackimports from module scope intoanalyze_attack(), where they're actually usedThis is consistent with how
pysigma.pyalready handles the same imports viaget_cache_datasets().