Skip to content

Commit

Permalink
Handle trivy insecure database in ClientServer mode (aquasecurity#1623)
Browse files Browse the repository at this point in the history
  • Loading branch information
miecio45 authored Nov 8, 2023
1 parent 089856b commit 95a7f1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/plugins/trivy/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,12 @@ func GetPodSpecForClientServerMode(ctx trivyoperator.PluginContext, config Confi
Value: "true",
})
}

if config.GetDBRepositoryInsecure() {
env = append(env, corev1.EnvVar{
Name: "TRIVY_INSECURE",
Value: "true",
})
}
requirements, err := config.GetResourceRequirements()
if err != nil {
return corev1.PodSpec{}, nil, err
Expand Down

0 comments on commit 95a7f1f

Please sign in to comment.