codecov.go 570 B

12345678910111213141516171819202122232425
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
  4. "github.com/zricethezav/gitleaks/v8/config"
  5. )
  6. func CodecovAccessToken() *config.Rule {
  7. // define rule
  8. r := config.Rule{
  9. RuleID: "codecov-access-token",
  10. Description: "Codecov Access Token",
  11. Regex: generateSemiGenericRegex([]string{"codecov"}, alphaNumeric("32")),
  12. SecretGroup: 1,
  13. Keywords: []string{
  14. "codecov",
  15. },
  16. }
  17. // validate
  18. tps := []string{
  19. generateSampleSecret("codecov", secrets.NewSecret(alphaNumeric("32"))),
  20. }
  21. return validate(r, tps, nil)
  22. }