Skip to content

Commit 831ac18

Browse files
committed
lint atlas
1 parent 1082885 commit 831ac18

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

detection_rules/atlas.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ def get_atlas_file_path() -> Path:
3232
return ATLAS_FILE
3333

3434

35-
def download_attack_data(save: bool = True) -> dict[str, Any] | None:
36-
"""Download ATT&CK data from MITRE."""
37-
url = "https://raw.githubusercontent.com/mitre-attack/attack-data/main/attack.yaml"
38-
r = requests.get(url, timeout=30)
39-
r.raise_for_status()
40-
attack_data = yaml.safe_load(r.text)
41-
42-
4335
def download_atlas_data(save: bool = True) -> dict[str, Any] | None:
4436
"""Download ATLAS data from MITRE."""
4537
url = "https://raw.githubusercontent.com/mitre-atlas/atlas-data/main/dist/ATLAS.yaml"
@@ -77,13 +69,12 @@ def load_atlas_yaml() -> dict[str, Any]:
7769
if m.get("id") == ATLAS_MATRIX_ID:
7870
matrix_data = m
7971
break
80-
72+
8173
# Fall back to first matrix if ATLAS matrix not found by ID
8274
if matrix_data is None:
8375
matrix_data = atlas["matrices"][0]
8476

8577
if matrix_data is not None:
86-
8778
# Build tactics map
8879
if "tactics" in matrix_data:
8980
for tactic in matrix_data["tactics"]:

0 commit comments

Comments
 (0)