Files
gitleaks/cmd/generate/config/rules
Alexandre GUIOT--VALENTIN 575e923cf8 Add intra42 client secret (#1408)
intra42 is the intranet and API of "42 School", a CS school.
The API is open to all students in 57 campus around the world.
It is thus often subject to credentials leaks on GitHub
See https://42.fr and https://api.intra.42.fr/
2024-06-01 18:55:04 -05:00
..
2023-11-29 17:03:11 -06:00
2024-02-19 09:26:41 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2024-06-01 18:55:04 -05:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2024-03-22 13:31:09 -05:00
2023-11-18 12:28:17 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06:00
2023-11-29 17:03:11 -06: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: "Detected a Readme API token, risking unauthorized documentation management and content exposure.",
		Regex:       generateUniqueTokenRegex(`rdme_[a-z0-9]{70}`, true),

		Keywords: []string{
			"rdme_",
		},
	}

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