You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
I am encountering an issue with the Checkov executable on a Windows 11 machine when scanning repositories located on a different drive mount than the one where the Checkov executable is located. The issue causes a ValueError indicating that the path is on a different mount, which prevents the scan from completing successfully. This issue was reported and closed in 2021, but I am still experiencing it in December 2024.
Examples
# Running the following command in PowerShell
.\checkov.exe -d D:\projects\others\fooworld --skip-path target -o json --output-file-path D:\projects\others\fooworld\iac-test-res --framework cloudformation dockerfile helm json yaml kubernetes terraform terraform_plan --quiet
Expected outcome: The scan should complete successfully and produce the expected output file.
Exception Trace
2024-12-17 13:03:03,581 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "checkov\main.py", line 519, in run
self.scan_reports = runner_registry.run(
File "checkov\common\runners\runner_registry.py", line 176, in run
forresultin parallel_runner_results:
File "concurrent\futures\_base.py", line 619, in result_iterator
File "concurrent\futures\_base.py", line 437, in result
File "concurrent\futures\_base.py", line 389, in __get_result
File "concurrent\futures\thread.py", line 57, in run
File "checkov\common\runners\runner_registry.py", line 835, in _parallel_run
report = runner.run(
File "checkov\terraform\runner.py", line 134, in run
self.check_tf_definition(report, root_folder, runner_filter, collect_skip_comments)
File "checkov\terraform\runner.py", line 230, in check_tf_definition
self.pbar.set_additional_data({"Current File Scanned": os.path.relpath(full_file_path.file_path)})
File "ntpath.py", line 703, in relpath
ValueError: path is on mount 'D:', start on mount 'C:'
Traceback (most recent call last):
File "checkov\main.py", line 519, in run
File "checkov\common\runners\runner_registry.py", line 176, in run
File "concurrent\futures\_base.py", line 619, in result_iterator
File "concurrent\futures\_base.py", line 437, in result
File "concurrent\futures\_base.py", line 389, in __get_result
File "concurrent\futures\thread.py", line 57, in run
File "checkov\common\runners\runner_registry.py", line 835, in _parallel_run
File "checkov\terraform\runner.py", line 134, in run
File "checkov\terraform\runner.py", line 230, in check_tf_definition
File "ntpath.py", line 703, in relpath
ValueError: path is on mount 'D:', start on mount 'C:'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "checkov\main.py", line 849, in<module>
File "checkov\main.py", line 708, in run
File "checkov\main.py", line 736, in exit_run
NameError: name 'exit' is not defined
[15920] Failed to execute script 'main' due to unhandled exception!
Desktop (please complete the following information):
OS: windows 11
Checkov Version : 3.2.171
Additional context
This issue was previously reported and closed in 2021, but it seems to persist. Any insights or suggestions for a workaround would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Describe the issue
I am encountering an issue with the Checkov executable on a Windows 11 machine when scanning repositories located on a different drive mount than the one where the Checkov executable is located. The issue causes a ValueError indicating that the path is on a different mount, which prevents the scan from completing successfully. This issue was reported and closed in 2021, but I am still experiencing it in December 2024.
Examples
Expected outcome: The scan should complete successfully and produce the expected output file.
Exception Trace
Desktop (please complete the following information):
Additional context
This issue was previously reported and closed in 2021, but it seems to persist. Any insights or suggestions for a workaround would be greatly appreciated.
The text was updated successfully, but these errors were encountered: