datadog.go 743 B

1234567891011121314151617181920212223242526
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/cmd/generate/config/utils"
  4. "github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
  5. "github.com/zricethezav/gitleaks/v8/config"
  6. )
  7. func DatadogtokenAccessToken() *config.Rule {
  8. // define rule
  9. r := config.Rule{
  10. RuleID: "datadog-access-token",
  11. Description: "Detected a Datadog Access Token, potentially risking monitoring and analytics data exposure and manipulation.",
  12. Regex: utils.GenerateSemiGenericRegex([]string{"datadog"},
  13. utils.AlphaNumeric("40"), true),
  14. Keywords: []string{
  15. "datadog",
  16. },
  17. }
  18. // validate
  19. tps := []string{
  20. utils.GenerateSampleSecret("datadog", secrets.NewSecret(utils.AlphaNumeric("40"))),
  21. }
  22. return utils.Validate(r, tps, nil)
  23. }