Skip to content

Commit 3973e20

Browse files
committed
Allow attack_ids to be in the software_map as well
1 parent a725876 commit 3973e20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

assemblyline_v4_service/common/result.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from assemblyline.common import forge
77
from assemblyline.common import log as al_log
8-
from assemblyline.common.attack_map import attack_map
8+
from assemblyline.common.attack_map import attack_map, software_map
99
from assemblyline.common.classification import InvalidClassification
1010
from assemblyline.common.dict_utils import unflatten
1111
from assemblyline.common.str_utils import StringTable, safe_str
@@ -88,7 +88,7 @@ def __init__(self, heur_id: int,
8888

8989
# Validate that all attack_ids are in the attack_map
9090
for a_id in attack_ids:
91-
if a_id in attack_map:
91+
if a_id in attack_map or a_id in software_map:
9292
self.attack_ids.append(a_id)
9393
else:
9494
log.warning(f"Invalid attack_id '{a_id}' for heuristic '{heur_id}'. Ignoring it.")
@@ -132,7 +132,7 @@ def score(self):
132132

133133
def add_attack_id(self, attack_id: str):
134134
# Check if this is a valid attack ID
135-
if attack_id not in attack_map:
135+
if attack_id not in attack_map and attack_id in software_map:
136136
log.warning(f"Invalid attack_id '{attack_id}' for heuristic '{self.heur_id}'. Ignoring it.")
137137
return
138138

0 commit comments

Comments
 (0)