ajinabraham / nodejsscan

nodejsscan is a static security code scanner for Node.js applications.
https://opensecurity.in
GNU General Public License v3.0
2.38k stars 324 forks source link

Error #312

Open srish-cell opened 11 months ago

srish-cell commented 11 months ago

Exception on /upload/ [POST] Traceback (most recent call last): File "E:\nodejsscan\mvenv\Lib\site-packages\flask\app.py", line 2190, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\nodejsscan\mvenv\Lib\site-packages\flask\app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\nodejsscan\mvenv\Lib\site-packages\flask\app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "E:\nodejsscan\mvenv\Lib\site-packages\flask\app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\nodejsscan\nodejsscan\app.py", line 100, in upload return handle_upload(app, request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\nodejsscan\web\upload.py", line 85, in handle_upload results = nodejsscan.scan(app_dir) ^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\nodejsscan\nodejsscan\nodejsscan.py", line 73, in scan result = call_njsscan(node_source) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\nodejsscan\nodejsscan\nodejsscan.py", line 50, in call_njsscan scan_result = scanner.scan() ^^^^^^^^^^^^^^ File "E:\nodejsscan\mvenv\Lib\site-packages\njsscan\njsscan.py", line 44, in scan result = scanner.scan() ^^^^^^^^^^^^^^ File "E:\nodejsscan\mvenv\Lib\site-packages\libsast\scanner.py", line 65, in scan self.options).scan(valid_paths) ^^^^^^^^^^^^^^^^^ File "E:\nodejsscan\mvenv\Lib\site-packages\libsast\core_sgrep\semantic_sgrep.py", line 41, in scan self.format_output(sgrep_out) File "E:\nodejsscan\mvenv\Lib\site-packages\libsast\core_sgrep\semantic_sgrep.py", line 50, in format_output for find in results['results']:

ajinabraham commented 11 months ago

Can you share the full exception trace? Also can you share a sample ZIP that can trigger this?

srish-cell commented 11 months ago

https://drive.google.com/file/d/1ZeipH8_v2BGr_P0Q2fcCYwkH5nay4AIp/view?usp=sharing file is in the above link

ajinabraham commented 11 months ago

Thanks, I will take a look and get back.

ajinabraham commented 11 months ago

This error seems to occur from semgrep that we use internally. And source code zip you shared is not a node.js or javascript application. Please try to replicate the same with a node.js application.

nikstuckenbrock commented 3 weeks ago

I get the same error using a node.js application.