-
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
Minor cataloger improvements for the CLI #1831
Conversation
A few minor improvements to the handling of how catalogers are selected: - Add --catalogers keyword "ALL" (which is a synonym for "all") - Add --catalogers keyword "ALL:IMAGE" which selects the default set of catalogers used with images - Add --catalogers keyword "ALL:DIRECTORY" which selects the default set of catalogers used with directories - Add INFO logging messages that indicate which category of catalogers were selected - Add a sanity check: if 0 catalogers are selected, emit an error - Add DEBUG logging message to show a comma-delimited list of the catalogers that were finally selected (suitable for use with the --catalogers CLI option) Also updated the README.md to document the `ALL*` keywords and clarify a few points about cataloger selection. Signed-off-by: Jeff Squyres <jeff@squyres.com>
Move the selection/initialization of the catalogers up before the initialization of the FileResolver. This allows failing fast if no catalogers end up getting selected -- potentially before a (slow) initialization of the FileResolver. Signed-off-by: Jeff Squyres <jeff@squyres.com>
@kzantow Interesting. I'm not deep enough into the zen of Syft to fully grok how #1383 will result in what you're saying, but you seemed to make reference to the same capability in #1776 (comment). Our use case is that we have entirely scanned images up to this point, but now we need to scan a filesystem. We were a little surprised when scanning an image and a corresponding equivalent filesystem turned up different results (which led to my question in #1776). Reading the docs and digging in to the source code led to better understanding and resulted in this PR. To be clear: by examining the source of Syft v0.79.0 and using the
|
@kzantow Ping. |
@jsquyres though #1383 is stale, it's quite important to the syft 1.0 work, which I think will be landing within the next 3-ish months. The feature isn't completed in that PR yet, but the API will be accounting for this. There is a follow up task in the PR description to consider #1039 and #1731 . #1383 has implemented a tag-based cataloger selection approach in the API, the next step is to wire it up to the |
@wagoodman @kzantow Using a tag-based cataloger selection sounds fine to me. If I remove the |
Thanks very much for the contribution @jsquyres. It's really great that you've been improving Syft, but the unfortunate timing of these PRs just so happened to overlap with a couple other analogous but different changes. I don't think there's a lot from this PR that we will be able to use, but we really appreciate the contribution and would encourage you to reach out if there are other things you'd like to work on! |
ALL
(synonym forall
),ALL:IMAGE
, andALL:DIRECTORY
catalog selectors (somewhat in response to Why are different catalogers disabled (by default) in different scenarios? #1776)See the individual commits and their corresponding commit messages for details.