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

Trivy Java DB as part of server mode #3560

Open
computeralex92 opened this issue Feb 6, 2023 · 7 comments
Open

Trivy Java DB as part of server mode #3560

computeralex92 opened this issue Feb 6, 2023 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@computeralex92
Copy link
Contributor

Currently the Trivy client itself downloads the Java DB if a java package is detected, regardless if it's configured to use a central server (client / server mode).
It would be great if the server is storing the Java DB itself and the client is using it for detecting security issues in java packages; without the need to download the DB on client side.

@computeralex92 computeralex92 added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 6, 2023
@knqyf263 knqyf263 added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Feb 7, 2023
@knqyf263 knqyf263 added this to the v0.38.0 milestone Feb 7, 2023
@knqyf263 knqyf263 removed this from the v0.38.0 milestone Feb 21, 2023
@DaspawnW
Copy link
Contributor

is there any information / plan when this will be implemented?

Imagine you have a set of hosts where it's running or containers used for trivy vuln scanning this is a huge amount of traffic.

@knqyf263
Copy link
Collaborator

We were thinking about the design and realized that simply putting the DB on the server side would generate a lot of HTTP requests to the server since the DB is accessed sequentially. HTTP requests need to be reduced by aggregating DB access, but this will require significant modifications to the code. We'd say unfortunately it is not coming soon. It's still in our backlog, though.

Instead, you can host the database in your own registry and use --java-db-repository.
https://aquasecurity.github.io/trivy/v0.41/docs/scanner/vulnerability/#private-hosting_1

Or download the DB manually and copy it to your machine.
https://aquasecurity.github.io/trivy/v0.41/docs/advanced/air-gap/#download-the-java-index-database1

@gerbil
Copy link

gerbil commented Dec 20, 2023

--skip-db-update --skip-java-db-update - is not working via Trivy operator in client-server mode

@sastorsl
Copy link

Is this still the issue, that the client needs to download the java-db?

@andyerms
Copy link

Is this still the issue, that the client needs to download the java-db?

Yes, it is (

@sastorsl
Copy link

sastorsl commented Sep 17, 2024

I think it would be good if this was highlighted in the docs on https://aquasecurity.github.io/trivy/v0.55/docs/references/modes/client-server/

One can have a redis cache as a backend, but what is then the use of the trivy server?
Should one do one or the other, or is there any benefit in doing both a trivy server and a redis cache, for instance.

@sastorsl
Copy link

#7528

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
Status: No status
Development

No branches or pull requests

6 participants