From ef5685f93d61f34e621b249c04171d89f39c7bf9 Mon Sep 17 00:00:00 2001 From: nikpivkin Date: Thu, 29 Aug 2024 17:58:05 +0600 Subject: [PATCH] fix(misconf): do not register Rego libs in checks registry Signed-off-by: nikpivkin --- pkg/iac/rego/embed.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/iac/rego/embed.go b/pkg/iac/rego/embed.go index 082870071c90..fddc069d9283 100644 --- a/pkg/iac/rego/embed.go +++ b/pkg/iac/rego/embed.go @@ -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 }