-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add "path:" syntax for syft tool #115
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
Conversation
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
if not path: | ||
path = tempfile.mkdtemp() | ||
atexit.register(shutil.rmtree, path) | ||
dest_path = os.path.join(path.replace("path:", ""), build_version, "local_install") |
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.
In the grype implementation, I wish I'd handled relative paths differently here.
This can end up with a path like: /Users/willmurphy/work/grype1373/test/quality/.yardstick/tools/grype/.._.._/v0.65.1-14-g8693d1f-dirty-72aef183
and I with the .._.._
fragment looked better, but I'm not sure it matters. I wish it didn't start with a .
because I don't like hidden files.
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.
Let me see if I can just remove that fragment all together
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.
I've tried to find a reasonable way around this and can't find a good way to dispose of that fragment yet. Do you mind if we punt on this comment and I'll come back and follow up with a separate PR when I have more cycles?
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
c008487
to
926f7b4
Compare
Summary
Similar to #111 - Adds the ability to install syft from local path.
When making updates to the SBOM that grype consumes it's important to allow local development on syft so that developers can test their changes E2E before submitting major changes to things that might affect matching logic such as PURL/CPE.
This change allows developers to use a build based on their local
syft
to experiment with different SBOM changes.New Config Example that uses local syft changes against changes in grype and the stable latest
How it's shown in results: