trivy clean -a
deletes too much
#7656
-
DescriptionFor reasons, we're running trivy with Desired BehaviorWe expected Actual Behavior
Reproduction Steps1. `mkdir /var/tmp/testing`
2. `trivy clean --cache-dir /var/tmp/testing -a`
3. `ls -l /var/tmp/testing`
`ls: cannot access '/var/tmp/testing': No such file or directory` TargetNone ScannerNone Output FormatNone ModeStandalone Debug Output# trivy clean --cache-dir /var/tmp/testing -a --debug
2024-10-04T14:41:11-07:00 DEBUG No plugins loaded
2024-10-04T14:41:11-07:00 DEBUG Default config file "file_path=trivy.yaml" not found, using built in values
2024-10-04T14:41:11-07:00 DEBUG Cache dir dir="/var/tmp/testing"
2024-10-04T14:41:11-07:00 DEBUG Cache dir dir="/var/tmp/testing"
2024-10-04T14:41:11-07:00 INFO Removing all caches... Operating SystemUbuntu 22.04 VersionVersion: 0.56.1 Checklist
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
I had to laugh when I saw the first checklist item. 😆 |
Beta Was this translation helpful? Give feedback.
-
Maybe create a target named We stumbled across this bug while trying to set up a central server for downloading the databases and sharing among all of our hosts, so we don't end up downloading 300+ copies of the vulnerability and java dbs all at the same time. We figured that many people would consider that "antisocial behaviour". 😄 |
Beta Was this translation helpful? Give feedback.
-
BTW, https://aquasecurity.github.io/trivy/test/docs/configuration/db/#remove-dbs says to use
|
Beta Was this translation helpful? Give feedback.
-
Hello @PenelopeFudd |
Beta Was this translation helpful? Give feedback.
-
Created #7703 |
Beta Was this translation helpful? Give feedback.
Created #7703