Files
gitleaks/cmd/generate/config/rules
Michael Henriksen 2678a54290 Add detection rules for DigitalOcean tokens (#1002)
* Add detection rules for DigitalOcean tokens

* go fmt correction
2022-10-06 08:03:46 -05:00
..
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-06-27 08:58:00 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-06-20 14:57:48 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-08-19 10:43:01 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-09-04 08:58:57 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-08-19 08:24:15 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-08-19 08:24:15 -05:00
2022-04-21 08:31:58 -05:00
2022-08-03 07:31:40 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-08-03 07:31:40 -05:00
2022-08-03 07:31:40 -05:00
2022-04-21 08:31:58 -05:00
2022-06-28 06:10:02 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-04-21 08:31:58 -05:00
2022-08-03 15:46:46 -05:00

package rules

import (
	"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
	"github.com/zricethezav/gitleaks/v8/config"
)

func ReadMe() *config.Rule {
	// define rule
	r := config.Rule{
		RuleID:      "readme-api-token",
		Description: "Readme API token",
		Regex:       generateUniqueTokenRegex(`rdme_[a-z0-9]{70}`),
		SecretGroup: 1,
		Keywords: []string{
			"rdme_",
		},
	}

	// validate
	tps := []string{
		generateSampleSecret("api-token", "rdme_"+secrets.NewSecret(alphaNumeric("70"))),
	}
	return validate(r, tps, nil)
}