Option to enable specific language or ecosystem cataloger#843
Conversation
|
This is looking pretty good, at first glance. I'll review more thoroughly later today. Note you'll need to sign-off and sign the commits: https://github.com/anchore/syft/blob/main/CONTRIBUTING.md#contributing-to-syft |
Signed-off-by: Ramanan Ravikumar <ramanan@deepfence.io>
| scope: "squashed" | ||
|
|
||
| # enable specific language or ecosystem cataloger | ||
| # default: all catalogers are enabled by default |
There was a problem hiding this comment.
nit: mentioning that all catalogers are enabled by default is a little misleading. There is still a selection of which catalogers to use based off of the source (dir scan or image scan)
| # - "java-cataloger" | ||
| # - "apkdb-cataloger" | ||
| # - "go-module-binary-cataloger" | ||
| enable-cataloger: |
There was a problem hiding this comment.
nit: since this takes multiple values it should probably be enable-catalogers
| ) | ||
|
|
||
| flags.StringArrayP( | ||
| "enable-cataloger", "", nil, |
There was a problem hiding this comment.
this could probably just be catalogers on the cli.
There was a problem hiding this comment.
I was thinking the same thing here 👍
| return catalogers | ||
| } | ||
| var filteredCatalogers []Cataloger | ||
| for _, cataloger := range catalogers { |
There was a problem hiding this comment.
we could add additional logic such that the string -cataloger is optional on each user-specified name, to be nicer to the user.
|
Open question: in the near future we will be deprecating the I feel that this work should also consider how that should work (either in this PR or in a future state) |
|
Hi guys.
|
|
Hi people. |
|
Update: |
# Conflicts: # syft/pkg/cataloger/cataloger.go
# Conflicts: # cmd/packages.go # syft/pkg/cataloger/cataloger.go
Signed-off-by: Ramanan Ravikumar <ramanan@deepfence.io>
|
Hey! 👋 I tried to push a few updates to the PR branch without success: Same story with a force push... I'm going to get this pulled into a in-repo branch to that I can apply some updates. See the new PR here: #1038 |
Fixes #840
If user knows the languages / ecosystem in the image or file system being scanned, user can run syft to generate sbom only for those specific languages / ecosystem.
Example command to enable a language or ecosystem cataloger