Prisma Cloud Application Security: ValueError: path is on mount 'D:', start on mount 'C:' when scanning repositories on different mounts

Prisma Cloud Application Security: ValueError: path is on mount 'D:', start on mount 'C:' when scanning repositories on different mounts

665
Created On 01/09/25 22:51 PM - Last Modified 10/26/25 21:44 PM


Symptom


For Prisma Cloud Application Security while running a scan with Local Checkov/VSCODE/IntelliJ with the following command we observe a mount error in Windows OS.



Environment


  • Checkov
  • Prisma Cloud
  • VSCODE
  • IntelliJ
  • Microsoft Windows OS


Cause


Microsoft Windows OS does not have an absolute root directory, unlike Linux/MAC OS. Instead, it has a root directory for each drive. It's not the current directory/drive that's the problem.

Error Example:

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
    for result in 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!



Resolution


The following can be the possible 3 solutions:

  1. Move the entire project to your C: drive and then rerun checkov command
  2. First run the command cd D:\ to change current directory to the D drive and then run checkov command
  3. Scan with Checkov using Docker/Docker Desktop


Additional Information


If error is ValueError: path is on mount 'E:', start on mount 'C:'

Depending on the path mount Drive i.e 'E:'.

We'll run the command cd E:\ to change current directory to the E drive and then run checkov command.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000sdBQCAY&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail