mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
25 lines
495 B
Go
25 lines
495 B
Go
package rules
|
|
|
|
import (
|
|
"github.com/zricethezav/gitleaks/v8/config"
|
|
)
|
|
|
|
func SendGridAPIToken() *config.Rule {
|
|
// define rule
|
|
r := config.Rule{
|
|
RuleID: "sendgrid-api-token",
|
|
Description: "SendGrid API token",
|
|
Regex: generateUniqueTokenRegex(`SG\.(?i)[a-z0-9=_\-\.]{66}`),
|
|
SecretGroup: 1,
|
|
Keywords: []string{
|
|
"SG.",
|
|
},
|
|
}
|
|
|
|
// validate
|
|
tps := []string{
|
|
generateSampleSecret("sengridAPIToken", "SG."+sampleExtendedAlphaNumeric66Token),
|
|
}
|
|
return validate(r, tps)
|
|
}
|