Skip to content

Commit

Permalink
import optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored and simar7 committed May 7, 2023
1 parent 552b73c commit dce7275
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/rego/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/aquasecurity/defsec/pkg/providers"
"github.com/aquasecurity/defsec/pkg/scan"
"github.com/aquasecurity/defsec/pkg/severity"
"github.com/aquasecurity/defsec/pkg/types"
defsecTypes "github.com/aquasecurity/defsec/pkg/types"
"github.com/mitchellh/mapstructure"
"github.com/open-policy-agent/opa/ast"
Expand Down Expand Up @@ -361,8 +360,8 @@ func (m *MetadataRetriever) queryInputOptions(ctx context.Context, module *ast.M
if rawType, ok := selectorMap["type"]; ok {
selector.Type = fmt.Sprintf("%s", rawType)
// handle backward compatibility for "defsec" source type which is now "cloud"
if selector.Type == string(types.SourceDefsec) {
selector.Type = string(types.SourceCloud)
if selector.Type == string(defsecTypes.SourceDefsec) {
selector.Type = string(defsecTypes.SourceCloud)
}
}
if subType, ok := selectorMap["subtypes"].([]interface{}); ok {
Expand Down

0 comments on commit dce7275

Please sign in to comment.