Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Checkov scanning on terraform script failing with Permission denied #128

Open
salamflamo opened this issue Mar 30, 2023 · 0 comments
Open

Comments

@salamflamo
Copy link

When scanning terraform file checov throw error :
[warn]: Checkov stderr: 2023-03-30 14:58:41,174 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "C:\Program Files\Python311\Lib\site-packages\checkov\main.py", line 529, in run
self.scan_reports = runner_registry.run(
^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\checkov\common\runners\runner_registry.py", line 149, in run
reports = [r for r in parallel_runner.run_function(func=_parallel_run, items=valid_runners, group_size=1) if r]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\checkov\common\runners\runner_registry.py", line 149, in
reports = [r for r in parallel_runner.run_function(func=_parallel_run, items=valid_runners, group_size=1) if r]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 619, in result_iterator
yield _result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 317, in _result_or_cancel
return fut.result(timeout)
^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 401, in __get_result
raise self._exception
File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\checkov\common\runners\runner_registry.py", line 110, in parallel_run
report = runner.run(
^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\checkov\secrets\runner.py", line 135, in run
f = open(f"{work_path}/runnable_plugin
{plugins_index}.py", "w")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\Program Files\Python311\Lib\site-packages\checkov\secrets/runnable_plugin_1.py'
Traceback (most recent call last):

[warn]: Checkov stderr: File "C:\Program Files\Python311\Scripts\checkov.cmd", line 44, in
sys.exit(Checkov().run())

[warn]: Checkov stderr: ^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^
File "C:\Program Files\Python311\Lib\site-packages\checkov\main.py", line 529, in run

[warn]: Checkov stderr: self.scan_reports = runner_registry.run(

[warn]: Checkov stderr:
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr:
File "C:\Program Files\Python311\Lib\site-packages\checkov\common\runners\runner_registry.py", line 149, in run

[warn]: Checkov stderr: reports = [r for r in parallel_runner.run_function(func=_parallel_run, items=valid_runners, group_size=1) if r]

[warn]: Checkov stderr: ^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^
File "C:\Program Files\Python311\Lib\site-packages\checkov\common\runners\runner_registry.py", line 149, in

[warn]: Checkov stderr: reports = [r for r in parallel_runner.run_function(func=_parallel_run, items=valid_runners, group_size=1) if r]

[warn]: Checkov stderr: ^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^

[warn]: Checkov stderr: File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 619, in result_iterator

[warn]: Checkov stderr: yield _result_or_cancel(fs.pop())

[warn]: Checkov stderr: ^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 317, in _result_or_cancel

[warn]: Checkov stderr: return fut.result(timeout)

[warn]: Checkov stderr: ^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 449, in result

[warn]: Checkov stderr: return self.__get_result()

[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^

[warn]: Checkov stderr: File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 401, in __get_result

[warn]: Checkov stderr: raise self._exception
File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run

[warn]: Checkov stderr: result = self.fn(*self.args, **self.kwargs)
^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\checkov\common\runners\runner_registry.py", line 110, in _parallel_run

[warn]: Checkov stderr: report = runner.run(

[warn]: Checkov stderr: ^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\checkov\secrets\runner.py", line 135, in run

[warn]: Checkov stderr: f = open(f"{work_path}/runnable_plugin_{plugins_index}.py", "w")

[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^^^^^
[warn]: Checkov stderr: ^^^^^^^^^^^^^^^^^^

[warn]: Checkov stderr: PermissionError: [Errno 13] Permission denied: 'C:\Program Files\Python311\Lib\site-packages\checkov\secrets/runnable_plugin_1.py'

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

No branches or pull requests

1 participant