Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoAtGit committed Jan 4, 2024
1 parent 96fabb4 commit de34b69
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/engine/inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ func (c *Inspector) Inspect(
vulnerabilities = append(vulnerabilities, vuls...)

c.tracker.TrackQueryExecution(query.Metadata.Aggregation)

}
return vulnerabilities, nil
}
Expand Down Expand Up @@ -350,7 +349,10 @@ func (c *Inspector) doRun(ctx *QueryContext) (vulns []model.Vulnerability, err e
}

// DecodeQueryResults decodes the results into []model.Vulnerability
func (c *Inspector) DecodeQueryResults(ctx *QueryContext, ctxTimeout context.Context, results rego.ResultSet) ([]model.Vulnerability, error) {
func (c *Inspector) DecodeQueryResults(
ctx *QueryContext,
ctxTimeout context.Context,
results rego.ResultSet) ([]model.Vulnerability, error) {
if len(results) == 0 {
return nil, ErrNoResult
}
Expand All @@ -372,7 +374,10 @@ func (c *Inspector) DecodeQueryResults(ctx *QueryContext, ctxTimeout context.Con
for _, queryResultItem := range queryResultItems {
select {
case <-ctxTimeout.Done():
log.Err(ctxTimeout.Err()).Msgf("Timeout processing the results of the query: %s %s", ctx.Query.Metadata.Platform, ctx.Query.Metadata.Query)
log.Err(ctxTimeout.Err()).Msgf(
"Timeout processing the results of the query: %s %s",
ctx.Query.Metadata.Platform,
ctx.Query.Metadata.Query)
break
default:
vulnerability, err := c.vb(ctx, c.tracker, queryResultItem, c.detector)
Expand Down

0 comments on commit de34b69

Please sign in to comment.