-
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!: add clean subcommand #6993
Conversation
Signed-off-by: knqyf263 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knqyf263 i found that we show 2 same errors:
➜ ./trivy -d image --reset alpine
2024-06-24T11:18:41+06:00 ERROR "--reset" was removed. Use "trivy clean --all" instead.
2024-06-24T11:18:41+06:00 FATAL Fatal error flag error: db flag error: unable to parse flag: "--reset" was removed
Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: DmitriyLewen <[email protected]>
I returned
I eventually separated the error message. In short, it's intended. If you don't like |
Signed-off-by: knqyf263 <[email protected]>
Got it 😄 |
Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: DmitriyLewen <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
`trivy image --clear-cache` now returns an error "Require at least 1 argument", then it doesn't show "Use 'trivy clean' instead". Signed-off-by: knqyf263 <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
@DmitriyLewen I change the message slightly. |
@simar7 @nikpivkin According to the discussion in #6992, I didn't add |
Signed-off-by: knqyf263 <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
@DmitriyLewen Thanks! It's my bad. |
@chen-keinan @simar7 @nikpivkin Since it's a breaking change, I'd wait for you guys. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Announced #7010 |
I didn't know but we seemed to have supported It seems at some point, we have dropped support for this environment variable (and maybe other In any case, if we no longer support that environment variable, we have to implement a way in trivy-action to be able to support such a use case. Please correct me if I missed something. |
|
@knqyf263 OK looks like in that case we will need to add support for this in the action as currently I don't see anyway to clean the cache from the action. |
Signed-off-by: knqyf263 <[email protected]> Co-authored-by: DmitriyLewen <[email protected]> Co-authored-by: DmitriyLewen <[email protected]>
Description
Delete cache management flags and add
trivy clean
.Clear all caches
Before
After
Clear scan cache
Before
After
Clear checks bundle
Before
After
Clear vulnerability database
Before
N/A (
trivy image --reset
removes all)After
Clear Java database
Before
N/A (
trivy image --reset
removes all)After
Related issues
trivy clean
command and remove cache-clearing flags #6992Checklist