mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 05:24:22 +01:00
fix(rules): entropy, uppercase in samples (#1593)
`go generate` was slightly flaky, since the example true positive secrets for these rules did not include uppercase letters and/or the min entropy was just barely too high
This commit is contained in:
1 parent
5c2e8132f2
commit
5fe58bf0b0
3 files changed
+4
-4
No files matched your search
@@ -28,10 +28,10 @@ func VaultServiceToken() *config.Rule {
|
|||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
// Old
|
// Old
|
||||||
utils.GenerateSampleSecret("vault", "s."+secrets.NewSecret(utils.AlphaNumeric("24"))),
|
utils.GenerateSampleSecret("vault", secrets.NewSecret(`s\.[a-zA-Z0-9]{24}`)),
|
||||||
`token: s.ZC9Ecf4M5g9o34Q6RkzGsj0z`,
|
`token: s.ZC9Ecf4M5g9o34Q6RkzGsj0z`,
|
||||||
// New
|
// New
|
||||||
utils.GenerateSampleSecret("vault", "hvs."+secrets.NewSecret(utils.AlphaNumericExtendedShort("90"))),
|
utils.GenerateSampleSecret("vault", secrets.NewSecret(`hvs\.[\w\-]{90}`)),
|
||||||
`-vaultToken hvs.CAESIP2jTxc9S2K7Z6CtcFWQv7-044m_oSsxnPE1H3nF89l3GiYKHGh2cy5sQmlIZVNyTWJNcDRsYWJpQjlhYjVlb1cQh6PL8wEYAg"`, // longer than 100 chars
|
`-vaultToken hvs.CAESIP2jTxc9S2K7Z6CtcFWQv7-044m_oSsxnPE1H3nF89l3GiYKHGh2cy5sQmlIZVNyTWJNcDRsYWJpQjlhYjVlb1cQh6PL8wEYAg"`, // longer than 100 chars
|
||||||
}
|
}
|
||||||
fps := []string{
|
fps := []string{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ func PlaidAccessID() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
utils.GenerateSampleSecret("plaid", secrets.NewSecret(utils.AlphaNumeric("24"))),
|
utils.GenerateSampleSecret("plaid", secrets.NewSecret(`[a-zA-Z0-9]{24}`)),
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
return utils.Validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ func SumoLogicAccessID() *config.Rule {
|
|||||||
`sumologic_access_id = "sug5XpdpaoxtOH"`, // gitleaks:allow
|
`sumologic_access_id = "sug5XpdpaoxtOH"`, // gitleaks:allow
|
||||||
`export SUMOLOGIC_ACCESSID="suDbJw97o9WVo0"`, // gitleaks:allow
|
`export SUMOLOGIC_ACCESSID="suDbJw97o9WVo0"`, // gitleaks:allow
|
||||||
`SUMO_ACCESS_ID = "suGyI5imvADdvU"`, // gitleaks:allow
|
`SUMO_ACCESS_ID = "suGyI5imvADdvU"`, // gitleaks:allow
|
||||||
utils.GenerateSampleSecret("sumo", "su"+secrets.NewSecret(utils.AlphaNumeric("12"))),
|
utils.GenerateSampleSecret("sumo", secrets.NewSecret(`su[a-zA-Z0-9]{12}`)),
|
||||||
}
|
}
|
||||||
fps := []string{
|
fps := []string{
|
||||||
`- (NSNumber *)sumOfProperty:(NSString *)property;`,
|
`- (NSNumber *)sumOfProperty:(NSString *)property;`,
|
||||||
|
|||||||
Reference in new issue
Block a user