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

Init of Trivy from the main branch is slow. #7431

Closed
DmitriyLewen opened this issue Sep 2, 2024 · 2 comments · Fixed by #7427
Closed

Init of Trivy from the main branch is slow. #7431

DmitriyLewen opened this issue Sep 2, 2024 · 2 comments · Fixed by #7427
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@DmitriyLewen
Copy link
Contributor

Description

After #7417 Trivy starts slower.

➜ git checkout a5aa63eff7e229744090f9ad300c1bec3259397e
Previous HEAD position was 39c80248b chore(deps): Bump trivy-checks (#7417)
HEAD is now at a5aa63eff fix(misconf): do not register Rego libs in checks registry (#7420)
➜ mage build
➜ time ./trivy -v 
./trivy -v  0.35s user 0.05s system 30% cpu 1.304 total

➜ git checkout 39c80248bcafd296e0bb6712113da3abe70e4ce2
Previous HEAD position was a5aa63eff fix(misconf): do not register Rego libs in checks registry (#7420)
HEAD is now at 39c80248b chore(deps): Bump trivy-checks (#7417)
➜ mage build 
➜ time ./trivy -v                                      
./trivy -v  8.58s user 0.19s system 129% cpu 6.791 total
@DmitriyLewen DmitriyLewen added the kind/bug Categorizes issue or PR as related to a bug. label Sep 2, 2024
@DmitriyLewen
Copy link
Contributor Author

This is critical for us.
We are delaying the release of v0.55.0 until this issue is resolved.

@knqyf263 knqyf263 added this to the v0.55.0 milestone Sep 2, 2024
@simar7
Copy link
Member

simar7 commented Sep 2, 2024

This is due two reasons:

  1. (short term fix): There is a performance issue in OPA. See here for the issue. We have a fix for it upstream but it hasn't been merged just yet. In the meantime, we can cherry pick the fix to not delay our release as done here

  2. (long term fix, separate issue) As @knqyf263 mentioned here we should only initialize the misconf checks when the misconfiguration scanner is enabled. We will tackle this improvement in a separate feature improvement so we don't delay the current release. Issue to track feat(misconf): Improve check registration and loading #7434

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.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants