Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

folders on the C root directory return an exception #7152

Open
visccyberacct opened this issue Nov 12, 2024 · 8 comments
Open

folders on the C root directory return an exception #7152

visccyberacct opened this issue Nov 12, 2024 · 8 comments
Labels

Comments

@visccyberacct
Copy link

Describe the bug
I attempted to run dependency-check on a folder that installs in C:. I reconfirmed this by trying to also scan Program Files with the same exception being thrown. I am unable to generate a log file, I received the same error.

image

Version of dependency-check used
The problem occurs using version 11.1.0 of the cli (cli, gradle plugin, maven plugin, etc.)

Log file
When reporting errors, 99% of the time log file output is required. Please post the log file as a gist and provide a link in the new issue.

To Reproduce
Steps to reproduce the behavior:
Run dependency-check on a folder in the root C:\ directory

Expected behavior
Previous version of dependency-check did not throw an exception when scanning a root directory folder.

Additional context
Add any other context about the problem here.

@jeremylong
Copy link
Owner

consider escaping the command line argument - like one would need to do for anything containing spaces. Also, using forward slashes helps. Hopefully I get this right; I'm not often on a windows box:

dependency-check -o c:/Program\ Files/

@cbgabriel
Copy link

Can confirm similar error when scanning files that install off the root of C: on Windows. Using quotes or escape characters still gives the same error with basedir does not exist.

@jeremylong
Copy link
Owner

@cbgabriel see #7152 (comment)

@cbgabriel
Copy link

@cbgabriel see #7152 (comment)

image

@jeremylong
Copy link
Owner

jeremylong commented Jan 11, 2025 via email

@cbgabriel
Copy link

cbgabriel commented Jan 11, 2025

dir c:\test Shows what?

Directory exists and contains application files. Using quotes or escape characters scans folders in locations within "Program Files\test", "Program Files (x86)\test", etc. works fine but trying to scan anything directly off the root of the C:\ even if the folder path does not have a space gives the basedir error.

image

image

@jeremylong
Copy link
Owner

Can you run ODC again but add the --log debug.log option and then post the debug log? I'm specifically looking for the debug lines from:

            LOGGER.debug("BaseDir: " + baseDir);
            LOGGER.debug("Include: " + include);

@cbgabriel
Copy link

cbgabriel commented Jan 12, 2025

@jeremylong

DEBUG - Scanning C:/test
2025-01-12 10:07:05,651 org.owasp.dependencycheck.App:380
DEBUG - BaseDir: C:test
2025-01-12 10:07:05,653 org.owasp.dependencycheck.App:381
DEBUG - Include: **/*

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

No branches or pull requests

3 participants