diff --git a/internal/handler/trivyProcessing.go b/internal/handler/trivyProcessing.go index b8e3abd..4cca777 100644 --- a/internal/handler/trivyProcessing.go +++ b/internal/handler/trivyProcessing.go @@ -8,6 +8,7 @@ import ( "github.com/Khan/genqlient/graphql" "github.com/aquasecurity/trivy/pkg/commands/artifact" "github.com/aquasecurity/trivy/pkg/flag" + aqualog "github.com/aquasecurity/trivy/pkg/log" "github.com/aquasecurity/trivy/pkg/types" "github.com/uselagoon/lagoon/services/insights-handler/internal/lagoonclient" "io" @@ -151,10 +152,11 @@ func executeProcessingTrivy(trivyRemoteAddress string, bomWriteDir string, bom c os.Remove(fullFilename) file.Close() }() - ctx, cancel := context.WithTimeout(context.Background(), time.Second*1000) defer cancel() + aqualog.InitLogger(false, true) + opts := flag.Options{ GlobalOptions: flag.GlobalOptions{ ConfigFile: "trivy.yaml",