gitter.go 666 B

123456789101112131415161718192021222324252627
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
  4. "github.com/zricethezav/gitleaks/v8/config"
  5. )
  6. func GitterAccessToken() *config.Rule {
  7. // define rule
  8. r := config.Rule{
  9. RuleID: "gitter-access-token",
  10. Description: "Uncovered a Gitter Access Token, which may lead to unauthorized access to chat and communication services.",
  11. Regex: generateSemiGenericRegex([]string{"gitter"},
  12. alphaNumericExtendedShort("40"), true),
  13. Keywords: []string{
  14. "gitter",
  15. },
  16. }
  17. // validate
  18. tps := []string{
  19. generateSampleSecret("gitter",
  20. secrets.NewSecret(alphaNumericExtendedShort("40"))),
  21. }
  22. return validate(r, tps, nil)
  23. }