Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I scan the others as normal But this folder will have error #98

Open
cxf-boluo opened this issue Nov 7, 2024 · 2 comments
Open

I scan the others as normal But this folder will have error #98

cxf-boluo opened this issue Nov 7, 2024 · 2 comments

Comments

@cxf-boluo
Copy link

mobsfscan /Users/cxf/work-zeek/apks_analysis/Scanner/.tmp/InternetVehicles/sources

  • Pattern Match ████████████████████████████████████████████████████████████ 8728
    Exception in thread Thread-1 (myrunner):
    Traceback (most recent call last):
    File "/Users/cxf/anaconda3/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
    File "/Users/cxf/anaconda3/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
    File "/Users/cxf/anaconda3/lib/python3.10/site-packages/libsast/common.py", line 46, in myrunner
    ret[0] = function(*args, **kwargs)
    File "/Users/cxf/anaconda3/lib/python3.10/site-packages/libsast/core_sgrep/helpers.py", line 23, in invoke_semgrep
    result = subprocess.run(command, capture_output=True, text=True, check=True)
    File "/Users/cxf/anaconda3/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
    File "/Users/cxf/anaconda3/lib/python3.10/subprocess.py", line 971, in init
    self._execute_child(args, executable, preexec_fn, close_fds,
    File "/Users/cxf/anaconda3/lib/python3.10/subprocess.py", line 1847, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
    OSError: [Errno 7] Argument list too long: 'semgrep'
  • Semantic Grep 1
    Traceback (most recent call last):
    File "/Users/cxf/anaconda3/bin/mobsfscan", line 8, in
    sys.exit(main())
    File "/Users/cxf/anaconda3/lib/python3.10/site-packages/mobsfscan/main.py", line 83, in main
    ).scan()
    File "/Users/cxf/anaconda3/lib/python3.10/site-packages/mobsfscan/mobsfscan.py", line 104, in scan
    result = scanner.scan()
    File "/Users/cxf/anaconda3/lib/python3.10/site-packages/libsast/scanner.py", line 66, in scan
    results['semantic_grep'] = SemanticGrep(self.options).scan(valid_paths)
    File "/Users/cxf/anaconda3/lib/python3.10/site-packages/libsast/core_sgrep/semantic_sgrep.py", line 41, in scan
    self.format_output(sgrep_out)
    File "/Users/cxf/anaconda3/lib/python3.10/site-packages/libsast/core_sgrep/semantic_sgrep.py", line 46, in format_output
    errs = results.get('errors')
    AttributeError: 'NoneType' object has no attribute 'get'
    (base) ➜ Scanner
@ajinabraham
Copy link
Member

What's the no of files in this location?
/Users/cxf/work-zeek/apks_analysis/Scanner/.tmp/InternetVehicles/sources

OSError: [Errno 7] Argument list too long: 'semgrep' seems like semgrep has a limit on no of files it can take as input for a scan.

@ajinabraham
Copy link
Member

Thanks for the report, will take a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants