mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
* Enhance secret descriptions in gitleaks.toml * adjust the rule configuration descriptions * missing spaces in gitleaks.toml
24 lines
615 B
Go
24 lines
615 B
Go
package rules
|
|
|
|
import (
|
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
|
"github.com/zricethezav/gitleaks/v8/config"
|
|
)
|
|
|
|
func Facebook() *config.Rule {
|
|
// define rule
|
|
r := config.Rule{
|
|
Description: "Discovered a Facebook Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure.",
|
|
RuleID: "facebook",
|
|
Regex: generateSemiGenericRegex([]string{"facebook"}, hex("32"), true),
|
|
|
|
Keywords: []string{"facebook"},
|
|
}
|
|
|
|
// validate
|
|
tps := []string{
|
|
generateSampleSecret("facebook", secrets.NewSecret(hex("32"))),
|
|
}
|
|
return validate(r, tps, nil)
|
|
}
|