Skip to content

Find, verify, and analyze leaked credentials

Check for nil filter (#714)

Bill Richaf34a6a108cc
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