Skip to content

Commit

Permalink
Removes extraneous code
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaize Kaye committed Apr 16, 2024
1 parent f7863ed commit 5bfb578
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions internal/handler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,35 +336,6 @@ func (h *Messaging) gatherFactsFromInsightData(incoming *InsightsMessage, resour
return lagoonSourceFactMapCollection, lagoonSourceProblemMapCollection, nil
}

func trivySBOMProcessing(apiClient graphql.Client, trivyServerEndpoint string, resource ResourceDestination, payload string) error {

bom, err := getBOMfromPayload(payload)
if err != nil {
return err
}

// Determine lagoon resource destination
_, environment, apiErr := determineResourceFromLagoonAPI(apiClient, resource)
if apiErr != nil {
return apiErr
}

// we process the SBOM here
isAlive, err := IsTrivyServerIsAlive(trivyServerEndpoint)
if err != nil {
return fmt.Errorf("trivy server not alive: %v", err.Error())
} else {
slog.Debug("Trivy is reachable")
}
if isAlive {
err = SbomToProblems(apiClient, trivyServerEndpoint, "/tmp/", environment.Id, resource.Service, *bom)
}
if err != nil {
return err
}
return nil
}

// sendResultsetToLagoon will send results as facts to the lagoon api after processing via a parser filter
func (h *Messaging) SendResultsetToLagoon(result []LagoonFact, resource ResourceDestination, source string) error {
apiClient := h.getApiClient()
Expand Down

0 comments on commit 5bfb578

Please sign in to comment.