From 00bc8bfc64aed17551f9d4f30fd766c866183696 Mon Sep 17 00:00:00 2001 From: Ajin Abraham Date: Sat, 27 Jul 2024 23:06:24 -0700 Subject: [PATCH] QA --- mobsf/MobSF/security.py | 2 ++ mobsf/StaticAnalyzer/views/common/shared_func.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mobsf/MobSF/security.py b/mobsf/MobSF/security.py index 3e50fe4b66..5529a55f09 100644 --- a/mobsf/MobSF/security.py +++ b/mobsf/MobSF/security.py @@ -86,6 +86,8 @@ def get_executable_hashes(): 'BinSkim.exe', 'BinScope.exe', 'nuget.exe', + 'where.exe', + 'wkhtmltopdf.exe', ] for sbin in system_bins: bin_path = which(sbin) diff --git a/mobsf/StaticAnalyzer/views/common/shared_func.py b/mobsf/StaticAnalyzer/views/common/shared_func.py index f0d258cb6b..90bfa91fb1 100755 --- a/mobsf/StaticAnalyzer/views/common/shared_func.py +++ b/mobsf/StaticAnalyzer/views/common/shared_func.py @@ -192,12 +192,15 @@ def ar_extract(checksum, src, dst): out.write_bytes(val.read()) except Exception: # Possibly dealing with Fat binary, needs Mac host - logger.warning('Failed to extract .a archive') + msg = 'Failed to extract .a archive' + logger.warning(msg) + append_scan_status(checksum, msg) # Use os ar utility plat = platform.system() os_err = 'Possibly a Fat binary. Requires MacOS for Analysis' if plat == 'Windows': logger.warning(os_err) + append_scan_status(checksum, os_err) return msg = 'Using OS ar utility to handle archive' logger.info(msg) @@ -206,6 +209,7 @@ def ar_extract(checksum, src, dst): if len(exp) > 3 and plat == 'Linux': # Can't convert FAT binary in Linux logger.warning(os_err) + append_scan_status(checksum, os_err) return if b'lipo(1)' in exp: msg = 'Fat binary archive identified'