Skip to content

Commit

Permalink
QA
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham committed Jul 28, 2024
1 parent 2031c4c commit 00bc8bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mobsf/MobSF/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion mobsf/StaticAnalyzer/views/common/shared_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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'
Expand Down

0 comments on commit 00bc8bf

Please sign in to comment.