MobSF / mobsfscan

mobsfscan is a static analysis tool that can find insecure code patterns in your Android and iOS source code. Supports Java, Kotlin, Swift, and Objective C Code. mobsfscan uses MobSF static analysis rules and is powered by semgrep and libsast pattern matcher.
GNU Lesser General Public License v3.0
559 stars 90 forks source link

TypeError: 'NoneType' object is not subscriptable #86

Open emersonramos opened 4 weeks ago

emersonramos commented 4 weeks ago

Hi everyone.

I'm testing mobsfscan in a azure devops pipelines and I'm getting error. I'm using mobsfscan 0.3.9 version and I get follow error:

More info about my environment:

I'm running in a container:

NAME="Ubuntu" VERSION="20.04.6 LTS (Focal Fossa)" Python 3.8.10 pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) mobsfscan: v0.3.9 | Ajin Abraham | opensecurity.in

pip3 list Package Version


attrs 21.4.0 boltons 21.0.0 bracex 2.4 certifi 2019.11.28 chardet 3.0.4 charset-normalizer 3.3.2 click 8.1.7 click-option-group 0.5.6 colorama 0.4.6 dbus-python 1.2.16 defusedxml 0.7.1 exceptiongroup 1.2.1 face 22.0.0 glom 22.1.0 idna 2.8 importlib-resources 6.4.0 jschema-to-python 1.2.3 jsonpickle 3.2.1 jsonschema 4.22.0 jsonschema-specifications 2023.12.1 libsast 2.0.3 markdown-it-py 3.0.0 mdurl 0.1.2 mobsfscan 0.3.9 packaging 21.3 pbr 6.0.0 peewee 3.17.5 pip 20.0.2 pkgutil-resolve-name 1.3.10 pygments 2.18.0 PyGObject 3.36.0 pyparsing 3.1.2 python-apt 2.0.1+ubuntu0.20.4.1 python-lsp-jsonrpc 1.0.0 PyYAML 6.0.1 referencing 0.35.1 requests 2.32.3 requests-unixsocket 0.2.0 rich 13.7.1 rpds-py 0.18.1 ruamel.yaml 0.17.40 ruamel.yaml.clib 0.2.8 sarif-om 1.0.4 semgrep 0.117.0 setuptools 45.2.0 six 1.14.0 tabulate 0.9.0 tomli 2.0.1 tqdm 4.66.4 typing-extensions 4.12.2 ujson 5.10.0 urllib3 1.26.18 wcmatch 8.5.2 wheel 0.34.2 xmltodict 0.13.0 zipp 3.19.2

ajinabraham commented 3 weeks ago

This seems to be a semgrep error. Can you isolate it to the file that is causing this error or share sample code that replicates this behaviour?