mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-09-20 14:42:03 +00:00
Fix pagerdutyapikey Detector (#1749)
* Fix pagerdutyapikey detector by broadening regex * Add 'pd' to list of pagerdutyapikey keywords
This commit is contained in:
parent
d3e7c5acc2
commit
bf581ae9f9
1 changed files with 2 additions and 2 deletions
|
@ -21,13 +21,13 @@ var (
|
||||||
client = common.SaneHttpClient()
|
client = common.SaneHttpClient()
|
||||||
|
|
||||||
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
|
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
|
||||||
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"pagerduty"}) + `\b([a-z]{1}\+[a-zA-Z]{9}\-[a-z]{2}\-[a-z0-9]{5})\b`)
|
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"pagerduty", "pd"}) + `\b([a-zA-Z0-9_+-]{20})\b`)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Keywords are used for efficiently pre-filtering chunks.
|
// Keywords are used for efficiently pre-filtering chunks.
|
||||||
// Use identifiers in the secret preferably, or the provider name.
|
// Use identifiers in the secret preferably, or the provider name.
|
||||||
func (s Scanner) Keywords() []string {
|
func (s Scanner) Keywords() []string {
|
||||||
return []string{"pagerduty"}
|
return []string{"pagerduty", "pd"}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FromData will find and optionally verify PagerDutyApiKey secrets in a given set of bytes.
|
// FromData will find and optionally verify PagerDutyApiKey secrets in a given set of bytes.
|
||||||
|
|
Loading…
Reference in a new issue