Open officerNordberg opened 7 months ago
Hi @officerNordberg, thanks for the report! It doesn't look as though Syft currently knows anything about Envoy binaries. Syft's binary cataloger needs to know how to match each individual app: https://github.com/anchore/syft/blob/main/syft/pkg/cataloger/binary/classifiers.go
If you're interested in adding support for envoy detection, please let us know and we can help get started, otherwise I will move this into our backlog for future consideration. Thanks!
@tgerla I'm your reluctant huckleberry. Sure, where do I start?
Great! First please take a quick look at our contributor's guide: https://github.com/anchore/syft/blob/main/CONTRIBUTING.md and our developer's guide: https://github.com/anchore/syft/blob/main/DEVELOPING.md -- you will probably want to make sure you can run Syft out of a checkout like step 4 in DEVELOPING.md.
From there, you will add a new classifier to the list here: https://github.com/anchore/syft/blob/main/syft/pkg/cataloger/binary/classifiers.go
You will need to determine a file glob and "EvidenceMatcher" which is basically a regular expression designed to reliably identify the binary artifact you're classifying. It's often helpful to run "strings" on your binary and look for possible fragments of plain text that you can match against. You can take a look at some of the other classifiers to get an idea of what to look for.
If you want, please feel free to join our Slack (https://get.anchore.com/join-anchore-community/) and post to the #syft-help channel and we will be happy to help you through the process.
Thank you for giving it a shot! Much appreciated.
There are two approaches to getting arbitrary binaries detected by syft:
.note.package
ELF section. Syft recently added support to pick up on such payloads with further enhancements inbound. It looks like there are already bazel rules in envoy that add ELF notes, another rule could be added during the release to include name and version information.
What happened: SBOM is missing principle binary artifact from image https://github.com/envoyproxy/envoy/blob/release/v1.27/ci/Dockerfile-envoy
What you expected to happen:
Steps to reproduce the issue: syft scan --from registry envoyproxy/envoy:v1.27-latest
Environment: