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

downgrade trivy to v0.54.1 #112

Merged
merged 1 commit into from
Oct 22, 2024
Merged

downgrade trivy to v0.54.1 #112

merged 1 commit into from
Oct 22, 2024

Conversation

prezha
Copy link
Contributor

@prezha prezha commented Oct 22, 2024

this pr downgrades trivy back to v0.54.1

background:

i think i found a bug in trivy that is causing the file does not exist issue we seen while scanning tar-ed helm charts with with newer (ie, 0.55.2) trivy versions - tl;dr:

  • helm parser calls ParseFS() recursively that in turn uses fs.WalkDir() which is also recursive
  • once an archive is processed, it gets removed from the memoryfs.FS
  • now, while returning from recursive calls, the "parent" caller might try to process archive that was previously known to fs.WalkDir() to exist, but the "child" might have already processed and removed it
  • so, we'd need to detect and skip those

the bug was probably introduced in commit e95152f as part of the pr#7289, where a check was removed, which further means that it was probably introduced in trivy v0.55.0 but it was working in v0.54.1

next steps:

  • we could revert/update our buildkite plugin to use trivy v0.54.1 (this pr)
  • i'll look into proposing a pr to fix this upstream, but the process for that is a bit tedious (you cannot open an issue/pr, you have to go through discussions first)

@prezha prezha merged commit 4039aee into main Oct 22, 2024
5 checks passed
@prezha prezha deleted the trivy-v0.54.1 branch October 22, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants