Failing a --download-db-only run, deletes db/metadata.json, causing consequent --skip-db-update scans to fail. #8786
Mikael-Gustavsson
started this conversation in
Bugs
Replies: 1 comment 4 replies
-
Hello @Mikael-Gustavsson IIUC there was a reason why we remove metadata.json before downloading trivy-db. But now we use I have tried skipping the removal metadata.json - it looks like works correctly (but I haven't checked it thoroughly) @knqyf263 am i missing something? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Trying, and failing, to update the database removes the file metadata.json from the database folder. This is a problem in airgapped scenarios, where db-update is separate from scans. After which, all regular scans will fail with error:
Desired Behavior
Leave the file metadata.json as is, on disk, until it can be refreshed with new valid content.
Actual Behavior
The file metadata.json is removed from disk.
Reproduction Steps
Target
SBOM
Scanner
Vulnerability
Output Format
Table
Mode
Standalone
Debug Output
Operating System
windows server 2019
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions