Skip to content

Commit

Permalink
fix(misconf): do not register Rego libs in checks registry (aquasecur…
Browse files Browse the repository at this point in the history
…ity#7420)

Signed-off-by: nikpivkin <[email protected]>
  • Loading branch information
nikpivkin authored and fhielpos committed Dec 20, 2024
1 parent e05fbf9 commit e16a3cf
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 e16a3cf

Please sign in to comment.