-
Notifications
You must be signed in to change notification settings - Fork 587
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
[Windows] Not able to scan volume mounted to folder #1828
Comments
Hi @dd-cws, thank you for the issue and sorry for the delay replying. Would you be able to submit your patch as a pull request to the Syft repository? We can do some basic testing and hopefully merge it. Let us know if you need any help with that. We appreciate it. |
Sure, I would be happy to do so. Let me go through your PR submission process and create one. |
Hi @dd-cws, I'm a bit stuck following the instructions on step 3 (In the disk management UI find |
Hey @kzantow, may be I wasn't clear in the instructions above. But |
What happened:
syft fails to read directory which has a volume mounted on it.
Say
F:
is mounted onC:\Temp\Mounts\F
and syft is executed as:syft.exe packages dir:C:\Temp\Mounts\
it fails with following error:
What you expected to happen:
syft should scan the entire folder
C:\Temp\Mounts
including mounted volumeSteps to reproduce the issue:
Create a folder
C:\Temp\Mounts\F
Follow below steps to mount
F:
drive toC:\Temp\Mounts\F
C:\Temp\Mounts\F
Win
+R
keys to open Run and typediskmgmt.msc
into Run and hit enterF:
drive, right click and selectChange Drive Letter and Paths
Add
C:\Temp\Mounts\F
and click okRun
syft.exe packages C:\Temp\Mounts
Anything else we need to know?:
The problem seems to be with the call to
os.Readlink(p)
insyft/source/directory_indexer.go
in functionaddSymlinkToIndex
This should be replaced by
filepath.EvalSymlinks(p)
Below is a quick patch that works for me:
Environment:
syft version
: 0.80.0cat /etc/os-release
or similar): Windows 11The text was updated successfully, but these errors were encountered: