-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Air gap environment scanning reports getting deleted automatically after scan #20710
Comments
can you provide the log of trivy? Harbor deletes the report firstly when you repeat scanning one specific artifact, and if at this time there is something wrong at the trivy end, as you have reconfigured your harbor as air gap environment, and the new report won't be generated successfully. |
Hi Wang yan, Thanks for the response, when we run scan if the harbor log level is INFO, trivy adaptor logs are not generating and in the core logs I could see scanning process, if we changed to DEBUG trivy adaptor logs are generating, you can see below. tail -f trivy-adapter.log I noticed these two lines when I ran scanning, please have a look meanwhile will share the latest logs. Jul 5 03:40:20 172.23.0.1 trivy-adapter[2525]: {"level":"debug","msg":"Saving scan report to tmp file","path":"/home/scanner/.cache/reports/scan_report_3489813556.json","time":"2024-07-05T07:40:20Z"} Jul 5 03:48:02 172.23.0.1 trivy-adapter[2525]: {"level":"debug","msg":"Removing scan report tmp file","path":"/home/scanner/.cache/reports/scan_report_684860888.json","time":"2024-07-05T07:48:02Z"} |
Hi, just now enabled the debug logs and run the scan, please have a look into below logs. Jul 8 05:44:09 192.168.80.1 trivy-adapter[2525]: find: '/etc/harbor/ssl': No such file or directory Jul 8 05:47:48 192.168.80.1 trivy-adapter[2525]: {"level":"debug","msg":"Enqueueing scan job","time":"2024-07-08T09:47:48Z"} Jul 8 05:47:52 192.168.80.1 trivy-adapter[2525]: {"level":"debug","msg":"Removing scan report tmp file","path":"/home/scanner/.cache/reports/scan_report_935272296.json","time":"2024-07-08T09:47:52Z"} can you please let me know why trivy logs are generating when we enable debug mode only and why scanning reports are deleted, is this default behavior of airgap environment ? |
Hi Guys,
I have reconfigured existing container registry as air gap environment and harbor version is 2.8.4 and trivy adaptor version 0.44, after reconfigure air gap environment I noticed trivy adaptor logs and container logs able to see only in debug mode and after scanning generated scanning reports getting deleted immediately after scanning completed, is it defult behaviour of the air gap environment??
I have downloaded trivy database and Java database and replaced with existing database.
So kindly let me know how to troubleshoot why the trivy adaptor logs can see in debug mode and why scanning reports are getting deleted.
The text was updated successfully, but these errors were encountered: