| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package rules
- import (
- "github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
- "github.com/zricethezav/gitleaks/v8/config"
- )
- func ConfluentSecretKey() *config.Rule {
- // define rule
- r := config.Rule{
- RuleID: "confluent-secret-key",
- Description: "Found a Confluent Secret Key, potentially risking unauthorized operations and data access within Confluent services.",
- Regex: generateSemiGenericRegex([]string{"confluent"}, alphaNumeric("64"), true),
- Keywords: []string{
- "confluent",
- },
- }
- // validate
- tps := []string{
- generateSampleSecret("confluent", secrets.NewSecret(alphaNumeric("64"))),
- }
- return validate(r, tps, nil)
- }
- func ConfluentAccessToken() *config.Rule {
- // define rule
- r := config.Rule{
- RuleID: "confluent-access-token",
- Description: "Identified a Confluent Access Token, which could compromise access to streaming data platforms and sensitive data flow.",
- Regex: generateSemiGenericRegex([]string{"confluent"}, alphaNumeric("16"), true),
- Keywords: []string{
- "confluent",
- },
- }
- // validate
- tps := []string{
- generateSampleSecret("confluent", secrets.NewSecret(alphaNumeric("16"))),
- }
- return validate(r, tps, nil)
- }
|