-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(image): prevent scanning oversized container images #8178
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
f188f2d
to
84689dd
Compare
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
72f3146
to
eddcbf8
Compare
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
@knqyf263 I was thinking that we could download the compressed layer and then decompress it ourselves. I saw that downloader.Download is used for decompression. Does it support all the compression types that |
This is what was in my mind.
|
@knqyf263 Then we can't display the progress bar correctly, because we don't know the size of the uncompressed layer. |
Can't we use the progress in ggcr? |
If it doesn't work, we can use |
@knqyf263 I kept the old behavior, if no flag is passed, to avoid unnecessary disk operations. But then the progress bar will be displayed only when the flag is passed. What do you think? |
@nikpivkin I got an idea. |
This might be better.
|
Even better
|
@knqyf263 Ok, I'll think about how to use this with the progress bar pool otherwise there is flickering in the terminal when loading in parallel |
@nikpivkin Actually, the progress bar should be discussed in #8186. I'll re-post it there. |
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
BTW, Trivy also supports VM images. I'm unsure, but users may want to introduce the same functionality in the future. Do you think we want to rename |
I think that I think Also i suggest to add this flag for VM scan in another PR. |
Description
This PR adds the
--max-image-size
flag. If the flag is specified and the uncompressed image size exceeds the maximum size, Trivy exits with an error. If the flag is not specified, the behaviour does not change.For more implementation details, see #8176
Related issues
Checklist