From 28b1a1fae9cb6733c84d5989ef8f1e6e90b71753 Mon Sep 17 00:00:00 2001 From: Pankaj Patil Date: Thu, 29 Jul 2021 10:14:51 +0530 Subject: [PATCH] temporary fix for k8s policy filtering issue --- pkg/filters/filter-specs.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/filters/filter-specs.go b/pkg/filters/filter-specs.go index 6264fafa0..dd1c8a18f 100644 --- a/pkg/filters/filter-specs.go +++ b/pkg/filters/filter-specs.go @@ -17,6 +17,8 @@ package filters import ( + "strings" + "github.com/accurics/terrascan/pkg/policy" "github.com/accurics/terrascan/pkg/utils" "go.uber.org/zap" @@ -48,6 +50,14 @@ func (rs ResourceTypeFilterSpecification) IsSatisfied(r *policy.RegoMetadata) bo if len(r.ResourceType) < 1 { return true } + + // temporary fix for kubernetes policies (https://github.com/accurics/terrascan/issues/946) + // TODO: modification in policy metadata (resource type (string) => resource type (map