the error stack :
semgrep_main.main(
File "/opt/homebrew/lib/python3.9/site-packages/semgrep/semgrep_main.py", line 202, in main
) = CoreRunner(
File "/opt/homebrew/lib/python3.9/site-packages/semgrep/core_runner.py", line 346, in invoke_semgrep
) = self._run_rules_direct_to_semgrep_core(rules, target_manager, profiler)
File "/opt/homebrew/lib/python3.9/site-packages/semgrep/core_runner.py", line 291, in _run_rules_direct_to_semgrep_core
core_run = sub_run(cmd, stdout=subprocess.PIPE, stderr=stderr)
File "/opt/homebrew/lib/python3.9/site-packages/semgrep/util.py", line 130, in sub_run
result = subprocess.run(cmd, *kwargs) # nosem: python.lang.security.audit.dangerous-subprocess-use.dangerous-subprocess-use
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
with Popen(popenargs, **kwargs) as process:
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/opt/homebrew/lib/python3.9/site-packages/semgrep/bin/semgrep-core'
the error stack : semgrep_main.main( File "/opt/homebrew/lib/python3.9/site-packages/semgrep/semgrep_main.py", line 202, in main ) = CoreRunner( File "/opt/homebrew/lib/python3.9/site-packages/semgrep/core_runner.py", line 346, in invoke_semgrep ) = self._run_rules_direct_to_semgrep_core(rules, target_manager, profiler) File "/opt/homebrew/lib/python3.9/site-packages/semgrep/core_runner.py", line 291, in _run_rules_direct_to_semgrep_core core_run = sub_run(cmd, stdout=subprocess.PIPE, stderr=stderr) File "/opt/homebrew/lib/python3.9/site-packages/semgrep/util.py", line 130, in sub_run result = subprocess.run(cmd, *kwargs) # nosem: python.lang.security.audit.dangerous-subprocess-use.dangerous-subprocess-use File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run with Popen(popenargs, **kwargs) as process: File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: '/opt/homebrew/lib/python3.9/site-packages/semgrep/bin/semgrep-core'