feat(okta): bump entropy to 4 (#1599)

This commit is contained in:
Richard Gomez authored and GitHub committed 2024-10-25 08:00:59 -05:00
1 parent 2068870c8d
commit 0afb525e59
2 files changed
+11 -6

No files matched your search

+9 -4
View File
@@ -11,8 +11,8 @@ func OktaAccessToken() *config.Rule {
r := config.Rule{
RuleID: "okta-access-token",
Description: "Identified an Okta Access Token, which may compromise identity management services and user authentication data.",
Regex: utils.GenerateSemiGenericRegex([]string{"okta"}, utils.AlphaNumericExtended("42"), true),
Entropy: 3,
Regex: utils.GenerateSemiGenericRegex([]string{`(?-i:[Oo]kta|OKTA)`}, `00[\w=\-]{40}`, false),
Entropy: 4,
Keywords: []string{
"okta",
},
@@ -20,10 +20,15 @@ func OktaAccessToken() *config.Rule {
// validate
tps := []string{
utils.GenerateSampleSecret("okta", secrets.NewSecret(utils.AlphaNumeric("42"))),
utils.GenerateSampleSecret("okta", secrets.NewSecret(`00[\w=\-]{40}`)),
`"oktaApiToken": "00ebObu4zSNkyc6dimLvUwq4KpTEop-PCEnnfSTpD3",`, // gitleaks:allow
` var OktaApiToken = "00fWkOjwwL9xiFd-Vfgm_ePATIRxVj852Iblbb1DS_";`, // gitleaks:allow
}
fps := []string{
"00000000000000000000000000000000000TUVWXYZ",
`oktaKey = 00000000000000000000000000000000000TUVWXYZ`, // low entropy
`rookTable = 0023452Lllk2KqjLBvaxANWEgTd7bqjsxjo8aZj0wd`, // wrong case
}
return utils.Validate(r, tps, fps)
}
// TODO: Okta client secret?