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

Reduce the amount of vulnerability fields stored in the vulnerabilities report #442

Open
chen-keinan opened this issue Aug 23, 2022 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. target/kubernetes Issues relating to kubernetes cluster scanning

Comments

@chen-keinan
Copy link
Collaborator

in some clusters the vulnerability report produce by 'trivy-operator' is hitting the max request limit of etcd

it is suggested to reduce the amount of fields stored for each vulnerability , that same data already exist in AVD so the data will not be lost.

example of fields that can be removed: title , fixed version and etc

Vulnerability data with fields :

{"vulnerabilityID":"CVE-2022-1304","resource":"libcom","installedVersion":"1.43.4-2+deb9u1","fixedVersion":"","severity":"HIGH","title":"e2fsprogs: out-of-bounds read/write via crafted filesystem","primaryLink":"https://avd.aquasec.com/nvd/cve-2022-1304","links":[],"score":5.8,"target":""}

Vulnerability data without fields :

{"vulnerabilityID":"CVE-2022-1304","resource":"libcom","installedVersion":"1.43.4-2+deb9u1","severity":"HIGH","primaryLink":"https://avd.aquasec.com/nvd/cve-2022-1304\"}

The removed fields can be found in AVD for this CVE-2022-1304 so no data get lost

@chen-keinan chen-keinan added kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. target/kubernetes Issues relating to kubernetes cluster scanning labels Aug 23, 2022
@Orrimp
Copy link

Orrimp commented Feb 22, 2024

We also have this problem "error":"etcdserver: request is too large". The Scan Jobs and Pods remain, and therefore no new Scan Jobs can start.

@aarz-snl
Copy link

seeing this same problem

@Starttoaster
Copy link
Contributor

It would be excellent if all of the current fields could stay in PolicyReports if it's planned to support those. The data being in the report makes it easier to develop alternative viewing tools that consume the in-cluster reports. In particular I would like to keep the "fixed version" field, though, if not both.

@cthtrifork
Copy link

Is there a solution proposal?

  1. We could update the builder.go file to do some clever reflection of allowedFields before submitting the report
  2. We could clone vulnerability_types.go and create a similar set of structs with less fields. This would have a lot of impact on the codebase, as we would need to use interfaces or possible pass around func() some more. I am not sure how tokeep the codebase pretty.
  3. ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. target/kubernetes Issues relating to kubernetes cluster scanning
Projects
None yet
Development

No branches or pull requests

5 participants