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
607
stars
97
forks
source link
semgrep.error.SemgrepError: Error while running rules: 0 bytes read on a total of 2 expected bytes #54
Pattern Match ████████████████████████████████████████████████████████████ 1
Exception in thread Thread-1 (myrunner):
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, *self._kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libsast/common.py", line 45, in myrunner
ret[0] = function(args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libsast/core_sgrep/helpers.py", line 50, in invoke_semgrep
) = semgrep_main.main(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/semgrep/semgrep_main.py", line 363, in main
rule_matches_by_rule, semgrep_errors, all_targets, profiling_data = run_rules(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/semgrep/semgrep_main.py", line 154, in run_rules
) = core_runner.invoke_semgrep(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/semgrep/core_runner.py", line 758, in invoke_semgrep
) = self._run_rules_direct_to_semgrep_core(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/semgrep/core_runner.py", line 703, in _run_rules_direct_to_semgrep_core
returncode = runner.execute()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/semgrep/core_runner.py", line 283, in execute
rc = asyncio.run(self._stream_subprocess())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/semgrep/core_runner.py", line 257, in _stream_subprocess
raise SemgrepError(f"Error while running rules: {r}")
semgrep.error.SemgrepError: Error while running rules: 0 bytes read on a total of 2 expected bytes
Semantic Grep █ 7
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/mobsfscan", line 8, in
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mobsfscan/main.py", line 78, in main
).scan()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mobsfscan/mobsfscan.py", line 98, in scan
result = scanner.scan()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libsast/scanner.py", line 65, in scan
self.options).scan(valid_paths)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libsast/core_sgrep/semantic_sgrep.py", line 41, in scan
self.format_output(sgrep_out)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libsast/core_sgrep/semantic_sgrep.py", line 46, in format_output
self.findings['errors'] = results['errors']
TypeError: 'NoneType' object is not subscriptable
v0.2.0 scanning android project root folder and specific files using CLI. tried on multiple projects for our team. the issue is: