DependencyTrack / dependency-track

Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
https://dependencytrack.org/
Apache License 2.0
2.72k stars 580 forks source link

Migrate Trivy integration to use Trivy's gRPC API #4065

Closed nscuro closed 3 months ago

nscuro commented 3 months ago

Current Behavior

The recent breaking changes in our Trivy integration were caused by the fact that we use the HTTP API, which Trivy generates based on gRPC / Protobuf definitions. It does not actively support this API, and the team might remove it soon-ish: https://github.com/aquasecurity/trivy/discussions/7329#discussioncomment-10312595

Proposed Behavior

Migrate to Trivy's gRPC API. Client code can be generated based on Trivy's .proto definitions:

Checklist

nscuro commented 3 months ago

Tried to implement this (current WIP state here: https://github.com/nscuro/dependency-track/commit/2495488aaf8d95a77aa304aac85409e1a5458146), but realized that Trivy indeed only exposes its gRPC services via HTTP. Blocked until the gRPC services are exposed, if the Trivy project even wants to do it.

nscuro commented 3 months ago

Nvm, the HTTP server exposed by Trivy also supports application/protobuf payloads. Protobuf can be used without gRPC: https://twitchtv.github.io/twirp/docs/proto_and_json.html

github-actions[bot] commented 2 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.