Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
  • Loading branch information
stonezdj committed Apr 14, 2024
1 parent a77403d commit d66f9a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/controller/scanner/base_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,16 @@ func (bc *basicController) appendCap(ctx context.Context, r *scanner.Registratio
logger.Errorf("Get registration error: %s", err)
return err
}

Check warning on line 143 in src/controller/scanner/base_controller.go

View check run for this annotation

Codecov / codecov/patch

src/controller/scanner/base_controller.go#L141-L143

Added lines #L141 - L143 were not covered by tests
cap := map[string]interface{}{}
capabilities := map[string]interface{}{}
for _, c := range mt.Capabilities {
if c.Type == v1.ScanTypeVulnerability {
cap["support_vulnerability"] = true
capabilities["support_vulnerability"] = true
}

Check warning on line 148 in src/controller/scanner/base_controller.go

View check run for this annotation

Codecov / codecov/patch

src/controller/scanner/base_controller.go#L147-L148

Added lines #L147 - L148 were not covered by tests
if c.Type == v1.ScanTypeSbom {
cap["support_sbom"] = true
capabilities["support_sbom"] = true
}

Check warning on line 151 in src/controller/scanner/base_controller.go

View check run for this annotation

Codecov / codecov/patch

src/controller/scanner/base_controller.go#L150-L151

Added lines #L150 - L151 were not covered by tests
}
r.Capabilities = cap
r.Capabilities = capabilities
return nil
}

Expand Down

0 comments on commit d66f9a6

Please sign in to comment.