From af34a6a108cc9e56fd37e114dc39f7b878c7c995 Mon Sep 17 00:00:00 2001 From: Bill Rich Date: Mon, 15 Aug 2022 14:24:19 -0700 Subject: [PATCH] Check for nil filter (#714) --- pkg/common/filter.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/common/filter.go b/pkg/common/filter.go index ece129b61..7982d73c5 100644 --- a/pkg/common/filter.go +++ b/pkg/common/filter.go @@ -86,6 +86,9 @@ func FilterRulesFromFile(source string) (*FilterRuleSet, error) { // Pass returns true if the include FilterRuleSet matches the pattern and the exclude FilterRuleSet does not match. func (filter *Filter) Pass(object string) bool { + if filter == nil { + return true + } excluded := filter.exclude.Matches(object) included := filter.include.Matches(object) return !excluded && included