Update ATT&CK and MBC lint data (#1297)

* sort by ID

* update ATT&CK/MBC lint data via script
This commit is contained in:
Moritz
2023-02-01 09:56:10 +01:00
committed by GitHub
parent bf7c569060
commit b5c6cdeaa1
3 changed files with 1393 additions and 1357 deletions

View File

@@ -14,6 +14,7 @@
- dotnet: extract dotnet and pe format #1187 @mr-tz
- don't render all library rule matches in vverbose output #1174 @mr-tz
- cache the rule set across invocations for better performance #1212 @williballenthin
- update ATT&CK/MBC data for linting #1297 @mr-tz
### Breaking Changes
- remove SMDA backend #1062 @williballenthin

File diff suppressed because it is too large Load Diff

View File

@@ -125,7 +125,10 @@ class MitreExtractor:
data: Dict[str, Dict[str, str]] = {}
for tactic in self._get_tactics():
data[tactic["name"]] = {}
for technique in self._get_techniques_from_tactic(tactic["x_mitre_shortname"]):
for technique in sorted(
self._get_techniques_from_tactic(tactic["x_mitre_shortname"]),
key=lambda x: x["external_references"][0]["external_id"],
):
tid = technique["external_references"][0]["external_id"]
technique_name = technique["name"].split("::")[0]
if technique["x_mitre_is_subtechnique"]: