From 840cff4edf7a7ca686eb45049410ff26e60ebdb5 Mon Sep 17 00:00:00 2001 From: Suvarna Rokade Date: Thu, 29 Jul 2021 13:38:29 +0530 Subject: [PATCH] adds: docker policy id prefix in regex string --- pkg/runtime/executor_test.go | 2 +- pkg/utils/skip_rules.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/runtime/executor_test.go b/pkg/runtime/executor_test.go index 71eee2b90..4cc9cd6dd 100644 --- a/pkg/runtime/executor_test.go +++ b/pkg/runtime/executor_test.go @@ -262,7 +262,7 @@ func TestInit(t *testing.T) { policyPath: []string{testPoliciesDir}, }, wantErr: nil, - wantIacProvider: []iacProvider.IacProvider{&armv1.ARMV1{}, &cftv1.CFTV1{}, &dockerv1.DockerV1{}, &helmv3.HelmV3{}, &k8sv1.K8sV1{}, &kustomizev3.KustomizeV3{}, &tfv14.TfV14{}, &tfv15.TfV15{}}, + wantIacProvider: []iacProvider.IacProvider{&armv1.ARMV1{}, &cftv1.CFTV1{}, &dockerv1.DockerV1{}, &helmv3.HelmV3{}, &k8sv1.K8sV1{}, &kustomizev3.KustomizeV3{}, &tfv15.TfV15{}}, wantNotifiers: []notifications.Notifier{}, }, { diff --git a/pkg/utils/skip_rules.go b/pkg/utils/skip_rules.go index 0744f2a14..c1c70c13b 100644 --- a/pkg/utils/skip_rules.go +++ b/pkg/utils/skip_rules.go @@ -36,7 +36,7 @@ const ( // SkipRulesPrefix used to identify and trim the skipping rule patterns SkipRulesPrefix = "#ts:skip=" // MetaDataIDRegex pattern to match Rego Metadata ID - MetaDataIDRegex = `(AC_)(AWS|AZURE|GCP|K8S|GITHUB)[_]([\d]{4})` + MetaDataIDRegex = `(AC_)(AWS|AZURE|GCP|K8S|GITHUB|DOCKER)[_]([\d]{4})` // MetaDataReferenceIDRegex pattern to match Rego Metadata ReferenceID MetaDataReferenceIDRegex = `(([ A-Za-z0-9]+[.-]{1}){2,5})([\d]+)` // SkipRuleCommentRegex used to detect comments in skipped rule