Skip to content

Commit

Permalink
fix(misconf): do not register Rego libs in checks registry (#7420)
Browse files Browse the repository at this point in the history
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
  • Loading branch information
nikpivkin authored Aug 29, 2024
1 parent c96dcdd commit a5aa63e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/iac/rego/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ func RegisterRegoRules(modules map[string]*ast.Module) {
continue
}

if !metadata.Library && metadata.AVDID == "" {
log.Warn("Check ID is empty", log.FilePath(module.Package.Location.File))
if metadata.AVDID == "" {
if !metadata.Library {
log.Warn("Check ID is empty", log.FilePath(module.Package.Location.File))
}
continue
}

Expand Down

0 comments on commit a5aa63e

Please sign in to comment.