Skip to content

Commit f2397df

Browse files
authored
update PE file signing check to verify 'security' field presence (#137)
1 parent 2427ddb commit f2397df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/strelka_ui/services/insights.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def check_suspicious_yara_rules(strelka_data: dict) -> str:
167167

168168
def check_pe_file_signing(strelka_data: dict) -> str:
169169
"""
170-
Checks if the PE file is digitally signed.
170+
Checks if the PE file is digitally signed by looking for the 'security' field.
171171
172172
Parameters:
173173
strelka_data (dict): Strelka file response data.
@@ -177,7 +177,7 @@ def check_pe_file_signing(strelka_data: dict) -> str:
177177
"""
178178
try:
179179
pe_data = strelka_data["scan"].get("pe", {})
180-
if pe_data and "flags" in pe_data and not "signed" in pe_data["flags"]:
180+
if pe_data and not pe_data.get("security"):
181181
return "The PE file is not digitally signed."
182182
except Exception as e:
183183
logging.warning(f"Error in PE file signing check: {e}")

0 commit comments

Comments
 (0)