mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
* Enhance secret descriptions in gitleaks.toml * adjust the rule configuration descriptions * missing spaces in gitleaks.toml
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
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)
|
|
}
|