mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
fix(k8s): no error logged if trivy can't get docker image in kubernetes mode (#2521)
* Enable k8s logging and increase log level of the image scan errors * Rework errors reporting * Rework GetErrors method into printErrors Print errors during report writing * Increase log level for scan errors logging
This commit is contained in:
@@ -71,6 +71,7 @@ func run(ctx context.Context, opts flag.Options, cluster string, artifacts []*ar
|
||||
if err != nil {
|
||||
return xerrors.Errorf("k8s scan error: %w", err)
|
||||
}
|
||||
|
||||
if err := report.Write(r, report.Option{
|
||||
Format: opts.Format,
|
||||
Report: opts.ReportFormat,
|
||||
|
||||
Reference in New Issue
Block a user