error
armoreal opened this issue · 0 comments
armoreal commented
I was unable to run code. Got error:
# python3 ./odgen_test.py
Traceback (most recent call last):
File "./odgen_test.py", line 3, in <module>
from src.core.opgen import OPGen
File "/home/ODGen/src/core/opgen.py", line 8, in <module>
from ..plugins.internal.setup_env import setup_opg
File "/home/ODGen/src/plugins/internal/setup_env.py", line 1, in <module>
from . import modeled_js_builtins
File "/home/ODGen/src/plugins/internal/modeled_js_builtins.py", line 1768, in <module>
def convert_to_python_re(code) -> Tuple[re.Pattern, bool, bool]:
I can add "from Typing import re" to modeled_js_builtins.py
but then i got
ERROR: test_pp (__main__.BasicTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./odgen_test.py", line 82, in test_pp
self.opgen.test_module(file_loc, vul_type='proto_pollution')
File "/home/ODGen/src/core/opgen.py", line 137, in test_module
test_res = start_from_func(G, module_path, vul_type=vul_type)
File "/home/ODGen/src/core/opgen.py", line 345, in start_from_func
parse_string(G, js_call_templete)
File "/home/ODGen/src/core/helpers.py", line 134, in parse_string
input=source, print_func=loggers.main_logger.info)
File "/home/ODGen/src/core/esprima.py", line 14, in esprima_parse
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
TypeError: __init__() got an unexpected keyword argument 'text'
======================================================================
FAIL: test_ipt (__main__.BasicTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./odgen_test.py", line 73, in test_ipt
assert len(self.opgen.graph.detection_res['ipt']) != 0
AssertionError
======================================================================
FAIL: test_os_command (__main__.BasicTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./odgen_test.py", line 63, in test_os_command
assert len(self.opgen.graph.detection_res['os_command']) != 0
AssertionError
======================================================================
FAIL: test_sqlite (__main__.BasicTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./odgen_test.py", line 53, in test_sqlite
assert len(self.opgen.graph.detection_res['os_command']) != 0
AssertionError
======================================================================
FAIL: test_typescript (__main__.BasicTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./odgen_test.py", line 43, in test_typescript
assert len(self.opgen.graph.detection_res['os_command']) != 0
AssertionError
======================================================================
FAIL: test_typescript_path_traversal (__main__.BasicTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./odgen_test.py", line 29, in test_typescript_path_traversal
assert len(self.opgen.graph.detection_res['path_traversal']) != 0
AssertionError