MCPcopy
hub / github.com/BishopFox/jsluice / SecretMatcher

Method SecretMatcher

user-patterns.go:82–92  ·  view source on GitHub ↗

SecretMatcher returns a SecretMatcher based on the UserPattern, for use with (*Analyzer).AddSecretMatcher()

()

Source from the content-addressed store, hash-verified

80// SecretMatcher returns a SecretMatcher based on the UserPattern,
81// for use with (*Analyzer).AddSecretMatcher()
82func (u *UserPattern) SecretMatcher() SecretMatcher {
83 if len(u.Object) > 0 {
84 return u.objectMatcher()
85 }
86
87 if u.reKey != nil {
88 return u.pairMatcher()
89 }
90
91 return u.stringMatcher()
92}
93
94// objectMatcher returns a SecretMatcher for matching against objects
95func (u *UserPattern) objectMatcher() SecretMatcher {

Callers 1

SecretMatchersMethod · 0.80

Calls 3

objectMatcherMethod · 0.95
pairMatcherMethod · 0.95
stringMatcherMethod · 0.95

Tested by

no test coverage detected