Skip to content

Commit

Permalink
Adds debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko committed Sep 27, 2023
1 parent f2a4f5a commit 61a49fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/handler/trivyProcessing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 61a49fe

Please sign in to comment.