-
Couldn't load subscription status.
- Fork 727
683 windows filepath #735
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
683 windows filepath #735
Conversation
Signed-off-by: Christopher Phillips <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: spiffcs <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: spiffcs <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: spiffcs <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
6d63d8b to
ce9e958
Compare
Benchmark Test ResultsBenchmark results from the latest changes vs base branch |
Signed-off-by: Christopher Angelo Phillips <[email protected]>
c46876b to
93a212d
Compare
Signed-off-by: spiffcs <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
93a212d to
e0a8efd
Compare
Signed-off-by: Christopher Phillips <[email protected]> Signed-off-by: Christopher Angelo Phillips <[email protected]>
| if runtime.GOOS == WindowsOS { | ||
| filePath = posixToWindows(filePath) | ||
| } | ||
| return file.NewLazyReadCloser(filePath), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice find
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work --I don't think we need to add window-specific tests for this work quite yet. We can take that on in the future.
…hub.com/hectorj2f/syft into hectorj2f/add_dependencies_to_cyclonedx * 'hectorj2f/add_dependencies_to_cyclonedx' of https://github.com/hectorj2f/syft: (29 commits) Improve CycloneDX format output (#710) Add additional PHP metadata (#753) Update Syft formats for SyftJson (#752) Add support for "file" source type in syftjson unmarshaling (#750) remove contains file from spdx dependency generation support .sar for java ecosystem (#748) Start developer documentation (#746) Align SPDX export more with SPDX 2.2 specification (#743) Replace distro type (#742) update goreleaser with windows checksums (#740) bump stereoscope version to remove old containerd (#741) Add support for multiple output files in different formats (#732) Add support for searching for jars within archives (#734) 683 windows filepath (#735) Fix CPE encode/decode when it contains special chars (#714) support .par for java ecosystems (#727) Add arm64 support to install script (#729) Revert "bump goreleaser to v1.2 (#720)" (#731) Add a version flag (#722) Add lpkg as java package format (#694) ...
Support Windows Directory Resolver Add function that converts windows to posix functionality Add function that converts posix to windows Add build tags to remove windows developer environment errors redact carriage return specific windows issues Signed-off-by: Christopher Phillips <[email protected]> Signed-off-by: fsl <[email protected]>
Support Windows Directory Resolver Add function that converts windows to posix functionality Add function that converts posix to windows Add build tags to remove windows developer environment errors redact carriage return specific windows issues Signed-off-by: Christopher Phillips <[email protected]>
Support Windows Directory Resolver Add function that converts windows to posix functionality Add function that converts posix to windows Add build tags to remove windows developer environment errors redact carriage return specific windows issues Signed-off-by: Christopher Phillips <[email protected]>
Support Windows Directory Resolver Add function that converts windows to posix functionality Add function that converts posix to windows Add build tags to remove windows developer environment errors redact carriage return specific windows issues Signed-off-by: Christopher Phillips <[email protected]>
Support Windows Directory Resolver Add function that converts windows to posix functionality Add function that converts posix to windows Add build tags to remove windows developer environment errors redact carriage return specific windows issues Signed-off-by: Christopher Phillips <[email protected]>
Support Windows Directory Resolver
Summary
When scanning on windows using the
dirdirective the current directory resolver implementation cannot lookup file nodes that match glob patterns in thefiletree.By converting Windows filepaths on the way in so that their locations match theposixstandard, we allow for syft to match on directory resolver matching criteria.Paths are then translated back into windows paths on the way out so the presentation layer shows users the correct on disk details for the given SBOM items.
Considertations
RealpathandVirtualPathis sometimes incorrect. I'm currently trying to track down where this bug exists. ShouldVirtualPathever just be thePosixrepresentation as found in the file tree or should we be converting these back?Screenshot demo showing functionality on Windows 11: