From 61a49fef54f82d13f05f36c19291a8f162a4974c Mon Sep 17 00:00:00 2001 From: Blaize M Kaye Date: Thu, 28 Sep 2023 08:06:16 +1300 Subject: [PATCH] Adds debugging --- internal/handler/trivyProcessing.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/handler/trivyProcessing.go b/internal/handler/trivyProcessing.go index a58c336..dbb1f20 100644 --- a/internal/handler/trivyProcessing.go +++ b/internal/handler/trivyProcessing.go @@ -40,21 +40,21 @@ var queue = sbomQueue{ } func SbomToProblems(trivyRemoteAddress string, bomWriteDirectory string, environmentId int, service string, sbom cdx.BOM) error { + fmt.Println("AAA") rep, err := executeProcessingTrivy(trivyRemoteAddress, bomWriteDirectory, sbom) if err != nil { return err } - + fmt.Println("BBB") problems, err := trivyReportToProblems(environmentId, problemSource, service, rep) if err != nil { return err } - + fmt.Println("CCC") err = writeProblemsArrayToApi(environmentId, problemSource, service, problems) if err != nil { return err } - return nil } @@ -264,6 +264,8 @@ func trivyReportToProblems(environment int, source string, service string, repor ret = append(ret, p) } } + fmt.Println("Found the following problems:") + fmt.Println(ret) return ret, nil }