airtable.go 723 B

123456789101112131415161718192021
  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 Airtable() *config.Rule {
  8. // define rule
  9. r := config.Rule{
  10. Description: "Uncovered a possible Airtable API Key, potentially compromising database access and leading to data leakage or alteration.",
  11. RuleID: "airtable-api-key",
  12. Regex: utils.GenerateSemiGenericRegex([]string{"airtable"}, utils.AlphaNumeric("17"), true),
  13. Keywords: []string{"airtable"},
  14. }
  15. // validate
  16. tps := utils.GenerateSampleSecrets("airtable", secrets.NewSecret(utils.AlphaNumeric("17")))
  17. return utils.Validate(r, tps, nil)
  18. }