-
Notifications
You must be signed in to change notification settings - Fork 601
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
Merged
Merged
683 windows filepath #735
+209
−11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
Signed-off-by: spiffcs <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
Signed-off-by: spiffcs <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
Signed-off-by: spiffcs <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
6d63d8b
to
ce9e958
Compare
Benchmark Test ResultsBenchmark results from the latest changes vs base branch
|
Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
c46876b
to
93a212d
Compare
Signed-off-by: spiffcs <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
93a212d
to
e0a8efd
Compare
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com>
wagoodman
reviewed
Jan 6, 2022
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
wagoodman
approved these changes
Jan 6, 2022
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.
spiffcs
added a commit
that referenced
this pull request
Jan 19, 2022
…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) ...
fengshunli
pushed a commit
to fengshunli/syft
that referenced
this pull request
Jan 24, 2022
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 <christopher.phillips@anchore.com> Signed-off-by: fsl <1171313930@qq.com>
spiffcs
added a commit
that referenced
this pull request
Jan 24, 2022
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 <christopher.phillips@anchore.com>
spiffcs
added a commit
that referenced
this pull request
Jan 25, 2022
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 <christopher.phillips@anchore.com>
jonasagx
pushed a commit
to jonasagx/syft
that referenced
this pull request
Jan 28, 2022
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 <christopher.phillips@anchore.com>
GijsCalis
pushed a commit
to GijsCalis/syft
that referenced
this pull request
Feb 19, 2024
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 <christopher.phillips@anchore.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support Windows Directory Resolver
Summary
When scanning on windows using the
dir
directive 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 theposix
standard, 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
Realpath
andVirtualPath
is sometimes incorrect. I'm currently trying to track down where this bug exists. ShouldVirtualPath
ever just be thePosix
representation as found in the file tree or should we be converting these back?Screenshot demo showing functionality on Windows 11: