Skip to content

Commit

Permalink
Debug and test info update
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko committed Oct 10, 2023
1 parent dff6164 commit 8490941
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions internal/handler/insightsParserFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func processSbomInsightsData(h *Messaging, insights InsightsData, v string, apiC
isAlive, err := IsTrivyServerIsAlive(h.TrivyServerEndpoint)
if err != nil {
return nil, "", fmt.Errorf("trivy server not alive: %v", err.Error())
} else {
fmt.Println("trivy is alive")
}
if isAlive {
err = SbomToProblems(apiClient, h.TrivyServerEndpoint, "/tmp/", environment.Id, "insights-handler", *bom)
Expand Down
2 changes: 1 addition & 1 deletion internal/handler/testassets/compressed.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions internal/handler/trivyProcessing.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func trivyReportToProblems(environment int, source string, service string, repor
ret = append(ret, p)
}
}
fmt.Println("Found the following problems:")
fmt.Println(ret)
fmt.Printf("Found %v problems for environment %v", len(ret), environment)

return ret, nil
}
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func main() {
log.Fatalf("NO TRIVY SERVER ENDPOINT SET - exiting")
os.Exit(1)
}
} else {
log.Println("PROBLEMS FROM SBOM - disabled")
}

// configure the backup handler settings
Expand Down

0 comments on commit 8490941

Please sign in to comment.