Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
fix(rego): Ignore case when scanning k8s subtype (#1516)
Browse files Browse the repository at this point in the history
  • Loading branch information
simar7 authored Jan 12, 2024
1 parent 0b50e6e commit 35a58ce
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/rego/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,10 @@ func checkSubtype(ii map[string]interface{}, provider string, subTypes []SubType
return true
}
}
case string: // k8s
// TODO(simar): This logic probably needs to be revisited
if services == st.Group ||
services == st.Version ||
services == st.Kind {
case string: // k8s - logic can be improved
if strings.EqualFold(services, st.Group) ||
strings.EqualFold(services, st.Version) ||
strings.EqualFold(services, st.Kind) {
return true
}
}
Expand Down

0 comments on commit 35a58ce

Please sign in to comment.