I am trying to run Qark Security Scan on my apk using the Script Step. In the bash script I run a python command:
python ${source_dir}/build/qark/qark/qarkMain.py -s 1 -p ${path_to_apk}/${FILE_NAME} -e 1 -d 10 -b ${ANDROID_HOME}
I get this error:
Traceback (most recent call last):
File "/bitrise/src/build/qark/qark/qarkMain.py", line 1281, in <module>
nonAutomatedParseArgs()
File "/bitrise/src/build/qark/qark/qarkMain.py", line 462, in nonAutomatedParseArgs
main()
File "/bitrise/src/build/qark/qark/qarkMain.py", line 790, in main
unpackAPK.decompile(common.pathToDEX)
File "/bitrise/src/build/qark/qark/modules/unpackAPK.py", line 162, in decompile
with common.term.cbreak():
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/bitrise/src/build/qark/qark/lib/blessed/terminal.py", line 572, in cbreak
save_mode = termios.tcgetattr(self.keyboard_fd)
termios.error: (25, 'Inappropriate ioctl for device')
I think the hint is in line Inappropriate ioctl for device
. When I do set | grep TERM
, I get dumb
and I think that means the Terminal running the script is very limited. How do I get over this issue?
Edit 1:
I found that the script is waiting for button to be pressed if user wants to cancel.
Decompilation may hang/take too long (usually happens when the source is obfuscated).
At any time,Press C to continue and QARK will attempt to run SCA on whatever was decompiled.
This is why it’s failing. Can it be resolved from bitrise end?