-
Notifications
You must be signed in to change notification settings - Fork 580
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
--exclude-pkgs option #1229
Comments
Thanks for the issue @rchincha! Can you walk us through the reasoning for excluding packages? We want syft to be as close to the truth as possible when generating an SBOM. Allowing users to exclude or omit packages that are present and cataloged seems a little outside of that goal. Definitely happy to talk through how you would use it! |
We've also added this to the agenda for tomorrow's community meeting for syft and grype. Feel free to join there as well and will get other feedback from the community! https://twitter.com/GrypeProject/status/1574431163799801856?cxt=HHwWgMC8maizwNkrAAAA |
Thanks @spiffcs. We have a situation where we build a chroot without the package db of any sort. So in order to get the syft's sbom capability, we setup a separate environment with some base distro install, install required packages on top of it and would now like to exclude the packages in the base install if appropriate. Alternatively, instead of a blacklist (--exclude), perhaps a whitelist (--include) will work better. Hope the problem statement is clear. |
Any additional thoughts/updates on this? |
Hi @rchincha, we discussed this at the community meeting last week (see the notes here). If I understand the use case you're talking about it's less about excluding packages and more about only including user-defined packages (but excluding the base image packages), is this correct? If so, this is something that has been asked for before and something we'd like to do. We have the concepts of scopes but currently only |
@kzantow, yes spot-on our requirement. Your suggestion about https://github.com/anchore/syft#sbom |
@rchincha the idea is we would just exclude the layers from the base image, so any layers you add from your own Dockerfile would be included. I'm not sure we've worked out every detail here, but that's the gist. As for
The difference here is |
@kzantow thanks for the clarification, it is the deletions that make the two options different. About |
@rchincha we do not currently have an ETA for this, but of course PRs are welcome! FYI - I believe this change would probably need to be done predominantly in the stereoscope library, which Syft relies on for processing images. |
@kzantow after thinking about this some more, also wondering if an Most package managers, given a package name/version, can also list files included in the package and files to be installed.
So the question is can one simply pass the package name/version and its constituent list of files and generate a SPDX document? This of course will be orthogonal to grokking container images. |
@rchincha I don't quite follow |
|
What would you like to be added:
Once packages are discovered using the cataloger, can I specify a list of packages to be excluded?
Why is this needed:
Generate a SBOM only for a subset of packages.
Additional context:
The text was updated successfully, but these errors were encountered: