Skip to content
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

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

Closed
2 tasks done
nscuro opened this issue Aug 12, 2024 · 3 comments · Fixed by #4116
Closed
2 tasks done

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

nscuro opened this issue Aug 12, 2024 · 3 comments · Fixed by #4116
Labels
enhancement New feature or request integration/trivy Related to the Trivy integration p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort
Milestone

Comments

@nscuro
Copy link
Member

nscuro commented Aug 12, 2024

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: aquasecurity/trivy#7329 (reply in thread)

Proposed Behavior

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

Checklist

@nscuro nscuro added enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk integration/trivy Related to the Trivy integration size/M Medium effort labels Aug 12, 2024
@nscuro nscuro added this to the 4.12 milestone Aug 12, 2024
nscuro added a commit to nscuro/dependency-track that referenced this issue Sep 1, 2024
@nscuro
Copy link
Member Author

nscuro commented Sep 1, 2024

Tried to implement this (current WIP state here: nscuro@2495488), 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 nscuro added the blocked label Sep 1, 2024
@nscuro nscuro removed this from the 4.12 milestone Sep 1, 2024
@nscuro
Copy link
Member Author

nscuro commented Sep 2, 2024

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

@nscuro nscuro removed the blocked label Sep 2, 2024
@nscuro nscuro added this to the 4.12 milestone Sep 2, 2024
nscuro added a commit to nscuro/dependency-track that referenced this issue Sep 2, 2024
nscuro added a commit to nscuro/dependency-track that referenced this issue Sep 2, 2024
@nscuro nscuro closed this as completed in af64eef Sep 2, 2024
Gepardgame pushed a commit to Gepardgame/dependency-track that referenced this issue Sep 10, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request integration/trivy Related to the Trivy integration p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant