mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
Remove IAM identifiers for non-credential resources in the aws-access-token rule (#1307)
* Remove IAM identifiers for non-credential resources Only detects: AWS STS service bearer token Context-specific credential Access key Temporary (AWS STS) access key IDs use this prefix, but are unique only in combination with the secret access key and the session token. * Update gitleaks.toml * Update testdata * Update tests
This commit is contained in:
1 parent
afe046b3b4
commit
76c9e3175b
10 files changed
+16
-20
No files matched your search
@@ -12,16 +12,12 @@ func AWS() *config.Rule {
|
||||
Description: "Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms.",
|
||||
RuleID: "aws-access-token",
|
||||
Regex: regexp.MustCompile(
|
||||
"(?:A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||
"(?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z0-9]{16}"),
|
||||
Keywords: []string{
|
||||
"AKIA",
|
||||
"AGPA",
|
||||
"AIDA",
|
||||
"AROA",
|
||||
"AIPA",
|
||||
"ANPA",
|
||||
"ANVA",
|
||||
"ASIA",
|
||||
"ABIA",
|
||||
"ACCA",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user