mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
More rule fixes (#1586)
* feat: tweak more rules * fix(curl): update pattern & ignore more stuff * chore: update .gitleaksignore
This commit is contained in:
1 parent
5407c44e0c
commit
455ae0aab7
47 files changed
+353
-196
No files matched your search
@@ -931,3 +931,10 @@ f361c5ef71853923277e3f284890083bc7825205:detect/reader_test.go:aws-access-token:
|
|||||||
ccef3680d5552443c999345567ea60909c863c0a:checks_test.go:aws-access-token:52
|
ccef3680d5552443c999345567ea60909c863c0a:checks_test.go:aws-access-token:52
|
||||||
1cecd5e0908ab581f217ebb2cb58829204530c79:README.md:aws-access-token:25
|
1cecd5e0908ab581f217ebb2cb58829204530c79:README.md:aws-access-token:25
|
||||||
1cecd5e0908ab581f217ebb2cb58829204530c79:README.md:aws-access-token:27
|
1cecd5e0908ab581f217ebb2cb58829204530c79:README.md:aws-access-token:27
|
||||||
|
e56870aecf8ac2733affc82e1ac25e3be9092db3:cmd/generate/config/rules/curl.go:generic-api-key:116
|
||||||
|
239e6323639b18ba8a1081f17788a658da075dd7:cmd/generate/config/rules/sumologic.go:sumologic-access-token:72
|
||||||
|
239e6323639b18ba8a1081f17788a658da075dd7:cmd/generate/config/rules/sumologic.go:sumologic-access-id:40
|
||||||
|
239e6323639b18ba8a1081f17788a658da075dd7:cmd/generate/config/rules/readme.go:readme-api-token:26
|
||||||
|
239e6323639b18ba8a1081f17788a658da075dd7:cmd/generate/config/rules/prefect.go:prefect-api-token:26
|
||||||
|
239e6323639b18ba8a1081f17788a658da075dd7:cmd/generate/config/rules/databricks.go:databricks-api-token:25
|
||||||
|
239e6323639b18ba8a1081f17788a658da075dd7:cmd/generate/config/rules/databricks.go:generic-api-key:22
|
||||||
@@ -9,9 +9,10 @@ import (
|
|||||||
func AdobeClientID() *config.Rule {
|
func AdobeClientID() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a pattern that resembles an Adobe OAuth Web Client ID, posing a risk of compromised Adobe integrations and data breaches.",
|
|
||||||
RuleID: "adobe-client-id",
|
RuleID: "adobe-client-id",
|
||||||
|
Description: "Detected a pattern that resembles an Adobe OAuth Web Client ID, posing a risk of compromised Adobe integrations and data breaches.",
|
||||||
Regex: utils.GenerateSemiGenericRegex([]string{"adobe"}, utils.Hex("32"), true),
|
Regex: utils.GenerateSemiGenericRegex([]string{"adobe"}, utils.Hex("32"), true),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"adobe"},
|
Keywords: []string{"adobe"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,9 +26,10 @@ func AdobeClientID() *config.Rule {
|
|||||||
func AdobeClientSecret() *config.Rule {
|
func AdobeClientSecret() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a potential Adobe Client Secret, which, if exposed, could allow unauthorized Adobe service access and data manipulation.",
|
|
||||||
RuleID: "adobe-client-secret",
|
RuleID: "adobe-client-secret",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`(p8e-)(?i)[a-z0-9]{32}`, true),
|
Description: "Discovered a potential Adobe Client Secret, which, if exposed, could allow unauthorized Adobe service access and data manipulation.",
|
||||||
|
Regex: utils.GenerateUniqueTokenRegex(`p8e-(?i)[a-z0-9]{32}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"p8e-"},
|
Keywords: []string{"p8e-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,10 @@ import (
|
|||||||
func AlibabaAccessKey() *config.Rule {
|
func AlibabaAccessKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected an Alibaba Cloud AccessKey ID, posing a risk of unauthorized cloud resource access and potential data compromise.",
|
|
||||||
RuleID: "alibaba-access-key-id",
|
RuleID: "alibaba-access-key-id",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`(LTAI)(?i)[a-z0-9]{20}`, true),
|
Description: "Detected an Alibaba Cloud AccessKey ID, posing a risk of unauthorized cloud resource access and potential data compromise.",
|
||||||
|
Regex: utils.GenerateUniqueTokenRegex(`LTAI(?i)[a-z0-9]{20}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"LTAI"},
|
Keywords: []string{"LTAI"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,11 +27,10 @@ func AlibabaAccessKey() *config.Rule {
|
|||||||
func AlibabaSecretKey() *config.Rule {
|
func AlibabaSecretKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a potential Alibaba Cloud Secret Key, potentially allowing unauthorized operations and data access within Alibaba Cloud.",
|
|
||||||
RuleID: "alibaba-secret-key",
|
RuleID: "alibaba-secret-key",
|
||||||
Regex: utils.GenerateSemiGenericRegex([]string{"alibaba"},
|
Description: "Discovered a potential Alibaba Cloud Secret Key, potentially allowing unauthorized operations and data access within Alibaba Cloud.",
|
||||||
utils.AlphaNumeric("30"), true),
|
Regex: utils.GenerateSemiGenericRegex([]string{"alibaba"}, utils.AlphaNumeric("30"), true),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"alibaba"},
|
Keywords: []string{"alibaba"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ func Authress() *config.Rule {
|
|||||||
// Rule Definition
|
// Rule Definition
|
||||||
// (Note: When changes are made to this, rerun `go generate ./...` and commit the config/gitleaks.toml file
|
// (Note: When changes are made to this, rerun `go generate ./...` and commit the config/gitleaks.toml file
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a possible Authress Service Client Access Key, which may compromise access control services and sensitive data.",
|
|
||||||
RuleID: "authress-service-client-access-key",
|
RuleID: "authress-service-client-access-key",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`(?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\.[a-z0-9]{4,6}\.acc[_-][a-z0-9-]{10,32}\.[a-z0-9+/_=-]{30,120}`, true),
|
Description: "Uncovered a possible Authress Service Client Access Key, which may compromise access control services and sensitive data.",
|
||||||
|
Regex: utils.GenerateUniqueTokenRegex(`(?:sc|ext|scauth|authress)_(?i)[a-z0-9]{5,30}\.[a-z0-9]{4,6}\.(?-i:acc)[_-][a-z0-9-]{10,32}\.[a-z0-9+/_=-]{30,120}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"sc_", "ext_", "scauth_", "authress_"},
|
Keywords: []string{"sc_", "ext_", "scauth_", "authress_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ import (
|
|||||||
func Clojars() *config.Rule {
|
func Clojars() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a possible Clojars API token, risking unauthorized access to Clojure libraries and potential code manipulation.",
|
|
||||||
RuleID: "clojars-api-token",
|
RuleID: "clojars-api-token",
|
||||||
|
Description: "Uncovered a possible Clojars API token, risking unauthorized access to Clojure libraries and potential code manipulation.",
|
||||||
Regex: regexp.MustCompile(`(?i)CLOJARS_[a-z0-9]{60}`),
|
Regex: regexp.MustCompile(`(?i)CLOJARS_[a-z0-9]{60}`),
|
||||||
Keywords: []string{"clojars"},
|
Entropy: 2,
|
||||||
|
Keywords: []string{"clojars_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ var identifiers = []string{"cloudflare"}
|
|||||||
func CloudflareGlobalAPIKey() *config.Rule {
|
func CloudflareGlobalAPIKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Cloudflare Global API Key, potentially compromising cloud application deployments and operational security.",
|
|
||||||
RuleID: "cloudflare-global-api-key",
|
RuleID: "cloudflare-global-api-key",
|
||||||
|
Description: "Detected a Cloudflare Global API Key, potentially compromising cloud application deployments and operational security.",
|
||||||
Regex: utils.GenerateSemiGenericRegex(identifiers, utils.Hex("37"), true),
|
Regex: utils.GenerateSemiGenericRegex(identifiers, utils.Hex("37"), true),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: identifiers,
|
Keywords: identifiers,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,10 +44,10 @@ func CloudflareGlobalAPIKey() *config.Rule {
|
|||||||
func CloudflareAPIKey() *config.Rule {
|
func CloudflareAPIKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Cloudflare API Key, potentially compromising cloud application deployments and operational security.",
|
|
||||||
RuleID: "cloudflare-api-key",
|
RuleID: "cloudflare-api-key",
|
||||||
|
Description: "Detected a Cloudflare API Key, potentially compromising cloud application deployments and operational security.",
|
||||||
Regex: utils.GenerateSemiGenericRegex(identifiers, utils.AlphaNumericExtendedShort("40"), true),
|
Regex: utils.GenerateSemiGenericRegex(identifiers, utils.AlphaNumericExtendedShort("40"), true),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: identifiers,
|
Keywords: identifiers,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ func CloudflareOriginCAKey() *config.Rule {
|
|||||||
Description: "Detected a Cloudflare Origin CA Key, potentially compromising cloud application deployments and operational security.",
|
Description: "Detected a Cloudflare Origin CA Key, potentially compromising cloud application deployments and operational security.",
|
||||||
RuleID: "cloudflare-origin-ca-key",
|
RuleID: "cloudflare-origin-ca-key",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`v1\.0-`+utils.Hex("24")+"-"+utils.Hex("146"), false),
|
Regex: utils.GenerateUniqueTokenRegex(`v1\.0-`+utils.Hex("24")+"-"+utils.Hex("146"), false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: ca_identifiers,
|
Keywords: ca_identifiers,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,15 +13,18 @@ func CurlBasicAuth() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "curl-auth-user",
|
RuleID: "curl-auth-user",
|
||||||
// TODO: Description: "",
|
// TODO: Description: "",
|
||||||
Regex: regexp.MustCompile(`\bcurl\b(?:.*|.*(?:[\r\n]{1,2}.*){1,5})[ \t\n\r](?:-u|--user)[ =](?:("[^:"]{3,}:[^"]{3,}")|('[^:']{3,}:[^']{3,}')|((?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+))|)(?:\s|\z)`),
|
Regex: regexp.MustCompile(`\bcurl\b(?:.*|.*(?:[\r\n]{1,2}.*){1,5})[ \t\n\r](?:-u|--user)(?:=|[ \t]{0,5})(?:"([^:"]{3,}:[^"]{3,})"|'([^:']{3,}:[^']{3,})'|((?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[\w${}@.-]+)))(?:\s|\z)`),
|
||||||
Keywords: []string{"curl"},
|
Keywords: []string{"curl"},
|
||||||
|
Entropy: 2,
|
||||||
Allowlists: []config.Allowlist{
|
Allowlists: []config.Allowlist{
|
||||||
{
|
{
|
||||||
Regexes: []*regexp.Regexp{
|
Regexes: []*regexp.Regexp{
|
||||||
regexp.MustCompile(`[^:]+:(changeme|pass(word)?|pwd|\*+|x+)`), // common placeholder passwords
|
regexp.MustCompile(`[^:]+:(change(it|me)|pass(word)?|pwd|test|token|\*+|x+)`), // common placeholder passwords
|
||||||
regexp.MustCompile(`<[^>]+>:<[^>]+>|<[^:]+:[^>]+>`), // <placeholder>
|
regexp.MustCompile(`<[^>]+>:<[^>]+>|<[^:]+:[^>]+>`), // <placeholder>
|
||||||
regexp.MustCompile(`[^:]+:\[[^]]+]`), // [placeholder]
|
regexp.MustCompile(`[^:]+:\[[^]]+]`), // [placeholder]
|
||||||
regexp.MustCompile(`(?i)[^:]+:\$(\d|[a-z]\w+|(\{\d|[a-z]\w+}))`), // $1 or $VARIABLE
|
regexp.MustCompile(`[^:]+:\$(\d|\w+|\{(\d|\w+)})`), // $1 or $VARIABLE
|
||||||
|
regexp.MustCompile(`\$\([^)]+\):\$\([^)]+\)`), // $(cat login.txt)
|
||||||
|
regexp.MustCompile(`\$?{{[^}]+}}:\$?{{[^}]+}}`), // ${{ secrets.FOO }} or {{ .Values.foo }}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -37,6 +40,7 @@ func CurlBasicAuth() *config.Rule {
|
|||||||
-u developer:yqDVtkqPECriaLRi`, // different line
|
-u developer:yqDVtkqPECriaLRi`, // different line
|
||||||
|
|
||||||
// long
|
// long
|
||||||
|
`curl -sw '%{http_code}' -X POST --user 'johns:h0pk1ns~21s' $GItHUB_API_URL/$GIT_COMMIT --data`,
|
||||||
`curl --user roger23@gmail.com:pQ9wTxu4Fg https://www.dropbox.com/cli_link?host_id=abcdefg -v`, // same line, no quotes
|
`curl --user roger23@gmail.com:pQ9wTxu4Fg https://www.dropbox.com/cli_link?host_id=abcdefg -v`, // same line, no quotes
|
||||||
`curl -s --user 'api:d2LkV78zLx!t' \
|
`curl -s --user 'api:d2LkV78zLx!t' \
|
||||||
https://api.mailgun.net/v2/sandbox91d3515882ecfaa1c65be642.mailgun.org/messages`, // same line, single quotes
|
https://api.mailgun.net/v2/sandbox91d3515882ecfaa1c65be642.mailgun.org/messages`, // same line, single quotes
|
||||||
@@ -52,13 +56,25 @@ func CurlBasicAuth() *config.Rule {
|
|||||||
}
|
}
|
||||||
fps := []string{
|
fps := []string{
|
||||||
// short
|
// short
|
||||||
|
`curl -i -u 'test:test'`,
|
||||||
` curl -sL --user "$1:$2" "$3" > "$4"`, // environment variable
|
` curl -sL --user "$1:$2" "$3" > "$4"`, // environment variable
|
||||||
`curl -u <user:password> https://test.com/endpoint`, // placeholder
|
`curl -u <user:password> https://test.com/endpoint`, // placeholder
|
||||||
`curl --user neo4j:[PASSWORD] http://[IP]:7474/db/data/`, // placeholder
|
`curl --user neo4j:[PASSWORD] http://[IP]:7474/db/data/`, // placeholder
|
||||||
`curl -u "myusername" http://localhost:15130/api/check_user/`, // no password
|
`curl -u "myusername" http://localhost:15130/api/check_user/`, // no password
|
||||||
|
`curl -u username:token`,
|
||||||
|
`curl -u "${_username}:${_password}"`,
|
||||||
|
`curl -k -X POST -I -u "SRVC_JENKINS:${APPID}"`,
|
||||||
|
|
||||||
// long
|
// long
|
||||||
|
`curl -sw '%{http_code}' -X POST --user '$USERNAME:$PASSWORD' $GItHUB_API_URL/$GIT_COMMIT --data`,
|
||||||
|
`curl --user "xxx:yyy"`,
|
||||||
` curl -sL --user "$GITHUB_USERNAME:$GITHUB_PASSWORD" "$GITHUB_URL" > "$TESTS_PATH"`, // environment variable
|
` curl -sL --user "$GITHUB_USERNAME:$GITHUB_PASSWORD" "$GITHUB_URL" > "$TESTS_PATH"`, // environment variable
|
||||||
|
// variable interpolation
|
||||||
|
`curl --silent --fail {{- if and $.Values.username $.Values.password }} --user "{{ $.Values.username }}:{{ $.Values.password }}"`,
|
||||||
|
`curl -XGET -i -u "${{ env.ELK_ID }}:${{ build.env.ELK_PASS }}"`,
|
||||||
|
`curl -XGET -i -u "${{needs.vault.outputs.account_id}}:${{needs.vault.outputs.account_password}}"`,
|
||||||
|
`curl -XGET -i -u "${{ steps.vault.outputs.account_id }}:${{ steps.vault.outputs.account_password }}"`,
|
||||||
|
`curl -X POST --user "$(cat ./login.txt):$(cat ./password.txt)"`, // command
|
||||||
`curl http://127.0.0.1:5000/file --user user:pass --digest # digest auth`, // placeholder
|
`curl http://127.0.0.1:5000/file --user user:pass --digest # digest auth`, // placeholder
|
||||||
` curl -X GET --insecure --user "username:password" \`, // placeholder
|
` curl -X GET --insecure --user "username:password" \`, // placeholder
|
||||||
`curl --silent --insecure --user ${f5user}:${f5pass} \`, // placeholder
|
`curl --silent --insecure --user ${f5user}:${f5pass} \`, // placeholder
|
||||||
@@ -80,12 +96,13 @@ nc -u -l 41234`,
|
|||||||
// https://curl.se/docs/manpage.html#-H
|
// https://curl.se/docs/manpage.html#-H
|
||||||
func CurlHeaderAuth() *config.Rule {
|
func CurlHeaderAuth() *config.Rule {
|
||||||
// language=regexp
|
// language=regexp
|
||||||
authPat := `(?i)(?:Authorization:[ \t]?(?:Basic[ \t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|Token)[ \t]([\w=@.+/-]{8,})|([\w=.+/-]{8,}))|(?:ApiKey|Token|X-API-KEY):[ \t]?([\w=@.+/-]{8,}))`
|
authPat := `(?i)(?:Authorization:[ \t]{0,5}(?:Basic[ \t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \t]([\w=~@.+/-]{8,})|([\w=~@.+/-]{8,}))|(?:(?:X-)?Api-?(?:Key|Token)|Token):[ \t]{0,5}([\w=~@.+/-]{8,}))`
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "curl-auth-header",
|
RuleID: "curl-auth-header",
|
||||||
// TODO: Description: "",
|
// TODO: Description: "",
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(
|
||||||
fmt.Sprintf(`\bcurl\b(?:.*?|.*?(?:[\r\n]{1,2}.*?){1,5})[ \t\n\r](?:-H|--header)[ =](?:"%s"|'%s')(?:\B|\s|\z)`, authPat, authPat)),
|
// language=regexp
|
||||||
|
fmt.Sprintf(`\bcurl\b(?:.*?|.*?(?:[\r\n]{1,2}.*?){1,5})[ \t\n\r](?:-H|--header)(?:=|[ \t]{0,5})(?:"%s"|'%s')(?:\B|\s|\z)`, authPat, authPat)),
|
||||||
Entropy: 2.75,
|
Entropy: 2.75,
|
||||||
Keywords: []string{"curl"},
|
Keywords: []string{"curl"},
|
||||||
//Allowlists: []config.Allowlist{
|
//Allowlists: []config.Allowlist{
|
||||||
@@ -96,6 +113,7 @@ func CurlHeaderAuth() *config.Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tps := []string{
|
tps := []string{
|
||||||
|
`curl --header 'Authorization: 5eb4223e-5008-46e5-be67-c7b8f2732305'`,
|
||||||
// Short flag.
|
// Short flag.
|
||||||
`curl -H 'Authorization: Basic YnJvd3Nlcjo=' \`, // same line, single quotes
|
`curl -H 'Authorization: Basic YnJvd3Nlcjo=' \`, // same line, single quotes
|
||||||
// TODO: Handle short flags combined.
|
// TODO: Handle short flags combined.
|
||||||
@@ -126,18 +144,22 @@ func CurlHeaderAuth() *config.Rule {
|
|||||||
`curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \
|
`curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \
|
||||||
-H "Authorization: Bearer _FXNljbSRYMWx3TWrd7lgKhLtVZX6iskC8Wcbb4b" \
|
-H "Authorization: Bearer _FXNljbSRYMWx3TWrd7lgKhLtVZX6iskC8Wcbb4b" \
|
||||||
-H "Content-Type:application/json"`,
|
-H "Content-Type:application/json"`,
|
||||||
|
`curl -H "Authorization: Bearer sha256~bRLFnzd59Z3XpZH5_seJPHALOuvbWiKwbFKSsoALkgp"`,
|
||||||
|
|
||||||
// Token auth
|
// Token auth
|
||||||
|
`curl -H "Authorization: Api-Token 22cb987851bc5659l29114c62e60c79abd0d2c08" --request PUT https://appsecclass.report/api/use/635`, // token
|
||||||
`curl -H "Authorization: Token 22cb987851bc5659229114c62e60c79abd0d2c08" --request PUT https://appsecclass.report/api/use/635`, // token
|
`curl -H "Authorization: Token 22cb987851bc5659229114c62e60c79abd0d2c08" --request PUT https://appsecclass.report/api/use/635`, // token
|
||||||
|
|
||||||
// Nothing
|
// Nothing
|
||||||
`curl -L -H "Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25maWRlbmNlIjowLjh9.kvRPfjAhLhtRTczoRgctVGp7KY1QVH3UBZM-gM0x8ec" service1.local -> correct jwt `, // no prefix
|
`curl -L -H "Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25maWRlbmNlIjowLjh9.kvRPfjAhLhtRTczoRgctVGp7KY1QVH3UBZM-gM0x8ec" service1.local -> correct jwt `, // no prefix
|
||||||
|
`curl -L -H "Authorization: sha256~bRLFnzd5@=-.a+/hgdS"`, // no prefix
|
||||||
|
|
||||||
// Non-authorization headers.
|
// Non-authorization headers.
|
||||||
`curl -XPOST http://localhost:8080/api/tasks -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "Token: 3fea6af1349166ea" -d "content=hello-curl"`, // token
|
|
||||||
`curl -X GET \
|
`curl -X GET \
|
||||||
-H "apikey: c4ed6c21-9dd5-4a05-8e3f-c56d1151cce8" \
|
-H "apikey: c4ed6c21-9dd5-4a05-8e3f-c56d1151cce8" \
|
||||||
-H "Accept: application/json" \`, // API Key placeholder
|
-H "Accept: application/json" \`, // apikey
|
||||||
|
`curl -X POST --header "Api-Token: Sk94HG7f6KB"`, // api-token
|
||||||
|
`curl -XPOST http://localhost:8080/api/tasks -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "Token: 3fea6af1349166ea" -d "content=hello-curl"`, // token
|
||||||
}
|
}
|
||||||
fps := []string{
|
fps := []string{
|
||||||
// Placeholders
|
// Placeholders
|
||||||
|
|||||||
@@ -9,15 +9,20 @@ import (
|
|||||||
func Databricks() *config.Rule {
|
func Databricks() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a Databricks API token, which may compromise big data analytics platforms and sensitive data processing.",
|
|
||||||
RuleID: "databricks-api-token",
|
RuleID: "databricks-api-token",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`dapi[a-h0-9]{32}`, true),
|
Description: "Uncovered a Databricks API token, which may compromise big data analytics platforms and sensitive data processing.",
|
||||||
|
Regex: utils.GenerateUniqueTokenRegex(`dapi[a-f0-9]{32}(?:-\d)?`, false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{"dapi"},
|
Keywords: []string{"dapi"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
utils.GenerateSampleSecret("databricks", "dapi"+secrets.NewSecret(utils.Hex("32"))),
|
utils.GenerateSampleSecret("databricks", "dapi"+secrets.NewSecret(utils.Hex("32"))),
|
||||||
|
`token = dapif13ac4b49d1cb31f69f678e39602e381-2`, // gitleaks:ignore
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
fps := []string{
|
||||||
|
`DATABRICKS_TOKEN=dapi123456789012345678a9bc01234defg5`,
|
||||||
|
}
|
||||||
|
return utils.Validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -8,9 +8,10 @@ import (
|
|||||||
|
|
||||||
func DigitalOceanPAT() *config.Rule {
|
func DigitalOceanPAT() *config.Rule {
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a DigitalOcean Personal Access Token, posing a threat to cloud infrastructure security and data privacy.",
|
|
||||||
RuleID: "digitalocean-pat",
|
RuleID: "digitalocean-pat",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`dop_v1_[a-f0-9]{64}`, true),
|
Description: "Discovered a DigitalOcean Personal Access Token, posing a threat to cloud infrastructure security and data privacy.",
|
||||||
|
Regex: utils.GenerateUniqueTokenRegex(`dop_v1_[a-f0-9]{64}`, false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{"dop_v1_"},
|
Keywords: []string{"dop_v1_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,10 +23,10 @@ func DigitalOceanPAT() *config.Rule {
|
|||||||
|
|
||||||
func DigitalOceanOAuthToken() *config.Rule {
|
func DigitalOceanOAuthToken() *config.Rule {
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a DigitalOcean OAuth Access Token, risking unauthorized cloud resource access and data compromise.",
|
|
||||||
RuleID: "digitalocean-access-token",
|
RuleID: "digitalocean-access-token",
|
||||||
|
Description: "Found a DigitalOcean OAuth Access Token, risking unauthorized cloud resource access and data compromise.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`doo_v1_[a-f0-9]{64}`, true),
|
Entropy: 3,
|
||||||
|
Regex: utils.GenerateUniqueTokenRegex(`doo_v1_[a-f0-9]{64}`, false),
|
||||||
Keywords: []string{"doo_v1_"},
|
Keywords: []string{"doo_v1_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ import (
|
|||||||
func Doppler() *config.Rule {
|
func Doppler() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a Doppler API token, posing a risk to environment and secrets management security.",
|
|
||||||
RuleID: "doppler-api-token",
|
RuleID: "doppler-api-token",
|
||||||
|
Description: "Discovered a Doppler API token, posing a risk to environment and secrets management security.",
|
||||||
Regex: regexp.MustCompile(`dp\.pt\.(?i)[a-z0-9]{43}`),
|
Regex: regexp.MustCompile(`dp\.pt\.(?i)[a-z0-9]{43}`),
|
||||||
Keywords: []string{"doppler"},
|
Entropy: 2,
|
||||||
|
Keywords: []string{`dp.pt.`},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ func Duffel() *config.Rule {
|
|||||||
RuleID: "duffel-api-token",
|
RuleID: "duffel-api-token",
|
||||||
Description: "Uncovered a Duffel API token, which may compromise travel platform integrations and sensitive customer data.",
|
Description: "Uncovered a Duffel API token, which may compromise travel platform integrations and sensitive customer data.",
|
||||||
Regex: regexp.MustCompile(`duffel_(?:test|live)_(?i)[a-z0-9_\-=]{43}`),
|
Regex: regexp.MustCompile(`duffel_(?:test|live)_(?i)[a-z0-9_\-=]{43}`),
|
||||||
Keywords: []string{"duffel"},
|
Entropy: 2,
|
||||||
|
Keywords: []string{"duffel_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ import (
|
|||||||
func Dynatrace() *config.Rule {
|
func Dynatrace() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Dynatrace API token, potentially risking application performance monitoring and data exposure.",
|
|
||||||
RuleID: "dynatrace-api-token",
|
RuleID: "dynatrace-api-token",
|
||||||
|
Description: "Detected a Dynatrace API token, potentially risking application performance monitoring and data exposure.",
|
||||||
Regex: regexp.MustCompile(`dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}`),
|
Regex: regexp.MustCompile(`dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}`),
|
||||||
Keywords: []string{"dynatrace"},
|
Entropy: 4,
|
||||||
|
Keywords: []string{"dt0c01"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
|
|||||||
@@ -11,9 +11,10 @@ import (
|
|||||||
func EasyPost() *config.Rule {
|
func EasyPost() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Identified an EasyPost API token, which could lead to unauthorized postal and shipment service access and data exposure.",
|
|
||||||
RuleID: "easypost-api-token",
|
RuleID: "easypost-api-token",
|
||||||
|
Description: "Identified an EasyPost API token, which could lead to unauthorized postal and shipment service access and data exposure.",
|
||||||
Regex: regexp.MustCompile(`\bEZAK(?i)[a-z0-9]{54}`),
|
Regex: regexp.MustCompile(`\bEZAK(?i)[a-z0-9]{54}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"EZAK"},
|
Keywords: []string{"EZAK"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,9 +28,10 @@ func EasyPost() *config.Rule {
|
|||||||
func EasyPostTestAPI() *config.Rule {
|
func EasyPostTestAPI() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected an EasyPost test API token, risking exposure of test environments and potentially sensitive shipment data.",
|
|
||||||
RuleID: "easypost-test-api-token",
|
RuleID: "easypost-test-api-token",
|
||||||
|
Description: "Detected an EasyPost test API token, risking exposure of test environments and potentially sensitive shipment data.",
|
||||||
Regex: regexp.MustCompile(`\bEZTK(?i)[a-z0-9]{54}`),
|
Regex: regexp.MustCompile(`\bEZTK(?i)[a-z0-9]{54}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"EZTK"},
|
Keywords: []string{"EZTK"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
func FacebookSecret() *config.Rule {
|
func FacebookSecret() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a Facebook Application secret, posing a risk of unauthorized access to Facebook accounts and personal data exposure.",
|
|
||||||
RuleID: "facebook-secret",
|
RuleID: "facebook-secret",
|
||||||
|
Description: "Discovered a Facebook Application secret, posing a risk of unauthorized access to Facebook accounts and personal data exposure.",
|
||||||
Regex: utils.GenerateSemiGenericRegex([]string{"facebook"}, utils.Hex("32"), true),
|
Regex: utils.GenerateSemiGenericRegex([]string{"facebook"}, utils.Hex("32"), true),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{"facebook"},
|
Keywords: []string{"facebook"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,9 +31,10 @@ func FacebookSecret() *config.Rule {
|
|||||||
func FacebookAccessToken() *config.Rule {
|
func FacebookAccessToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.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-access-token",
|
RuleID: "facebook-access-token",
|
||||||
|
Description: "Discovered a Facebook Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`\d{15,16}(\||%)[0-9a-z\-_]{27,40}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`\d{15,16}(\||%)[0-9a-z\-_]{27,40}`, true),
|
||||||
|
Entropy: 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
@@ -49,9 +50,10 @@ func FacebookAccessToken() *config.Rule {
|
|||||||
func FacebookPageAccessToken() *config.Rule {
|
func FacebookPageAccessToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a Facebook Page Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure.",
|
|
||||||
RuleID: "facebook-page-access-token",
|
RuleID: "facebook-page-access-token",
|
||||||
Regex: utils.GenerateUniqueTokenRegex("EAA[MC]"+utils.AlphaNumeric("20,"), true),
|
Description: "Discovered a Facebook Page Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure.",
|
||||||
|
Regex: utils.GenerateUniqueTokenRegex("EAA[MC](?i)"+utils.AlphaNumeric("20,"), false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{"EAAM", "EAAC"},
|
Keywords: []string{"EAAM", "EAAC"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,5 +64,8 @@ func FacebookPageAccessToken() *config.Rule {
|
|||||||
`- name: FACEBOOK_TOKEN
|
`- name: FACEBOOK_TOKEN
|
||||||
value: "EAACEdEose0cBA1bad3afsf2aew"`, // gitleaks:allow
|
value: "EAACEdEose0cBA1bad3afsf2aew"`, // gitleaks:allow
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
fps := []string{
|
||||||
|
`eaaaC0b75a9329fded2ffa9a02b47e0117831b82`,
|
||||||
|
}
|
||||||
|
return utils.Validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -11,9 +11,10 @@ import (
|
|||||||
func FlutterwavePublicKey() *config.Rule {
|
func FlutterwavePublicKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Finicity Public Key, potentially exposing public cryptographic operations and integrations.",
|
|
||||||
RuleID: "flutterwave-public-key",
|
RuleID: "flutterwave-public-key",
|
||||||
|
Description: "Detected a Finicity Public Key, potentially exposing public cryptographic operations and integrations.",
|
||||||
Regex: regexp.MustCompile(`FLWPUBK_TEST-(?i)[a-h0-9]{32}-X`),
|
Regex: regexp.MustCompile(`FLWPUBK_TEST-(?i)[a-h0-9]{32}-X`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"FLWPUBK_TEST"},
|
Keywords: []string{"FLWPUBK_TEST"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,9 +28,10 @@ func FlutterwavePublicKey() *config.Rule {
|
|||||||
func FlutterwaveSecretKey() *config.Rule {
|
func FlutterwaveSecretKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Identified a Flutterwave Secret Key, risking unauthorized financial transactions and data breaches.",
|
|
||||||
RuleID: "flutterwave-secret-key",
|
RuleID: "flutterwave-secret-key",
|
||||||
|
Description: "Identified a Flutterwave Secret Key, risking unauthorized financial transactions and data breaches.",
|
||||||
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{32}-X`),
|
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{32}-X`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"FLWSECK_TEST"},
|
Keywords: []string{"FLWSECK_TEST"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,9 +45,10 @@ func FlutterwaveSecretKey() *config.Rule {
|
|||||||
func FlutterwaveEncKey() *config.Rule {
|
func FlutterwaveEncKey() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a Flutterwave Encryption Key, which may compromise payment processing and sensitive financial information.",
|
|
||||||
RuleID: "flutterwave-encryption-key",
|
RuleID: "flutterwave-encryption-key",
|
||||||
|
Description: "Uncovered a Flutterwave Encryption Key, which may compromise payment processing and sensitive financial information.",
|
||||||
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{12}`),
|
Regex: regexp.MustCompile(`FLWSECK_TEST-(?i)[a-h0-9]{12}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"FLWSECK_TEST"},
|
Keywords: []string{"FLWSECK_TEST"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,24 @@ import (
|
|||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var githubAllowlist = []config.Allowlist{
|
||||||
|
{
|
||||||
|
Paths: []*regexp.Regexp{
|
||||||
|
// https://github.com/octokit/auth-token.js/?tab=readme-ov-file#createtokenauthtoken-options
|
||||||
|
regexp.MustCompile(`(^|/)@octokit/auth-token/README\.md$`),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
func GitHubPat() *config.Rule {
|
func GitHubPat() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a GitHub Personal Access Token, potentially leading to unauthorized repository access and sensitive content exposure.",
|
|
||||||
RuleID: "github-pat",
|
RuleID: "github-pat",
|
||||||
|
Description: "Uncovered a GitHub Personal Access Token, potentially leading to unauthorized repository access and sensitive content exposure.",
|
||||||
Regex: regexp.MustCompile(`ghp_[0-9a-zA-Z]{36}`),
|
Regex: regexp.MustCompile(`ghp_[0-9a-zA-Z]{36}`),
|
||||||
Entropy: 3,
|
Entropy: 3,
|
||||||
Keywords: []string{"ghp_"},
|
Keywords: []string{"ghp_"},
|
||||||
|
Allowlists: githubAllowlist,
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
@@ -31,8 +41,8 @@ func GitHubPat() *config.Rule {
|
|||||||
func GitHubFineGrainedPat() *config.Rule {
|
func GitHubFineGrainedPat() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a GitHub Fine-Grained Personal Access Token, risking unauthorized repository access and code manipulation.",
|
|
||||||
RuleID: "github-fine-grained-pat",
|
RuleID: "github-fine-grained-pat",
|
||||||
|
Description: "Found a GitHub Fine-Grained Personal Access Token, risking unauthorized repository access and code manipulation.",
|
||||||
Regex: regexp.MustCompile(`github_pat_\w{82}`),
|
Regex: regexp.MustCompile(`github_pat_\w{82}`),
|
||||||
Entropy: 3,
|
Entropy: 3,
|
||||||
Keywords: []string{"github_pat_"},
|
Keywords: []string{"github_pat_"},
|
||||||
@@ -51,8 +61,8 @@ func GitHubFineGrainedPat() *config.Rule {
|
|||||||
func GitHubOauth() *config.Rule {
|
func GitHubOauth() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a GitHub OAuth Access Token, posing a risk of compromised GitHub account integrations and data leaks.",
|
|
||||||
RuleID: "github-oauth",
|
RuleID: "github-oauth",
|
||||||
|
Description: "Discovered a GitHub OAuth Access Token, posing a risk of compromised GitHub account integrations and data leaks.",
|
||||||
Regex: regexp.MustCompile(`gho_[0-9a-zA-Z]{36}`),
|
Regex: regexp.MustCompile(`gho_[0-9a-zA-Z]{36}`),
|
||||||
Entropy: 3,
|
Entropy: 3,
|
||||||
Keywords: []string{"gho_"},
|
Keywords: []string{"gho_"},
|
||||||
@@ -71,11 +81,12 @@ func GitHubOauth() *config.Rule {
|
|||||||
func GitHubApp() *config.Rule {
|
func GitHubApp() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Identified a GitHub App Token, which may compromise GitHub application integrations and source code security.",
|
|
||||||
RuleID: "github-app-token",
|
RuleID: "github-app-token",
|
||||||
|
Description: "Identified a GitHub App Token, which may compromise GitHub application integrations and source code security.",
|
||||||
Regex: regexp.MustCompile(`(?:ghu|ghs)_[0-9a-zA-Z]{36}`),
|
Regex: regexp.MustCompile(`(?:ghu|ghs)_[0-9a-zA-Z]{36}`),
|
||||||
Entropy: 3,
|
Entropy: 3,
|
||||||
Keywords: []string{"ghu_", "ghs_"},
|
Keywords: []string{"ghu_", "ghs_"},
|
||||||
|
Allowlists: githubAllowlist,
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
@@ -93,8 +104,8 @@ func GitHubApp() *config.Rule {
|
|||||||
func GitHubRefresh() *config.Rule {
|
func GitHubRefresh() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a GitHub Refresh Token, which could allow prolonged unauthorized access to GitHub services.",
|
|
||||||
RuleID: "github-refresh-token",
|
RuleID: "github-refresh-token",
|
||||||
|
Description: "Detected a GitHub Refresh Token, which could allow prolonged unauthorized access to GitHub services.",
|
||||||
Regex: regexp.MustCompile(`ghr_[0-9a-zA-Z]{36}`),
|
Regex: regexp.MustCompile(`ghr_[0-9a-zA-Z]{36}`),
|
||||||
Entropy: 3,
|
Entropy: 3,
|
||||||
Keywords: []string{"ghr_"},
|
Keywords: []string{"ghr_"},
|
||||||
|
|||||||
@@ -12,14 +12,13 @@ func GrafanaApiKey() *config.Rule {
|
|||||||
RuleID: "grafana-api-key",
|
RuleID: "grafana-api-key",
|
||||||
Description: "Identified a Grafana API key, which could compromise monitoring dashboards and sensitive data analytics.",
|
Description: "Identified a Grafana API key, which could compromise monitoring dashboards and sensitive data analytics.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`eyJrIjoi[A-Za-z0-9]{70,400}={0,3}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`eyJrIjoi[A-Za-z0-9]{70,400}={0,3}`, true),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{"eyJrIjoi"},
|
Keywords: []string{"eyJrIjoi"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
utils.GenerateSampleSecret("grafana-api-key",
|
utils.GenerateSampleSecret("grafana-api-key", "eyJrIjoi"+secrets.NewSecret(utils.AlphaNumeric("70"))),
|
||||||
"eyJrIjoi"+
|
|
||||||
secrets.NewSecret(utils.AlphaNumeric("70"))),
|
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
return utils.Validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
func HashiCorpTerraform() *config.Rule {
|
func HashiCorpTerraform() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a HashiCorp Terraform user/org API token, which may lead to unauthorized infrastructure management and security breaches.",
|
|
||||||
RuleID: "hashicorp-tf-api-token",
|
RuleID: "hashicorp-tf-api-token",
|
||||||
|
Description: "Uncovered a HashiCorp Terraform user/org API token, which may lead to unauthorized infrastructure management and security breaches.",
|
||||||
Regex: regexp.MustCompile(`(?i)[a-z0-9]{14}\.(?-i:atlasv1)\.[a-z0-9\-_=]{60,70}`),
|
Regex: regexp.MustCompile(`(?i)[a-z0-9]{14}\.(?-i:atlasv1)\.[a-z0-9\-_=]{60,70}`),
|
||||||
Entropy: 3.5,
|
Entropy: 3.5,
|
||||||
Keywords: []string{"atlasv1"},
|
Keywords: []string{"atlasv1"},
|
||||||
@@ -34,11 +34,12 @@ func HashicorpField() *config.Rule {
|
|||||||
keywords := []string{"administrator_login_password", "password"}
|
keywords := []string{"administrator_login_password", "password"}
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Identified a HashiCorp Terraform password field, risking unauthorized infrastructure configuration and security breaches.",
|
|
||||||
RuleID: "hashicorp-tf-password",
|
RuleID: "hashicorp-tf-password",
|
||||||
|
Description: "Identified a HashiCorp Terraform password field, risking unauthorized infrastructure configuration and security breaches.",
|
||||||
Regex: utils.GenerateSemiGenericRegex(keywords, fmt.Sprintf(`"%s"`, utils.AlphaNumericExtended("8,20")), true),
|
Regex: utils.GenerateSemiGenericRegex(keywords, fmt.Sprintf(`"%s"`, utils.AlphaNumericExtended("8,20")), true),
|
||||||
Keywords: keywords,
|
Entropy: 2,
|
||||||
Path: regexp.MustCompile(`(?i)\.(?:tf|hcl)$`),
|
Path: regexp.MustCompile(`(?i)\.(?:tf|hcl)$`),
|
||||||
|
Keywords: keywords,
|
||||||
}
|
}
|
||||||
|
|
||||||
tps := map[string]string{
|
tps := map[string]string{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ func VaultServiceToken() *config.Rule {
|
|||||||
Description: "Identified a Vault Service Token, potentially compromising infrastructure security and access to sensitive credentials.",
|
Description: "Identified a Vault Service Token, potentially compromising infrastructure security and access to sensitive credentials.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`(?:hvs\.[\w-]{90,120}|s\.(?i:[a-z0-9]{24}))`, false),
|
Regex: utils.GenerateUniqueTokenRegex(`(?:hvs\.[\w-]{90,120}|s\.(?i:[a-z0-9]{24}))`, false),
|
||||||
Entropy: 3.5,
|
Entropy: 3.5,
|
||||||
Keywords: []string{"hvs", "s."},
|
Keywords: []string{"hvs.", "s."},
|
||||||
Allowlists: []config.Allowlist{
|
Allowlists: []config.Allowlist{
|
||||||
{
|
{
|
||||||
Regexes: []*regexp.Regexp{
|
Regexes: []*regexp.Regexp{
|
||||||
@@ -52,15 +52,17 @@ func VaultServiceToken() *config.Rule {
|
|||||||
func VaultBatchToken() *config.Rule {
|
func VaultBatchToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Vault Batch Token, risking unauthorized access to secret management services and sensitive data.",
|
|
||||||
RuleID: "vault-batch-token",
|
RuleID: "vault-batch-token",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`hvb\.[a-z0-9_-]{138,212}`, true),
|
Description: "Detected a Vault Batch Token, risking unauthorized access to secret management services and sensitive data.",
|
||||||
Keywords: []string{"hvb"},
|
Regex: utils.GenerateUniqueTokenRegex(`hvb\.[\w-]{138,300}`, false),
|
||||||
|
Entropy: 4,
|
||||||
|
Keywords: []string{"hvb."},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := []string{
|
tps := []string{
|
||||||
utils.GenerateSampleSecret("vault", "hvb."+secrets.NewSecret(utils.AlphaNumericExtendedShort("138"))),
|
utils.GenerateSampleSecret("vault", "hvb."+secrets.NewSecret(utils.AlphaNumericExtendedShort("138"))),
|
||||||
|
`hvb.AAAAAQJgxDgqsGNorpoOR7hPZ5SU-ynBvCl764jyRP_fnX7WvkdkDzGjbLNGdPdtlY33Als2P36yDZueqzfdGw9RsaTeaYXSH7E4RYSWuRoQ9YRKIw8o7mDDY2ZcT3KOB7RwtW1w1FN2eDqcy_sbCjXPaM1iBVH-mqMSYRmRd2nb5D1SJPeBzIYRqSglLc31wUGN7xEzyrKUczqOKsIcybQA`, // gitleaks:allow
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
return utils.Validate(r, tps, nil)
|
||||||
}
|
}
|
||||||
@@ -19,8 +19,7 @@ func HuggingFaceAccessToken() *config.Rule {
|
|||||||
RuleID: "huggingface-access-token",
|
RuleID: "huggingface-access-token",
|
||||||
Description: "Discovered a Hugging Face Access token, which could lead to unauthorized access to AI models and sensitive data.",
|
Description: "Discovered a Hugging Face Access token, which could lead to unauthorized access to AI models and sensitive data.",
|
||||||
Regex: regexp.MustCompile(`(?:^|[\\'"` + "`" + ` >=:])(hf_[a-zA-Z]{34})(?:$|[\\'"` + "`" + ` <])`),
|
Regex: regexp.MustCompile(`(?:^|[\\'"` + "`" + ` >=:])(hf_[a-zA-Z]{34})(?:$|[\\'"` + "`" + ` <])`),
|
||||||
|
Entropy: 2,
|
||||||
Entropy: 1,
|
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"hf_",
|
"hf_",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ func Intra42ClientSecret() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a Intra42 client secret, which could lead to unauthorized access to the 42School API and sensitive data.",
|
Description: "Found a Intra42 client secret, which could lead to unauthorized access to the 42School API and sensitive data.",
|
||||||
RuleID: "intra42-client-secret",
|
RuleID: "intra42-client-secret",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`s-s4t2(?:ud|af)-[abcdef0123456789]{64}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`s-s4t2(?:ud|af)-(?i)[abcdef0123456789]{64}`, false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"intra",
|
"intra",
|
||||||
"s-s4t2ud-",
|
"s-s4t2ud-",
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ func JWT() *config.Rule {
|
|||||||
Description: "Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.",
|
Description: "Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.",
|
||||||
RuleID: "jwt",
|
RuleID: "jwt",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`ey[a-zA-Z0-9]{17,}\.ey[a-zA-Z0-9\/\\_-]{17,}\.(?:[a-zA-Z0-9\/\\_-]{10,}={0,2})?`, false),
|
Regex: utils.GenerateUniqueTokenRegex(`ey[a-zA-Z0-9]{17,}\.ey[a-zA-Z0-9\/\\_-]{17,}\.(?:[a-zA-Z0-9\/\\_-]{10,}={0,2})?`, false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{"ey"},
|
Keywords: []string{"ey"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,6 +73,7 @@ func JWTBase64() *config.Rule {
|
|||||||
Description: "Detected a Base64-encoded JSON Web Token, posing a risk of exposing encoded authentication and data exchange information.",
|
Description: "Detected a Base64-encoded JSON Web Token, posing a risk of exposing encoded authentication and data exchange information.",
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(
|
||||||
`\bZXlK(?:(?P<alg>aGJHY2lPaU)|(?P<apu>aGNIVWlPaU)|(?P<apv>aGNIWWlPaU)|(?P<aud>aGRXUWlPaU)|(?P<b64>aU5qUWlP)|(?P<crit>amNtbDBJanBi)|(?P<cty>amRIa2lPaU)|(?P<epk>bGNHc2lPbn)|(?P<enc>bGJtTWlPaU)|(?P<jku>cWEzVWlPaU)|(?P<jwk>cWQyc2lPb)|(?P<iss>cGMzTWlPaU)|(?P<iv>cGRpSTZJ)|(?P<kid>cmFXUWlP)|(?P<key_ops>clpYbGZiM0J6SWpwY)|(?P<kty>cmRIa2lPaUp)|(?P<nonce>dWIyNWpaU0k2)|(?P<p2c>d01tTWlP)|(?P<p2s>d01uTWlPaU)|(?P<ppt>d2NIUWlPaU)|(?P<sub>emRXSWlPaU)|(?P<svt>emRuUWlP)|(?P<tag>MFlXY2lPaU)|(?P<typ>MGVYQWlPaUp)|(?P<url>MWNtd2l)|(?P<use>MWMyVWlPaUp)|(?P<ver>MlpYSWlPaU)|(?P<version>MlpYSnphVzl1SWpv)|(?P<x>NElqb2)|(?P<x5c>NE5XTWlP)|(?P<x5t>NE5YUWlPaU)|(?P<x5ts256>NE5YUWpVekkxTmlJNkl)|(?P<x5u>NE5YVWlPaU)|(?P<zip>NmFYQWlPaU))[a-zA-Z0-9\/\\_+\-\r\n]{40,}={0,2}`),
|
`\bZXlK(?:(?P<alg>aGJHY2lPaU)|(?P<apu>aGNIVWlPaU)|(?P<apv>aGNIWWlPaU)|(?P<aud>aGRXUWlPaU)|(?P<b64>aU5qUWlP)|(?P<crit>amNtbDBJanBi)|(?P<cty>amRIa2lPaU)|(?P<epk>bGNHc2lPbn)|(?P<enc>bGJtTWlPaU)|(?P<jku>cWEzVWlPaU)|(?P<jwk>cWQyc2lPb)|(?P<iss>cGMzTWlPaU)|(?P<iv>cGRpSTZJ)|(?P<kid>cmFXUWlP)|(?P<key_ops>clpYbGZiM0J6SWpwY)|(?P<kty>cmRIa2lPaUp)|(?P<nonce>dWIyNWpaU0k2)|(?P<p2c>d01tTWlP)|(?P<p2s>d01uTWlPaU)|(?P<ppt>d2NIUWlPaU)|(?P<sub>emRXSWlPaU)|(?P<svt>emRuUWlP)|(?P<tag>MFlXY2lPaU)|(?P<typ>MGVYQWlPaUp)|(?P<url>MWNtd2l)|(?P<use>MWMyVWlPaUp)|(?P<ver>MlpYSWlPaU)|(?P<version>MlpYSnphVzl1SWpv)|(?P<x>NElqb2)|(?P<x5c>NE5XTWlP)|(?P<x5t>NE5YUWlPaU)|(?P<x5ts256>NE5YUWpVekkxTmlJNkl)|(?P<x5u>NE5YVWlPaU)|(?P<zip>NmFYQWlPaU))[a-zA-Z0-9\/\\_+\-\r\n]{40,}={0,2}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"zxlk"},
|
Keywords: []string{"zxlk"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ func KubernetesSecret() *config.Rule {
|
|||||||
// - valid base64 characters
|
// - valid base64 characters
|
||||||
// - longer than 10 characters (no "YmFyCg==")
|
// - longer than 10 characters (no "YmFyCg==")
|
||||||
//language=regexp
|
//language=regexp
|
||||||
dataPat := `\bdata:(?:.|\s){0,100}?\s+([\w.-]+:(?:[ \t]*(?:\||>[-+]?)\s+)?[ \t]*(?:["']?[a-z0-9]{10,}={0,3}["']?|\{\{[ \t\w"|$:=,.-]+}}|""|''))`
|
dataPat := `\bdata:(?:.|\s){0,100}?\s+([\w.-]+:(?:[ \t]*(?:\||>[-+]?)\s+)?[ \t]*(?:["']?[a-z0-9+/]{10,}={0,3}["']?|\{\{[ \t\w"|$:=,.-]+}}|""|''))`
|
||||||
|
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
@@ -46,6 +46,11 @@ func KubernetesSecret() *config.Rule {
|
|||||||
|
|
||||||
// validate
|
// validate
|
||||||
tps := map[string]string{
|
tps := map[string]string{
|
||||||
|
"base64-characters.yaml": `
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
data:
|
||||||
|
password: AAAAAAAAAAC7hjsA+H3owFygUv4w5B67lcSx14zff9FCPADiNbSwYWgE+O7Dhiy5tkRecs21ljjofvebe6xsYlA4cVmght0=`,
|
||||||
"comment.yaml": `
|
"comment.yaml": `
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
|
|||||||
@@ -11,9 +11,10 @@ import (
|
|||||||
func LinearAPIToken() *config.Rule {
|
func LinearAPIToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Linear API Token, posing a risk to project management tools and sensitive task data.",
|
|
||||||
RuleID: "linear-api-key",
|
RuleID: "linear-api-key",
|
||||||
|
Description: "Detected a Linear API Token, posing a risk to project management tools and sensitive task data.",
|
||||||
Regex: regexp.MustCompile(`lin_api_(?i)[a-z0-9]{40}`),
|
Regex: regexp.MustCompile(`lin_api_(?i)[a-z0-9]{40}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"lin_api_"},
|
Keywords: []string{"lin_api_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,9 +28,10 @@ func LinearAPIToken() *config.Rule {
|
|||||||
func LinearClientSecret() *config.Rule {
|
func LinearClientSecret() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Identified a Linear Client Secret, which may compromise secure integrations and sensitive project management data.",
|
|
||||||
RuleID: "linear-client-secret",
|
RuleID: "linear-client-secret",
|
||||||
|
Description: "Identified a Linear Client Secret, which may compromise secure integrations and sensitive project management data.",
|
||||||
Regex: utils.GenerateSemiGenericRegex([]string{"linear"}, utils.Hex("32"), true),
|
Regex: utils.GenerateSemiGenericRegex([]string{"linear"}, utils.Hex("32"), true),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"linear"},
|
Keywords: []string{"linear"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ func NPM() *config.Rule {
|
|||||||
RuleID: "npm-access-token",
|
RuleID: "npm-access-token",
|
||||||
Description: "Uncovered an npm access token, potentially compromising package management and code repository access.",
|
Description: "Uncovered an npm access token, potentially compromising package management and code repository access.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`npm_[a-z0-9]{36}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`npm_[a-z0-9]{36}`, true),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"npm_",
|
"npm_",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,9 +11,8 @@ func OktaAccessToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "okta-access-token",
|
RuleID: "okta-access-token",
|
||||||
Description: "Identified an Okta Access Token, which may compromise identity management services and user authentication data.",
|
Description: "Identified an Okta Access Token, which may compromise identity management services and user authentication data.",
|
||||||
Regex: utils.GenerateSemiGenericRegex([]string{"okta"},
|
Regex: utils.GenerateSemiGenericRegex([]string{"okta"}, utils.AlphaNumericExtended("42"), true),
|
||||||
utils.AlphaNumericExtended("42"), true),
|
Entropy: 3,
|
||||||
|
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"okta",
|
"okta",
|
||||||
},
|
},
|
||||||
@@ -23,5 +22,8 @@ func OktaAccessToken() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
utils.GenerateSampleSecret("okta", secrets.NewSecret(utils.AlphaNumeric("42"))),
|
utils.GenerateSampleSecret("okta", secrets.NewSecret(utils.AlphaNumeric("42"))),
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
fps := []string{
|
||||||
|
"00000000000000000000000000000000000TUVWXYZ",
|
||||||
|
}
|
||||||
|
return utils.Validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -11,8 +11,8 @@ func OpenAI() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "openai-api-key",
|
RuleID: "openai-api-key",
|
||||||
Description: "Found an OpenAI API Key, posing a risk of unauthorized access to AI services and data manipulation.",
|
Description: "Found an OpenAI API Key, posing a risk of unauthorized access to AI services and data manipulation.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20}`, false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"T3BlbkFJ",
|
"T3BlbkFJ",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ func OpenshiftUserToken() *config.Rule {
|
|||||||
// TODO: Do tokens vary in length or are they always 43?
|
// TODO: Do tokens vary in length or are they always 43?
|
||||||
Regex: regexp.MustCompile(`\b(sha256~[\w-]{43})(?:[^\w-]|\z)`),
|
Regex: regexp.MustCompile(`\b(sha256~[\w-]{43})(?:[^\w-]|\z)`),
|
||||||
Entropy: 3.5,
|
Entropy: 3.5,
|
||||||
SecretGroup: 0,
|
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"sha256~",
|
"sha256~",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ func PlanetScalePassword() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "planetscale-password",
|
RuleID: "planetscale-password",
|
||||||
Description: "Discovered a PlanetScale password, which could lead to unauthorized database operations and data breaches.",
|
Description: "Discovered a PlanetScale password, which could lead to unauthorized database operations and data breaches.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`pscale_pw_(?i)[a-z0-9=\-_\.]{32,64}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`pscale_pw_(?i)[\w=\.-]{32,64}`, true),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"pscale_pw_",
|
"pscale_pw_",
|
||||||
},
|
},
|
||||||
@@ -32,8 +32,8 @@ func PlanetScaleAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "planetscale-api-token",
|
RuleID: "planetscale-api-token",
|
||||||
Description: "Identified a PlanetScale API token, potentially compromising database management and operations.",
|
Description: "Identified a PlanetScale API token, potentially compromising database management and operations.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`pscale_tkn_(?i)[a-z0-9=\-_\.]{32,64}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`pscale_tkn_(?i)[\w=\.-]{32,64}`, false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"pscale_tkn_",
|
"pscale_tkn_",
|
||||||
},
|
},
|
||||||
@@ -53,8 +53,8 @@ func PlanetScaleOAuthToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "planetscale-oauth-token",
|
RuleID: "planetscale-oauth-token",
|
||||||
Description: "Found a PlanetScale OAuth token, posing a risk to database access control and sensitive data integrity.",
|
Description: "Found a PlanetScale OAuth token, posing a risk to database access control and sensitive data integrity.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`pscale_oauth_(?i)[a-z0-9=\-_\.]{32,64}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`pscale_oauth_[\w=\.-]{32,64}`, false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"pscale_oauth_",
|
"pscale_oauth_",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ func PostManAPI() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "postman-api-token",
|
RuleID: "postman-api-token",
|
||||||
Description: "Uncovered a Postman API token, potentially compromising API testing and development workflows.",
|
Description: "Uncovered a Postman API token, potentially compromising API testing and development workflows.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34}`, false),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"PMAK-",
|
"PMAK-",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ func Prefect() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "prefect-api-token",
|
RuleID: "prefect-api-token",
|
||||||
Description: "Detected a Prefect API token, risking unauthorized access to workflow management and automation services.",
|
Description: "Detected a Prefect API token, risking unauthorized access to workflow management and automation services.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`pnu_[a-z0-9]{36}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`pnu_[a-zA-Z0-9]{36}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"pnu_",
|
"pnu_",
|
||||||
},
|
},
|
||||||
@@ -22,5 +22,8 @@ func Prefect() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
utils.GenerateSampleSecret("api-token", "pnu_"+secrets.NewSecret(utils.AlphaNumeric("36"))),
|
utils.GenerateSampleSecret("api-token", "pnu_"+secrets.NewSecret(utils.AlphaNumeric("36"))),
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
fps := []string{
|
||||||
|
`PREFECT_API_KEY = "pnu_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"`,
|
||||||
|
}
|
||||||
|
return utils.Validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -11,8 +11,8 @@ func PulumiAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "pulumi-api-token",
|
RuleID: "pulumi-api-token",
|
||||||
Description: "Found a Pulumi API token, posing a risk to infrastructure as code services and cloud resource management.",
|
Description: "Found a Pulumi API token, posing a risk to infrastructure as code services and cloud resource management.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`pul-[a-f0-9]{40}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`pul-[a-f0-9]{40}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"pul-",
|
"pul-",
|
||||||
},
|
},
|
||||||
@@ -22,5 +22,8 @@ func PulumiAPIToken() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
utils.GenerateSampleSecret("pulumi-api-token", "pul-"+secrets.NewSecret(utils.Hex("40"))),
|
utils.GenerateSampleSecret("pulumi-api-token", "pul-"+secrets.NewSecret(utils.Hex("40"))),
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
fps := []string{
|
||||||
|
` <img src="./assets/vipul-f0eb1acf0da84c06a50c5b2c59932001997786b176dec02bd16128ee9ea83628.png" alt="" class="w-16 h-16 rounded-full">`,
|
||||||
|
}
|
||||||
|
return utils.Validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -13,8 +13,8 @@ func PyPiUploadToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a PyPI upload token, potentially compromising Python package distribution and repository integrity.",
|
Description: "Discovered a PyPI upload token, potentially compromising Python package distribution and repository integrity.",
|
||||||
RuleID: "pypi-upload-token",
|
RuleID: "pypi-upload-token",
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(`pypi-AgEIcHlwaS5vcmc[\w-]{50,1000}`),
|
||||||
`pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}`),
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"pypi-AgEIcHlwaS5vcmc",
|
"pypi-AgEIcHlwaS5vcmc",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ func ReadMe() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "readme-api-token",
|
RuleID: "readme-api-token",
|
||||||
Description: "Detected a Readme API token, risking unauthorized documentation management and content exposure.",
|
Description: "Detected a Readme API token, risking unauthorized documentation management and content exposure.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`rdme_[a-z0-9]{70}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`rdme_[a-z0-9]{70}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"rdme_",
|
"rdme_",
|
||||||
},
|
},
|
||||||
@@ -22,5 +22,8 @@ func ReadMe() *config.Rule {
|
|||||||
tps := []string{
|
tps := []string{
|
||||||
utils.GenerateSampleSecret("api-token", "rdme_"+secrets.NewSecret(utils.AlphaNumeric("70"))),
|
utils.GenerateSampleSecret("api-token", "rdme_"+secrets.NewSecret(utils.AlphaNumeric("70"))),
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, nil)
|
fps := []string{
|
||||||
|
`const API_KEY = 'rdme_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';`,
|
||||||
|
}
|
||||||
|
return utils.Validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -11,8 +11,8 @@ func RubyGemsAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "rubygems-api-token",
|
RuleID: "rubygems-api-token",
|
||||||
Description: "Identified a Rubygem API token, potentially compromising Ruby library distribution and package management.",
|
Description: "Identified a Rubygem API token, potentially compromising Ruby library distribution and package management.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`rubygems_[a-f0-9]{48}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`rubygems_[a-f0-9]{48}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"rubygems_",
|
"rubygems_",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ func ScalingoAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a Scalingo API token, posing a risk to cloud platform services and application deployment security.",
|
Description: "Found a Scalingo API token, posing a risk to cloud platform services and application deployment security.",
|
||||||
RuleID: "scalingo-api-token",
|
RuleID: "scalingo-api-token",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`tk-us-[a-zA-Z0-9-_]{48}`, false),
|
Regex: utils.GenerateUniqueTokenRegex(`tk-us-[\w-]{48}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"tk-us-"},
|
Keywords: []string{"tk-us-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ func SendGridAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "sendgrid-api-token",
|
RuleID: "sendgrid-api-token",
|
||||||
Description: "Detected a SendGrid API token, posing a risk of unauthorized email service operations and data exposure.",
|
Description: "Detected a SendGrid API token, posing a risk of unauthorized email service operations and data exposure.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`SG\.(?i)[a-z0-9=_\-\.]{66}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`SG\.(?i)[a-z0-9=_\-\.]{66}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"SG.",
|
"SG.",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ func SendInBlueAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "sendinblue-api-token",
|
RuleID: "sendinblue-api-token",
|
||||||
Description: "Identified a Sendinblue API token, which may compromise email marketing services and subscriber data privacy.",
|
Description: "Identified a Sendinblue API token, which may compromise email marketing services and subscriber data privacy.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"xkeysib-",
|
"xkeysib-",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ func ShippoAPIToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "shippo-api-token",
|
RuleID: "shippo-api-token",
|
||||||
Description: "Discovered a Shippo API token, potentially compromising shipping services and customer order data.",
|
Description: "Discovered a Shippo API token, potentially compromising shipping services and customer order data.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`shippo_(live|test)_[a-f0-9]{40}`, true),
|
Regex: utils.GenerateUniqueTokenRegex(`shippo_(?:live|test)_[a-fA-F0-9]{40}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"shippo_",
|
"shippo_",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,9 +11,10 @@ import (
|
|||||||
func ShopifySharedSecret() *config.Rule {
|
func ShopifySharedSecret() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a Shopify shared secret, posing a risk to application authentication and e-commerce platform security.",
|
|
||||||
RuleID: "shopify-shared-secret",
|
RuleID: "shopify-shared-secret",
|
||||||
|
Description: "Found a Shopify shared secret, posing a risk to application authentication and e-commerce platform security.",
|
||||||
Regex: regexp.MustCompile(`shpss_[a-fA-F0-9]{32}`),
|
Regex: regexp.MustCompile(`shpss_[a-fA-F0-9]{32}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"shpss_"},
|
Keywords: []string{"shpss_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,9 +26,10 @@ func ShopifySharedSecret() *config.Rule {
|
|||||||
func ShopifyAccessToken() *config.Rule {
|
func ShopifyAccessToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a Shopify access token, which could lead to unauthorized e-commerce platform access and data breaches.",
|
|
||||||
RuleID: "shopify-access-token",
|
RuleID: "shopify-access-token",
|
||||||
|
Description: "Uncovered a Shopify access token, which could lead to unauthorized e-commerce platform access and data breaches.",
|
||||||
Regex: regexp.MustCompile(`shpat_[a-fA-F0-9]{32}`),
|
Regex: regexp.MustCompile(`shpat_[a-fA-F0-9]{32}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"shpat_"},
|
Keywords: []string{"shpat_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,9 +41,10 @@ func ShopifyAccessToken() *config.Rule {
|
|||||||
func ShopifyCustomAccessToken() *config.Rule {
|
func ShopifyCustomAccessToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Shopify custom access token, potentially compromising custom app integrations and e-commerce data security.",
|
|
||||||
RuleID: "shopify-custom-access-token",
|
RuleID: "shopify-custom-access-token",
|
||||||
|
Description: "Detected a Shopify custom access token, potentially compromising custom app integrations and e-commerce data security.",
|
||||||
Regex: regexp.MustCompile(`shpca_[a-fA-F0-9]{32}`),
|
Regex: regexp.MustCompile(`shpca_[a-fA-F0-9]{32}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"shpca_"},
|
Keywords: []string{"shpca_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,9 +56,10 @@ func ShopifyCustomAccessToken() *config.Rule {
|
|||||||
func ShopifyPrivateAppAccessToken() *config.Rule {
|
func ShopifyPrivateAppAccessToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Identified a Shopify private app access token, risking unauthorized access to private app data and store operations.",
|
|
||||||
RuleID: "shopify-private-app-access-token",
|
RuleID: "shopify-private-app-access-token",
|
||||||
|
Description: "Identified a Shopify private app access token, risking unauthorized access to private app data and store operations.",
|
||||||
Regex: regexp.MustCompile(`shppa_[a-fA-F0-9]{32}`),
|
Regex: regexp.MustCompile(`shppa_[a-fA-F0-9]{32}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"shppa_"},
|
Keywords: []string{"shppa_"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ import (
|
|||||||
func SlackBotToken() *config.Rule {
|
func SlackBotToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Identified a Slack Bot token, which may compromise bot integrations and communication channel security.",
|
|
||||||
RuleID: "slack-bot-token",
|
RuleID: "slack-bot-token",
|
||||||
Regex: regexp.MustCompile(
|
Description: "Identified a Slack Bot token, which may compromise bot integrations and communication channel security.",
|
||||||
`(xoxb-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9-]*)`),
|
Regex: regexp.MustCompile(`xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9-]*`),
|
||||||
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"xoxb",
|
"xoxb",
|
||||||
},
|
},
|
||||||
@@ -44,10 +44,11 @@ func SlackBotToken() *config.Rule {
|
|||||||
func SlackUserToken() *config.Rule {
|
func SlackUserToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a Slack User token, posing a risk of unauthorized user impersonation and data access within Slack workspaces.",
|
|
||||||
RuleID: "slack-user-token",
|
RuleID: "slack-user-token",
|
||||||
|
Description: "Found a Slack User token, posing a risk of unauthorized user impersonation and data access within Slack workspaces.",
|
||||||
// The last segment seems to be consistently 32 characters. I've made it 28-34 just in case.
|
// The last segment seems to be consistently 32 characters. I've made it 28-34 just in case.
|
||||||
Regex: regexp.MustCompile(`xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34}`),
|
Regex: regexp.MustCompile(`xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"xoxp-", "xoxe-"},
|
Keywords: []string{"xoxp-", "xoxe-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,10 +83,11 @@ func SlackUserToken() *config.Rule {
|
|||||||
func SlackAppLevelToken() *config.Rule {
|
func SlackAppLevelToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Slack App-level token, risking unauthorized access to Slack applications and workspace data.",
|
|
||||||
RuleID: "slack-app-token",
|
RuleID: "slack-app-token",
|
||||||
|
Description: "Detected a Slack App-level token, risking unauthorized access to Slack applications and workspace data.",
|
||||||
// This regex is based on a limited number of examples and may not be 100% accurate.
|
// This regex is based on a limited number of examples and may not be 100% accurate.
|
||||||
Regex: regexp.MustCompile(`(?i)xapp-\d-[A-Z0-9]+-\d+-[a-z0-9]+`),
|
Regex: regexp.MustCompile(`(?i)xapp-\d-[A-Z0-9]+-\d+-[a-z0-9]+`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"xapp"},
|
Keywords: []string{"xapp"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,9 +105,10 @@ func SlackAppLevelToken() *config.Rule {
|
|||||||
func SlackConfigurationToken() *config.Rule {
|
func SlackConfigurationToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a Slack Configuration access token, posing a risk to workspace configuration and sensitive data access.",
|
|
||||||
RuleID: "slack-config-access-token",
|
RuleID: "slack-config-access-token",
|
||||||
|
Description: "Found a Slack Configuration access token, posing a risk to workspace configuration and sensitive data access.",
|
||||||
Regex: regexp.MustCompile(`(?i)xoxe.xox[bp]-\d-[A-Z0-9]{163,166}`),
|
Regex: regexp.MustCompile(`(?i)xoxe.xox[bp]-\d-[A-Z0-9]{163,166}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"xoxe.xoxb-", "xoxe.xoxp-"},
|
Keywords: []string{"xoxe.xoxb-", "xoxe.xoxp-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,9 +131,10 @@ func SlackConfigurationToken() *config.Rule {
|
|||||||
func SlackConfigurationRefreshToken() *config.Rule {
|
func SlackConfigurationRefreshToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a Slack Configuration refresh token, potentially allowing prolonged unauthorized access to configuration settings.",
|
|
||||||
RuleID: "slack-config-refresh-token",
|
RuleID: "slack-config-refresh-token",
|
||||||
|
Description: "Discovered a Slack Configuration refresh token, potentially allowing prolonged unauthorized access to configuration settings.",
|
||||||
Regex: regexp.MustCompile(`(?i)xoxe-\d-[A-Z0-9]{146}`),
|
Regex: regexp.MustCompile(`(?i)xoxe-\d-[A-Z0-9]{146}`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"xoxe-"},
|
Keywords: []string{"xoxe-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,11 +150,11 @@ func SlackConfigurationRefreshToken() *config.Rule {
|
|||||||
// Reference: https://api.slack.com/authentication/token-types#legacy_bot
|
// Reference: https://api.slack.com/authentication/token-types#legacy_bot
|
||||||
func SlackLegacyBotToken() *config.Rule {
|
func SlackLegacyBotToken() *config.Rule {
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a Slack Legacy bot token, which could lead to compromised legacy bot operations and data exposure.",
|
|
||||||
RuleID: "slack-legacy-bot-token",
|
RuleID: "slack-legacy-bot-token",
|
||||||
|
Description: "Uncovered a Slack Legacy bot token, which could lead to compromised legacy bot operations and data exposure.",
|
||||||
// This rule is based off the limited information I could find and may not be 100% accurate.
|
// This rule is based off the limited information I could find and may not be 100% accurate.
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(`xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}`),
|
||||||
`(xoxb-[0-9]{8,14}\-[a-zA-Z0-9]{18,26})`),
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"xoxb",
|
"xoxb",
|
||||||
},
|
},
|
||||||
@@ -189,11 +193,11 @@ func SlackLegacyBotToken() *config.Rule {
|
|||||||
// Reference: https://api.slack.com/authentication/token-types#workspace
|
// Reference: https://api.slack.com/authentication/token-types#workspace
|
||||||
func SlackLegacyWorkspaceToken() *config.Rule {
|
func SlackLegacyWorkspaceToken() *config.Rule {
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Identified a Slack Legacy Workspace token, potentially compromising access to workspace data and legacy features.",
|
|
||||||
RuleID: "slack-legacy-workspace-token",
|
RuleID: "slack-legacy-workspace-token",
|
||||||
|
Description: "Identified a Slack Legacy Workspace token, potentially compromising access to workspace data and legacy features.",
|
||||||
// This is by far the least confident pattern.
|
// This is by far the least confident pattern.
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(`xox[ar]-(?:\d-)?[0-9a-zA-Z]{8,48}`),
|
||||||
`(xox[ar]-(?:\d-)?[0-9a-zA-Z]{8,48})`),
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"xoxa",
|
"xoxa",
|
||||||
"xoxr",
|
"xoxr",
|
||||||
@@ -224,9 +228,10 @@ func SlackLegacyWorkspaceToken() *config.Rule {
|
|||||||
func SlackLegacyToken() *config.Rule {
|
func SlackLegacyToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Detected a Slack Legacy token, risking unauthorized access to older Slack integrations and user data.",
|
|
||||||
RuleID: "slack-legacy-token",
|
RuleID: "slack-legacy-token",
|
||||||
|
Description: "Detected a Slack Legacy token, risking unauthorized access to older Slack integrations and user data.",
|
||||||
Regex: regexp.MustCompile(`xox[os]-\d+-\d+-\d+-[a-fA-F\d]+`),
|
Regex: regexp.MustCompile(`xox[os]-\d+-\d+-\d+-[a-fA-F\d]+`),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"xoxo", "xoxs"},
|
Keywords: []string{"xoxo", "xoxs"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,11 +260,11 @@ func SlackLegacyToken() *config.Rule {
|
|||||||
func SlackWebHookUrl() *config.Rule {
|
func SlackWebHookUrl() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Discovered a Slack Webhook, which could lead to unauthorized message posting and data leakage in Slack channels.",
|
|
||||||
RuleID: "slack-webhook-url",
|
RuleID: "slack-webhook-url",
|
||||||
|
Description: "Discovered a Slack Webhook, which could lead to unauthorized message posting and data leakage in Slack channels.",
|
||||||
// If this generates too many false-positives we should define an allowlist (e.g., "xxxx", "00000").
|
// If this generates too many false-positives we should define an allowlist (e.g., "xxxx", "00000").
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(
|
||||||
`(https?:\/\/)?hooks.slack.com\/(services|workflows)\/[A-Za-z0-9+\/]{43,46}`),
|
`(?:https?://)?hooks.slack.com/(?:services|workflows)/[A-Za-z0-9+/]{43,46}`),
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"hooks.slack.com",
|
"hooks.slack.com",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ func SquareAccessToken() *config.Rule {
|
|||||||
RuleID: "square-access-token",
|
RuleID: "square-access-token",
|
||||||
Description: "Detected a Square Access Token, risking unauthorized payment processing and financial transaction exposure.",
|
Description: "Detected a Square Access Token, risking unauthorized payment processing and financial transaction exposure.",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`(?:EAAA|sq0atp-)[\w-]{22,60}`, false),
|
Regex: utils.GenerateUniqueTokenRegex(`(?:EAAA|sq0atp-)[\w-]{22,60}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"sq0atp-", "EAAA"},
|
Keywords: []string{"sq0atp-", "EAAA"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,6 +34,7 @@ func SquareSecret() *config.Rule {
|
|||||||
RuleID: "square-secret",
|
RuleID: "square-secret",
|
||||||
Description: "Square Secret",
|
Description: "Square Secret",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`sq0csp-[\w-]{43}`, false),
|
Regex: utils.GenerateUniqueTokenRegex(`sq0csp-[\w-]{43}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{"sq0csp-"},
|
Keywords: []string{"sq0csp-"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,10 @@ import (
|
|||||||
func StripeAccessToken() *config.Rule {
|
func StripeAccessToken() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a Stripe Access Token, posing a risk to payment processing services and sensitive financial data.",
|
|
||||||
RuleID: "stripe-access-token",
|
RuleID: "stripe-access-token",
|
||||||
Regex: utils.GenerateUniqueTokenRegex(`(sk|rk)_(test|live|prod)_[0-9a-z]{10,99}`, true),
|
Description: "Found a Stripe Access Token, posing a risk to payment processing services and sensitive financial data.",
|
||||||
|
Regex: utils.GenerateUniqueTokenRegex(`(?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99}`, false),
|
||||||
|
Entropy: 2,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"sk_test",
|
"sk_test",
|
||||||
"sk_live",
|
"sk_live",
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package rules
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/config/utils"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/config/utils"
|
||||||
"regexp"
|
|
||||||
|
|
||||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||||
"github.com/zricethezav/gitleaks/v8/config"
|
"github.com/zricethezav/gitleaks/v8/config"
|
||||||
)
|
)
|
||||||
@@ -14,19 +12,11 @@ func SumoLogicAccessID() *config.Rule {
|
|||||||
RuleID: "sumologic-access-id",
|
RuleID: "sumologic-access-id",
|
||||||
Description: "Discovered a SumoLogic Access ID, potentially compromising log management services and data analytics integrity.",
|
Description: "Discovered a SumoLogic Access ID, potentially compromising log management services and data analytics integrity.",
|
||||||
// TODO: Make 'su' case-sensitive.
|
// TODO: Make 'su' case-sensitive.
|
||||||
Regex: utils.GenerateSemiGenericRegex([]string{"sumo"},
|
Regex: utils.GenerateSemiGenericRegex([]string{"(?-i:[Ss]umo|SUMO)"}, "su[a-zA-Z0-9]{12}", false),
|
||||||
"su[a-zA-Z0-9]{12}", false),
|
|
||||||
|
|
||||||
Entropy: 3,
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"sumo",
|
"sumo",
|
||||||
},
|
},
|
||||||
Allowlists: []config.Allowlist{
|
|
||||||
{
|
|
||||||
RegexTarget: "line",
|
|
||||||
Regexes: []*regexp.Regexp{regexp.MustCompile(`sumOf`)},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
@@ -47,6 +37,7 @@ func SumoLogicAccessID() *config.Rule {
|
|||||||
`sumologic_access_id = ""`,
|
`sumologic_access_id = ""`,
|
||||||
`SUMOLOGIC_ACCESSID: ${SUMOLOGIC_ACCESSID}`,
|
`SUMOLOGIC_ACCESSID: ${SUMOLOGIC_ACCESSID}`,
|
||||||
`export SUMOLOGIC_ACCESSID=XXXXXXXXXXXXXX`, // gitleaks:allow
|
`export SUMOLOGIC_ACCESSID=XXXXXXXXXXXXXX`, // gitleaks:allow
|
||||||
|
`sumObj = suGyI5imvADdvU`,
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, fps)
|
return utils.Validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -56,9 +47,7 @@ func SumoLogicAccessToken() *config.Rule {
|
|||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
RuleID: "sumologic-access-token",
|
RuleID: "sumologic-access-token",
|
||||||
Description: "Uncovered a SumoLogic Access Token, which could lead to unauthorized access to log data and analytics insights.",
|
Description: "Uncovered a SumoLogic Access Token, which could lead to unauthorized access to log data and analytics insights.",
|
||||||
Regex: utils.GenerateSemiGenericRegex([]string{"sumo"},
|
Regex: utils.GenerateSemiGenericRegex([]string{"(?-i:[Ss]umo|SUMO)"}, utils.AlphaNumeric("64"), true),
|
||||||
utils.AlphaNumeric("64"), true),
|
|
||||||
|
|
||||||
Entropy: 3,
|
Entropy: 3,
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"sumo",
|
"sumo",
|
||||||
@@ -80,6 +69,7 @@ func SumoLogicAccessToken() *config.Rule {
|
|||||||
`SUMO_ACCESS_KEY=${SUMO_ACCESS_KEY:=$2}`,
|
`SUMO_ACCESS_KEY=${SUMO_ACCESS_KEY:=$2}`,
|
||||||
`sumo_access_key = "<SUMOLOGIC ACCESS KEY>"`,
|
`sumo_access_key = "<SUMOLOGIC ACCESS KEY>"`,
|
||||||
`SUMO_ACCESS_KEY: AbCeFG123`,
|
`SUMO_ACCESS_KEY: AbCeFG123`,
|
||||||
|
`sumOfExposures = 3Kof2VffNQ0QgYIhXUPJosVlCaQKm2hfpWE6F1fT9YGY74blQBIPsrkCcf1TwKE5;`,
|
||||||
}
|
}
|
||||||
return utils.Validate(r, tps, fps)
|
return utils.Validate(r, tps, fps)
|
||||||
}
|
}
|
||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
func TeamsWebhook() *config.Rule {
|
func TeamsWebhook() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Uncovered a Microsoft Teams Webhook, which could lead to unauthorized access to team collaboration tools and data leaks.",
|
|
||||||
RuleID: "microsoft-teams-webhook",
|
RuleID: "microsoft-teams-webhook",
|
||||||
|
Description: "Uncovered a Microsoft Teams Webhook, which could lead to unauthorized access to team collaboration tools and data leaks.",
|
||||||
Regex: regexp.MustCompile(
|
Regex: regexp.MustCompile(
|
||||||
`https:\/\/[a-z0-9]+\.webhook\.office\.com\/webhookb2\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\/IncomingWebhook\/[a-z0-9]{32}\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}`),
|
`https://[a-z0-9]+\.webhook\.office\.com/webhookb2/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}`),
|
||||||
Keywords: []string{
|
Keywords: []string{
|
||||||
"webhook.office.com",
|
"webhook.office.com",
|
||||||
"webhookb2",
|
"webhookb2",
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ import (
|
|||||||
func Twilio() *config.Rule {
|
func Twilio() *config.Rule {
|
||||||
// define rule
|
// define rule
|
||||||
r := config.Rule{
|
r := config.Rule{
|
||||||
Description: "Found a Twilio API Key, posing a risk to communication services and sensitive customer interaction data.",
|
|
||||||
RuleID: "twilio-api-key",
|
RuleID: "twilio-api-key",
|
||||||
|
Description: "Found a Twilio API Key, posing a risk to communication services and sensitive customer interaction data.",
|
||||||
Regex: regexp.MustCompile(`SK[0-9a-fA-F]{32}`),
|
Regex: regexp.MustCompile(`SK[0-9a-fA-F]{32}`),
|
||||||
Keywords: []string{"twilio"},
|
Entropy: 3,
|
||||||
|
Keywords: []string{"SK"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
|
|||||||
+119
-50
@@ -72,12 +72,14 @@ keywords = ["adafruit"]
|
|||||||
id = "adobe-client-id"
|
id = "adobe-client-id"
|
||||||
description = "Detected a pattern that resembles an Adobe OAuth Web Client ID, posing a risk of compromised Adobe integrations and data breaches."
|
description = "Detected a pattern that resembles an Adobe OAuth Web Client ID, posing a risk of compromised Adobe integrations and data breaches."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:adobe)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:adobe)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["adobe"]
|
keywords = ["adobe"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "adobe-client-secret"
|
id = "adobe-client-secret"
|
||||||
description = "Discovered a potential Adobe Client Secret, which, if exposed, could allow unauthorized Adobe service access and data manipulation."
|
description = "Discovered a potential Adobe Client Secret, which, if exposed, could allow unauthorized Adobe service access and data manipulation."
|
||||||
regex = '''(?i)\b((p8e-)(?i)[a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(p8e-(?i)[a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["p8e-"]
|
keywords = ["p8e-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -101,13 +103,15 @@ keywords = ["algolia"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "alibaba-access-key-id"
|
id = "alibaba-access-key-id"
|
||||||
description = "Detected an Alibaba Cloud AccessKey ID, posing a risk of unauthorized cloud resource access and potential data compromise."
|
description = "Detected an Alibaba Cloud AccessKey ID, posing a risk of unauthorized cloud resource access and potential data compromise."
|
||||||
regex = '''(?i)\b((LTAI)(?i)[a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(LTAI(?i)[a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["ltai"]
|
keywords = ["ltai"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "alibaba-secret-key"
|
id = "alibaba-secret-key"
|
||||||
description = "Discovered a potential Alibaba Cloud Secret Key, potentially allowing unauthorized operations and data access within Alibaba Cloud."
|
description = "Discovered a potential Alibaba Cloud Secret Key, potentially allowing unauthorized operations and data access within Alibaba Cloud."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:alibaba)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:alibaba)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["alibaba"]
|
keywords = ["alibaba"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -135,7 +139,8 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "authress-service-client-access-key"
|
id = "authress-service-client-access-key"
|
||||||
description = "Uncovered a possible Authress Service Client Access Key, which may compromise access control services and sensitive data."
|
description = "Uncovered a possible Authress Service Client Access Key, which may compromise access control services and sensitive data."
|
||||||
regex = '''(?i)\b((?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\.[a-z0-9]{4,6}\.acc[_-][a-z0-9-]{10,32}\.[a-z0-9+/_=-]{30,120})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b((?:sc|ext|scauth|authress)_(?i)[a-z0-9]{5,30}\.[a-z0-9]{4,6}\.(?-i:acc)[_-][a-z0-9-]{10,32}\.[a-z0-9+/_=-]{30,120})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"sc_",
|
"sc_",
|
||||||
"ext_",
|
"ext_",
|
||||||
@@ -202,24 +207,28 @@ keywords = ["bittrex"]
|
|||||||
id = "clojars-api-token"
|
id = "clojars-api-token"
|
||||||
description = "Uncovered a possible Clojars API token, risking unauthorized access to Clojure libraries and potential code manipulation."
|
description = "Uncovered a possible Clojars API token, risking unauthorized access to Clojure libraries and potential code manipulation."
|
||||||
regex = '''(?i)CLOJARS_[a-z0-9]{60}'''
|
regex = '''(?i)CLOJARS_[a-z0-9]{60}'''
|
||||||
keywords = ["clojars"]
|
entropy = 2
|
||||||
|
keywords = ["clojars_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "cloudflare-api-key"
|
id = "cloudflare-api-key"
|
||||||
description = "Detected a Cloudflare API Key, potentially compromising cloud application deployments and operational security."
|
description = "Detected a Cloudflare API Key, potentially compromising cloud application deployments and operational security."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:cloudflare)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:cloudflare)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["cloudflare"]
|
keywords = ["cloudflare"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "cloudflare-global-api-key"
|
id = "cloudflare-global-api-key"
|
||||||
description = "Detected a Cloudflare Global API Key, potentially compromising cloud application deployments and operational security."
|
description = "Detected a Cloudflare Global API Key, potentially compromising cloud application deployments and operational security."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:cloudflare)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{37})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:cloudflare)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{37})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["cloudflare"]
|
keywords = ["cloudflare"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "cloudflare-origin-ca-key"
|
id = "cloudflare-origin-ca-key"
|
||||||
description = "Detected a Cloudflare Origin CA Key, potentially compromising cloud application deployments and operational security."
|
description = "Detected a Cloudflare Origin CA Key, potentially compromising cloud application deployments and operational security."
|
||||||
regex = '''\b(v1\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(v1\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"cloudflare",
|
"cloudflare",
|
||||||
"v1.0-",
|
"v1.0-",
|
||||||
@@ -268,28 +277,32 @@ keywords = ["contentful"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "curl-auth-header"
|
id = "curl-auth-header"
|
||||||
description = ""
|
description = ""
|
||||||
regex = '''\bcurl\b(?:.*?|.*?(?:[\r\n]{1,2}.*?){1,5})[ \t\n\r](?:-H|--header)[ =](?:"(?i)(?:Authorization:[ \t]?(?:Basic[ \t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|Token)[ \t]([\w=@.+/-]{8,})|([\w=.+/-]{8,}))|(?:ApiKey|Token|X-API-KEY):[ \t]?([\w=@.+/-]{8,}))"|'(?i)(?:Authorization:[ \t]?(?:Basic[ \t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|Token)[ \t]([\w=@.+/-]{8,})|([\w=.+/-]{8,}))|(?:ApiKey|Token|X-API-KEY):[ \t]?([\w=@.+/-]{8,}))')(?:\B|\s|\z)'''
|
regex = '''\bcurl\b(?:.*?|.*?(?:[\r\n]{1,2}.*?){1,5})[ \t\n\r](?:-H|--header)(?:=|[ \t]{0,5})(?:"(?i)(?:Authorization:[ \t]{0,5}(?:Basic[ \t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \t]([\w=~@.+/-]{8,})|([\w=~@.+/-]{8,}))|(?:(?:X-)?Api-?(?:Key|Token)|Token):[ \t]{0,5}([\w=~@.+/-]{8,}))"|'(?i)(?:Authorization:[ \t]{0,5}(?:Basic[ \t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \t]([\w=~@.+/-]{8,})|([\w=~@.+/-]{8,}))|(?:(?:X-)?Api-?(?:Key|Token)|Token):[ \t]{0,5}([\w=~@.+/-]{8,}))')(?:\B|\s|\z)'''
|
||||||
entropy = 2.75
|
entropy = 2.75
|
||||||
keywords = ["curl"]
|
keywords = ["curl"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "curl-auth-user"
|
id = "curl-auth-user"
|
||||||
description = ""
|
description = ""
|
||||||
regex = '''\bcurl\b(?:.*|.*(?:[\r\n]{1,2}.*){1,5})[ \t\n\r](?:-u|--user)[ =](?:("[^:"]{3,}:[^"]{3,}")|('[^:']{3,}:[^']{3,}')|((?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+))|)(?:\s|\z)'''
|
regex = '''\bcurl\b(?:.*|.*(?:[\r\n]{1,2}.*){1,5})[ \t\n\r](?:-u|--user)(?:=|[ \t]{0,5})(?:"([^:"]{3,}:[^"]{3,})"|'([^:']{3,}:[^']{3,})'|((?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[\w${}@.-]+)))(?:\s|\z)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["curl"]
|
keywords = ["curl"]
|
||||||
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
||||||
[rules.allowlist]
|
[rules.allowlist]
|
||||||
regexes = [
|
regexes = [
|
||||||
'''[^:]+:(changeme|pass(word)?|pwd|\*+|x+)''',
|
'''[^:]+:(change(it|me)|pass(word)?|pwd|test|token|\*+|x+)''',
|
||||||
'''<[^>]+>:<[^>]+>|<[^:]+:[^>]+>''',
|
'''<[^>]+>:<[^>]+>|<[^:]+:[^>]+>''',
|
||||||
'''[^:]+:\[[^]]+]''',
|
'''[^:]+:\[[^]]+]''',
|
||||||
'''(?i)[^:]+:\$(\d|[a-z]\w+|(\{\d|[a-z]\w+}))''',
|
'''[^:]+:\$(\d|\w+|\{(\d|\w+)})''',
|
||||||
|
'''\$\([^)]+\):\$\([^)]+\)''',
|
||||||
|
'''\$?{{[^}]+}}:\$?{{[^}]+}}''',
|
||||||
]
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "databricks-api-token"
|
id = "databricks-api-token"
|
||||||
description = "Uncovered a Databricks API token, which may compromise big data analytics platforms and sensitive data processing."
|
description = "Uncovered a Databricks API token, which may compromise big data analytics platforms and sensitive data processing."
|
||||||
regex = '''(?i)\b(dapi[a-h0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(dapi[a-f0-9]{32}(?:-\d)?)(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["dapi"]
|
keywords = ["dapi"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -307,13 +320,15 @@ keywords = ["dnkey"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "digitalocean-access-token"
|
id = "digitalocean-access-token"
|
||||||
description = "Found a DigitalOcean OAuth Access Token, risking unauthorized cloud resource access and data compromise."
|
description = "Found a DigitalOcean OAuth Access Token, risking unauthorized cloud resource access and data compromise."
|
||||||
regex = '''(?i)\b(doo_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(doo_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["doo_v1_"]
|
keywords = ["doo_v1_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "digitalocean-pat"
|
id = "digitalocean-pat"
|
||||||
description = "Discovered a DigitalOcean Personal Access Token, posing a threat to cloud infrastructure security and data privacy."
|
description = "Discovered a DigitalOcean Personal Access Token, posing a threat to cloud infrastructure security and data privacy."
|
||||||
regex = '''(?i)\b(dop_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(dop_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["dop_v1_"]
|
keywords = ["dop_v1_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -346,7 +361,8 @@ keywords = ["discord"]
|
|||||||
id = "doppler-api-token"
|
id = "doppler-api-token"
|
||||||
description = "Discovered a Doppler API token, posing a risk to environment and secrets management security."
|
description = "Discovered a Doppler API token, posing a risk to environment and secrets management security."
|
||||||
regex = '''dp\.pt\.(?i)[a-z0-9]{43}'''
|
regex = '''dp\.pt\.(?i)[a-z0-9]{43}'''
|
||||||
keywords = ["doppler"]
|
entropy = 2
|
||||||
|
keywords = ["dp.pt."]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "droneci-access-token"
|
id = "droneci-access-token"
|
||||||
@@ -376,24 +392,28 @@ keywords = ["dropbox"]
|
|||||||
id = "duffel-api-token"
|
id = "duffel-api-token"
|
||||||
description = "Uncovered a Duffel API token, which may compromise travel platform integrations and sensitive customer data."
|
description = "Uncovered a Duffel API token, which may compromise travel platform integrations and sensitive customer data."
|
||||||
regex = '''duffel_(?:test|live)_(?i)[a-z0-9_\-=]{43}'''
|
regex = '''duffel_(?:test|live)_(?i)[a-z0-9_\-=]{43}'''
|
||||||
keywords = ["duffel"]
|
entropy = 2
|
||||||
|
keywords = ["duffel_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "dynatrace-api-token"
|
id = "dynatrace-api-token"
|
||||||
description = "Detected a Dynatrace API token, potentially risking application performance monitoring and data exposure."
|
description = "Detected a Dynatrace API token, potentially risking application performance monitoring and data exposure."
|
||||||
regex = '''dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}'''
|
regex = '''dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}'''
|
||||||
keywords = ["dynatrace"]
|
entropy = 4
|
||||||
|
keywords = ["dt0c01"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "easypost-api-token"
|
id = "easypost-api-token"
|
||||||
description = "Identified an EasyPost API token, which could lead to unauthorized postal and shipment service access and data exposure."
|
description = "Identified an EasyPost API token, which could lead to unauthorized postal and shipment service access and data exposure."
|
||||||
regex = '''\bEZAK(?i)[a-z0-9]{54}'''
|
regex = '''\bEZAK(?i)[a-z0-9]{54}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["ezak"]
|
keywords = ["ezak"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "easypost-test-api-token"
|
id = "easypost-test-api-token"
|
||||||
description = "Detected an EasyPost test API token, risking exposure of test environments and potentially sensitive shipment data."
|
description = "Detected an EasyPost test API token, risking exposure of test environments and potentially sensitive shipment data."
|
||||||
regex = '''\bEZTK(?i)[a-z0-9]{54}'''
|
regex = '''\bEZTK(?i)[a-z0-9]{54}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["eztk"]
|
keywords = ["eztk"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -407,11 +427,13 @@ keywords = ["etsy"]
|
|||||||
id = "facebook-access-token"
|
id = "facebook-access-token"
|
||||||
description = "Discovered a Facebook Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
|
description = "Discovered a Facebook Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
|
||||||
regex = '''(?i)\b(\d{15,16}(\||%)[0-9a-z\-_]{27,40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)\b(\d{15,16}(\||%)[0-9a-z\-_]{27,40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "facebook-page-access-token"
|
id = "facebook-page-access-token"
|
||||||
description = "Discovered a Facebook Page Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
|
description = "Discovered a Facebook Page Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
|
||||||
regex = '''(?i)\b(EAA[MC][a-z0-9]{20,})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(EAA[MC](?i)[a-z0-9]{20,})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = [
|
keywords = [
|
||||||
"eaam",
|
"eaam",
|
||||||
"eaac",
|
"eaac",
|
||||||
@@ -421,6 +443,7 @@ keywords = [
|
|||||||
id = "facebook-secret"
|
id = "facebook-secret"
|
||||||
description = "Discovered a Facebook Application secret, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
|
description = "Discovered a Facebook Application secret, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:facebook)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:facebook)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["facebook"]
|
keywords = ["facebook"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -457,18 +480,21 @@ keywords = ["flickr"]
|
|||||||
id = "flutterwave-encryption-key"
|
id = "flutterwave-encryption-key"
|
||||||
description = "Uncovered a Flutterwave Encryption Key, which may compromise payment processing and sensitive financial information."
|
description = "Uncovered a Flutterwave Encryption Key, which may compromise payment processing and sensitive financial information."
|
||||||
regex = '''FLWSECK_TEST-(?i)[a-h0-9]{12}'''
|
regex = '''FLWSECK_TEST-(?i)[a-h0-9]{12}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["flwseck_test"]
|
keywords = ["flwseck_test"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "flutterwave-public-key"
|
id = "flutterwave-public-key"
|
||||||
description = "Detected a Finicity Public Key, potentially exposing public cryptographic operations and integrations."
|
description = "Detected a Finicity Public Key, potentially exposing public cryptographic operations and integrations."
|
||||||
regex = '''FLWPUBK_TEST-(?i)[a-h0-9]{32}-X'''
|
regex = '''FLWPUBK_TEST-(?i)[a-h0-9]{32}-X'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["flwpubk_test"]
|
keywords = ["flwpubk_test"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "flutterwave-secret-key"
|
id = "flutterwave-secret-key"
|
||||||
description = "Identified a Flutterwave Secret Key, risking unauthorized financial transactions and data breaches."
|
description = "Identified a Flutterwave Secret Key, risking unauthorized financial transactions and data breaches."
|
||||||
regex = '''FLWSECK_TEST-(?i)[a-h0-9]{32}-X'''
|
regex = '''FLWSECK_TEST-(?i)[a-h0-9]{32}-X'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["flwseck_test"]
|
keywords = ["flwseck_test"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2005,6 +2031,11 @@ keywords = [
|
|||||||
"ghu_",
|
"ghu_",
|
||||||
"ghs_",
|
"ghs_",
|
||||||
]
|
]
|
||||||
|
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
||||||
|
[rules.allowlist]
|
||||||
|
paths = [
|
||||||
|
'''(^|/)@octokit/auth-token/README\.md$''',
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "github-fine-grained-pat"
|
id = "github-fine-grained-pat"
|
||||||
@@ -2026,6 +2057,11 @@ description = "Uncovered a GitHub Personal Access Token, potentially leading to
|
|||||||
regex = '''ghp_[0-9a-zA-Z]{36}'''
|
regex = '''ghp_[0-9a-zA-Z]{36}'''
|
||||||
entropy = 3
|
entropy = 3
|
||||||
keywords = ["ghp_"]
|
keywords = ["ghp_"]
|
||||||
|
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
||||||
|
[rules.allowlist]
|
||||||
|
paths = [
|
||||||
|
'''(^|/)@octokit/auth-token/README\.md$''',
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "github-refresh-token"
|
id = "github-refresh-token"
|
||||||
@@ -2074,6 +2110,7 @@ keywords = [
|
|||||||
id = "grafana-api-key"
|
id = "grafana-api-key"
|
||||||
description = "Identified a Grafana API key, which could compromise monitoring dashboards and sensitive data analytics."
|
description = "Identified a Grafana API key, which could compromise monitoring dashboards and sensitive data analytics."
|
||||||
regex = '''(?i)\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,3})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,3})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["eyjrijoi"]
|
keywords = ["eyjrijoi"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2111,6 +2148,7 @@ id = "hashicorp-tf-password"
|
|||||||
description = "Identified a HashiCorp Terraform password field, risking unauthorized infrastructure configuration and security breaches."
|
description = "Identified a HashiCorp Terraform password field, risking unauthorized infrastructure configuration and security breaches."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:administrator_login_password|password)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}("[a-z0-9=_\-]{8,20}")(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:administrator_login_password|password)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}("[a-z0-9=_\-]{8,20}")(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
path = '''(?i)\.(?:tf|hcl)$'''
|
path = '''(?i)\.(?:tf|hcl)$'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"administrator_login_password",
|
"administrator_login_password",
|
||||||
"password",
|
"password",
|
||||||
@@ -2132,7 +2170,7 @@ keywords = ["hubspot"]
|
|||||||
id = "huggingface-access-token"
|
id = "huggingface-access-token"
|
||||||
description = "Discovered a Hugging Face Access token, which could lead to unauthorized access to AI models and sensitive data."
|
description = "Discovered a Hugging Face Access token, which could lead to unauthorized access to AI models and sensitive data."
|
||||||
regex = '''(?:^|[\\'"` >=:])(hf_[a-zA-Z]{34})(?:$|[\\'"` <])'''
|
regex = '''(?:^|[\\'"` >=:])(hf_[a-zA-Z]{34})(?:$|[\\'"` <])'''
|
||||||
entropy = 1
|
entropy = 2
|
||||||
keywords = ["hf_"]
|
keywords = ["hf_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2158,7 +2196,8 @@ keywords = ["intercom"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "intra42-client-secret"
|
id = "intra42-client-secret"
|
||||||
description = "Found a Intra42 client secret, which could lead to unauthorized access to the 42School API and sensitive data."
|
description = "Found a Intra42 client secret, which could lead to unauthorized access to the 42School API and sensitive data."
|
||||||
regex = '''(?i)\b(s-s4t2(?:ud|af)-[abcdef0123456789]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(s-s4t2(?:ud|af)-(?i)[abcdef0123456789]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = [
|
keywords = [
|
||||||
"intra",
|
"intra",
|
||||||
"s-s4t2ud-",
|
"s-s4t2ud-",
|
||||||
@@ -2191,12 +2230,14 @@ keywords = [
|
|||||||
id = "jwt"
|
id = "jwt"
|
||||||
description = "Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data."
|
description = "Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data."
|
||||||
regex = '''\b(ey[a-zA-Z0-9]{17,}\.ey[a-zA-Z0-9\/\\_-]{17,}\.(?:[a-zA-Z0-9\/\\_-]{10,}={0,2})?)(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(ey[a-zA-Z0-9]{17,}\.ey[a-zA-Z0-9\/\\_-]{17,}\.(?:[a-zA-Z0-9\/\\_-]{10,}={0,2})?)(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["ey"]
|
keywords = ["ey"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "jwt-base64"
|
id = "jwt-base64"
|
||||||
description = "Detected a Base64-encoded JSON Web Token, posing a risk of exposing encoded authentication and data exchange information."
|
description = "Detected a Base64-encoded JSON Web Token, posing a risk of exposing encoded authentication and data exchange information."
|
||||||
regex = '''\bZXlK(?:(?P<alg>aGJHY2lPaU)|(?P<apu>aGNIVWlPaU)|(?P<apv>aGNIWWlPaU)|(?P<aud>aGRXUWlPaU)|(?P<b64>aU5qUWlP)|(?P<crit>amNtbDBJanBi)|(?P<cty>amRIa2lPaU)|(?P<epk>bGNHc2lPbn)|(?P<enc>bGJtTWlPaU)|(?P<jku>cWEzVWlPaU)|(?P<jwk>cWQyc2lPb)|(?P<iss>cGMzTWlPaU)|(?P<iv>cGRpSTZJ)|(?P<kid>cmFXUWlP)|(?P<key_ops>clpYbGZiM0J6SWpwY)|(?P<kty>cmRIa2lPaUp)|(?P<nonce>dWIyNWpaU0k2)|(?P<p2c>d01tTWlP)|(?P<p2s>d01uTWlPaU)|(?P<ppt>d2NIUWlPaU)|(?P<sub>emRXSWlPaU)|(?P<svt>emRuUWlP)|(?P<tag>MFlXY2lPaU)|(?P<typ>MGVYQWlPaUp)|(?P<url>MWNtd2l)|(?P<use>MWMyVWlPaUp)|(?P<ver>MlpYSWlPaU)|(?P<version>MlpYSnphVzl1SWpv)|(?P<x>NElqb2)|(?P<x5c>NE5XTWlP)|(?P<x5t>NE5YUWlPaU)|(?P<x5ts256>NE5YUWpVekkxTmlJNkl)|(?P<x5u>NE5YVWlPaU)|(?P<zip>NmFYQWlPaU))[a-zA-Z0-9\/\\_+\-\r\n]{40,}={0,2}'''
|
regex = '''\bZXlK(?:(?P<alg>aGJHY2lPaU)|(?P<apu>aGNIVWlPaU)|(?P<apv>aGNIWWlPaU)|(?P<aud>aGRXUWlPaU)|(?P<b64>aU5qUWlP)|(?P<crit>amNtbDBJanBi)|(?P<cty>amRIa2lPaU)|(?P<epk>bGNHc2lPbn)|(?P<enc>bGJtTWlPaU)|(?P<jku>cWEzVWlPaU)|(?P<jwk>cWQyc2lPb)|(?P<iss>cGMzTWlPaU)|(?P<iv>cGRpSTZJ)|(?P<kid>cmFXUWlP)|(?P<key_ops>clpYbGZiM0J6SWpwY)|(?P<kty>cmRIa2lPaUp)|(?P<nonce>dWIyNWpaU0k2)|(?P<p2c>d01tTWlP)|(?P<p2s>d01uTWlPaU)|(?P<ppt>d2NIUWlPaU)|(?P<sub>emRXSWlPaU)|(?P<svt>emRuUWlP)|(?P<tag>MFlXY2lPaU)|(?P<typ>MGVYQWlPaUp)|(?P<url>MWNtd2l)|(?P<use>MWMyVWlPaUp)|(?P<ver>MlpYSWlPaU)|(?P<version>MlpYSnphVzl1SWpv)|(?P<x>NElqb2)|(?P<x5c>NE5XTWlP)|(?P<x5t>NE5YUWlPaU)|(?P<x5ts256>NE5YUWpVekkxTmlJNkl)|(?P<x5u>NE5YVWlPaU)|(?P<zip>NmFYQWlPaU))[a-zA-Z0-9\/\\_+\-\r\n]{40,}={0,2}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["zxlk"]
|
keywords = ["zxlk"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2208,7 +2249,7 @@ keywords = ["kraken"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "kubernetes-secret-yaml"
|
id = "kubernetes-secret-yaml"
|
||||||
description = "Possible Kubernetes Secret detected, posing a risk of leaking credentials/tokens from your deployments"
|
description = "Possible Kubernetes Secret detected, posing a risk of leaking credentials/tokens from your deployments"
|
||||||
regex = '''(?i)(?:\bkind:[ \t]*["']?secret["']?(?:.|\s){0,200}?\bdata:(?:.|\s){0,100}?\s+([\w.-]+:(?:[ \t]*(?:\||>[-+]?)\s+)?[ \t]*(?:["']?[a-z0-9]{10,}={0,3}["']?|\{\{[ \t\w"|$:=,.-]+}}|""|''))|\bdata:(?:.|\s){0,100}?\s+([\w.-]+:(?:[ \t]*(?:\||>[-+]?)\s+)?[ \t]*(?:["']?[a-z0-9]{10,}={0,3}["']?|\{\{[ \t\w"|$:=,.-]+}}|""|''))(?:.|\s){0,200}?\bkind:[ \t]*["']?secret["']?)'''
|
regex = '''(?i)(?:\bkind:[ \t]*["']?secret["']?(?:.|\s){0,200}?\bdata:(?:.|\s){0,100}?\s+([\w.-]+:(?:[ \t]*(?:\||>[-+]?)\s+)?[ \t]*(?:["']?[a-z0-9+/]{10,}={0,3}["']?|\{\{[ \t\w"|$:=,.-]+}}|""|''))|\bdata:(?:.|\s){0,100}?\s+([\w.-]+:(?:[ \t]*(?:\||>[-+]?)\s+)?[ \t]*(?:["']?[a-z0-9+/]{10,}={0,3}["']?|\{\{[ \t\w"|$:=,.-]+}}|""|''))(?:.|\s){0,200}?\bkind:[ \t]*["']?secret["']?)'''
|
||||||
path = '''(?i)\.ya?ml$'''
|
path = '''(?i)\.ya?ml$'''
|
||||||
keywords = ["secret"]
|
keywords = ["secret"]
|
||||||
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
||||||
@@ -2239,12 +2280,14 @@ keywords = ["launchdarkly"]
|
|||||||
id = "linear-api-key"
|
id = "linear-api-key"
|
||||||
description = "Detected a Linear API Token, posing a risk to project management tools and sensitive task data."
|
description = "Detected a Linear API Token, posing a risk to project management tools and sensitive task data."
|
||||||
regex = '''lin_api_(?i)[a-z0-9]{40}'''
|
regex = '''lin_api_(?i)[a-z0-9]{40}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["lin_api_"]
|
keywords = ["lin_api_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "linear-client-secret"
|
id = "linear-client-secret"
|
||||||
description = "Identified a Linear Client Secret, which may compromise secure integrations and sensitive project management data."
|
description = "Identified a Linear Client Secret, which may compromise secure integrations and sensitive project management data."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:linear)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:linear)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["linear"]
|
keywords = ["linear"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2343,7 +2386,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "microsoft-teams-webhook"
|
id = "microsoft-teams-webhook"
|
||||||
description = "Uncovered a Microsoft Teams Webhook, which could lead to unauthorized access to team collaboration tools and data leaks."
|
description = "Uncovered a Microsoft Teams Webhook, which could lead to unauthorized access to team collaboration tools and data leaks."
|
||||||
regex = '''https:\/\/[a-z0-9]+\.webhook\.office\.com\/webhookb2\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\/IncomingWebhook\/[a-z0-9]{32}\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}'''
|
regex = '''https://[a-z0-9]+\.webhook\.office\.com/webhookb2/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}'''
|
||||||
keywords = [
|
keywords = [
|
||||||
"webhook.office.com",
|
"webhook.office.com",
|
||||||
"webhookb2",
|
"webhookb2",
|
||||||
@@ -2388,6 +2431,7 @@ keywords = ["nrak"]
|
|||||||
id = "npm-access-token"
|
id = "npm-access-token"
|
||||||
description = "Uncovered an npm access token, potentially compromising package management and code repository access."
|
description = "Uncovered an npm access token, potentially compromising package management and code repository access."
|
||||||
regex = '''(?i)\b(npm_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)\b(npm_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["npm_"]
|
keywords = ["npm_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2419,12 +2463,14 @@ keywords = [
|
|||||||
id = "okta-access-token"
|
id = "okta-access-token"
|
||||||
description = "Identified an Okta Access Token, which may compromise identity management services and user authentication data."
|
description = "Identified an Okta Access Token, which may compromise identity management services and user authentication data."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:okta)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{42})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:okta)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{42})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["okta"]
|
keywords = ["okta"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "openai-api-key"
|
id = "openai-api-key"
|
||||||
description = "Found an OpenAI API Key, posing a risk of unauthorized access to AI services and data manipulation."
|
description = "Found an OpenAI API Key, posing a risk of unauthorized access to AI services and data manipulation."
|
||||||
regex = '''(?i)\b(sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["t3blbkfj"]
|
keywords = ["t3blbkfj"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2457,31 +2503,36 @@ keywords = ["plaid"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "planetscale-api-token"
|
id = "planetscale-api-token"
|
||||||
description = "Identified a PlanetScale API token, potentially compromising database management and operations."
|
description = "Identified a PlanetScale API token, potentially compromising database management and operations."
|
||||||
regex = '''(?i)\b(pscale_tkn_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(pscale_tkn_(?i)[\w=\.-]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["pscale_tkn_"]
|
keywords = ["pscale_tkn_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "planetscale-oauth-token"
|
id = "planetscale-oauth-token"
|
||||||
description = "Found a PlanetScale OAuth token, posing a risk to database access control and sensitive data integrity."
|
description = "Found a PlanetScale OAuth token, posing a risk to database access control and sensitive data integrity."
|
||||||
regex = '''(?i)\b(pscale_oauth_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(pscale_oauth_[\w=\.-]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["pscale_oauth_"]
|
keywords = ["pscale_oauth_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "planetscale-password"
|
id = "planetscale-password"
|
||||||
description = "Discovered a PlanetScale password, which could lead to unauthorized database operations and data breaches."
|
description = "Discovered a PlanetScale password, which could lead to unauthorized database operations and data breaches."
|
||||||
regex = '''(?i)\b(pscale_pw_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)\b(pscale_pw_(?i)[\w=\.-]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["pscale_pw_"]
|
keywords = ["pscale_pw_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "postman-api-token"
|
id = "postman-api-token"
|
||||||
description = "Uncovered a Postman API token, potentially compromising API testing and development workflows."
|
description = "Uncovered a Postman API token, potentially compromising API testing and development workflows."
|
||||||
regex = '''(?i)\b(PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["pmak-"]
|
keywords = ["pmak-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "prefect-api-token"
|
id = "prefect-api-token"
|
||||||
description = "Detected a Prefect API token, risking unauthorized access to workflow management and automation services."
|
description = "Detected a Prefect API token, risking unauthorized access to workflow management and automation services."
|
||||||
regex = '''(?i)\b(pnu_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(pnu_[a-zA-Z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["pnu_"]
|
keywords = ["pnu_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2504,13 +2555,15 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "pulumi-api-token"
|
id = "pulumi-api-token"
|
||||||
description = "Found a Pulumi API token, posing a risk to infrastructure as code services and cloud resource management."
|
description = "Found a Pulumi API token, posing a risk to infrastructure as code services and cloud resource management."
|
||||||
regex = '''(?i)\b(pul-[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(pul-[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["pul-"]
|
keywords = ["pul-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "pypi-upload-token"
|
id = "pypi-upload-token"
|
||||||
description = "Discovered a PyPI upload token, potentially compromising Python package distribution and repository integrity."
|
description = "Discovered a PyPI upload token, potentially compromising Python package distribution and repository integrity."
|
||||||
regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}'''
|
regex = '''pypi-AgEIcHlwaS5vcmc[\w-]{50,1000}'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["pypi-ageichlwas5vcmc"]
|
keywords = ["pypi-ageichlwas5vcmc"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2522,19 +2575,22 @@ keywords = ["rapidapi"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "readme-api-token"
|
id = "readme-api-token"
|
||||||
description = "Detected a Readme API token, risking unauthorized documentation management and content exposure."
|
description = "Detected a Readme API token, risking unauthorized documentation management and content exposure."
|
||||||
regex = '''(?i)\b(rdme_[a-z0-9]{70})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(rdme_[a-z0-9]{70})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["rdme_"]
|
keywords = ["rdme_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "rubygems-api-token"
|
id = "rubygems-api-token"
|
||||||
description = "Identified a Rubygem API token, potentially compromising Ruby library distribution and package management."
|
description = "Identified a Rubygem API token, potentially compromising Ruby library distribution and package management."
|
||||||
regex = '''(?i)\b(rubygems_[a-f0-9]{48})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(rubygems_[a-f0-9]{48})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["rubygems_"]
|
keywords = ["rubygems_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "scalingo-api-token"
|
id = "scalingo-api-token"
|
||||||
description = "Found a Scalingo API token, posing a risk to cloud platform services and application deployment security."
|
description = "Found a Scalingo API token, posing a risk to cloud platform services and application deployment security."
|
||||||
regex = '''\b(tk-us-[a-zA-Z0-9-_]{48})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(tk-us-[\w-]{48})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["tk-us-"]
|
keywords = ["tk-us-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2552,13 +2608,15 @@ keywords = ["sendbird"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "sendgrid-api-token"
|
id = "sendgrid-api-token"
|
||||||
description = "Detected a SendGrid API token, posing a risk of unauthorized email service operations and data exposure."
|
description = "Detected a SendGrid API token, posing a risk of unauthorized email service operations and data exposure."
|
||||||
regex = '''(?i)\b(SG\.(?i)[a-z0-9=_\-\.]{66})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(SG\.(?i)[a-z0-9=_\-\.]{66})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["sg."]
|
keywords = ["sg."]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "sendinblue-api-token"
|
id = "sendinblue-api-token"
|
||||||
description = "Identified a Sendinblue API token, which may compromise email marketing services and subscriber data privacy."
|
description = "Identified a Sendinblue API token, which may compromise email marketing services and subscriber data privacy."
|
||||||
regex = '''(?i)\b(xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["xkeysib-"]
|
keywords = ["xkeysib-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2570,31 +2628,36 @@ keywords = ["sentry"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shippo-api-token"
|
id = "shippo-api-token"
|
||||||
description = "Discovered a Shippo API token, potentially compromising shipping services and customer order data."
|
description = "Discovered a Shippo API token, potentially compromising shipping services and customer order data."
|
||||||
regex = '''(?i)\b(shippo_(live|test)_[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(shippo_(?:live|test)_[a-fA-F0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["shippo_"]
|
keywords = ["shippo_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shopify-access-token"
|
id = "shopify-access-token"
|
||||||
description = "Uncovered a Shopify access token, which could lead to unauthorized e-commerce platform access and data breaches."
|
description = "Uncovered a Shopify access token, which could lead to unauthorized e-commerce platform access and data breaches."
|
||||||
regex = '''shpat_[a-fA-F0-9]{32}'''
|
regex = '''shpat_[a-fA-F0-9]{32}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["shpat_"]
|
keywords = ["shpat_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shopify-custom-access-token"
|
id = "shopify-custom-access-token"
|
||||||
description = "Detected a Shopify custom access token, potentially compromising custom app integrations and e-commerce data security."
|
description = "Detected a Shopify custom access token, potentially compromising custom app integrations and e-commerce data security."
|
||||||
regex = '''shpca_[a-fA-F0-9]{32}'''
|
regex = '''shpca_[a-fA-F0-9]{32}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["shpca_"]
|
keywords = ["shpca_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shopify-private-app-access-token"
|
id = "shopify-private-app-access-token"
|
||||||
description = "Identified a Shopify private app access token, risking unauthorized access to private app data and store operations."
|
description = "Identified a Shopify private app access token, risking unauthorized access to private app data and store operations."
|
||||||
regex = '''shppa_[a-fA-F0-9]{32}'''
|
regex = '''shppa_[a-fA-F0-9]{32}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["shppa_"]
|
keywords = ["shppa_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shopify-shared-secret"
|
id = "shopify-shared-secret"
|
||||||
description = "Found a Shopify shared secret, posing a risk to application authentication and e-commerce platform security."
|
description = "Found a Shopify shared secret, posing a risk to application authentication and e-commerce platform security."
|
||||||
regex = '''shpss_[a-fA-F0-9]{32}'''
|
regex = '''shpss_[a-fA-F0-9]{32}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["shpss_"]
|
keywords = ["shpss_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2619,18 +2682,21 @@ keywords = [
|
|||||||
id = "slack-app-token"
|
id = "slack-app-token"
|
||||||
description = "Detected a Slack App-level token, risking unauthorized access to Slack applications and workspace data."
|
description = "Detected a Slack App-level token, risking unauthorized access to Slack applications and workspace data."
|
||||||
regex = '''(?i)xapp-\d-[A-Z0-9]+-\d+-[a-z0-9]+'''
|
regex = '''(?i)xapp-\d-[A-Z0-9]+-\d+-[a-z0-9]+'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["xapp"]
|
keywords = ["xapp"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-bot-token"
|
id = "slack-bot-token"
|
||||||
description = "Identified a Slack Bot token, which may compromise bot integrations and communication channel security."
|
description = "Identified a Slack Bot token, which may compromise bot integrations and communication channel security."
|
||||||
regex = '''(xoxb-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9-]*)'''
|
regex = '''xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9-]*'''
|
||||||
|
entropy = 3
|
||||||
keywords = ["xoxb"]
|
keywords = ["xoxb"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-config-access-token"
|
id = "slack-config-access-token"
|
||||||
description = "Found a Slack Configuration access token, posing a risk to workspace configuration and sensitive data access."
|
description = "Found a Slack Configuration access token, posing a risk to workspace configuration and sensitive data access."
|
||||||
regex = '''(?i)xoxe.xox[bp]-\d-[A-Z0-9]{163,166}'''
|
regex = '''(?i)xoxe.xox[bp]-\d-[A-Z0-9]{163,166}'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"xoxe.xoxb-",
|
"xoxe.xoxb-",
|
||||||
"xoxe.xoxp-",
|
"xoxe.xoxp-",
|
||||||
@@ -2640,18 +2706,21 @@ keywords = [
|
|||||||
id = "slack-config-refresh-token"
|
id = "slack-config-refresh-token"
|
||||||
description = "Discovered a Slack Configuration refresh token, potentially allowing prolonged unauthorized access to configuration settings."
|
description = "Discovered a Slack Configuration refresh token, potentially allowing prolonged unauthorized access to configuration settings."
|
||||||
regex = '''(?i)xoxe-\d-[A-Z0-9]{146}'''
|
regex = '''(?i)xoxe-\d-[A-Z0-9]{146}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["xoxe-"]
|
keywords = ["xoxe-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-legacy-bot-token"
|
id = "slack-legacy-bot-token"
|
||||||
description = "Uncovered a Slack Legacy bot token, which could lead to compromised legacy bot operations and data exposure."
|
description = "Uncovered a Slack Legacy bot token, which could lead to compromised legacy bot operations and data exposure."
|
||||||
regex = '''(xoxb-[0-9]{8,14}\-[a-zA-Z0-9]{18,26})'''
|
regex = '''xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}'''
|
||||||
|
entropy = 2
|
||||||
keywords = ["xoxb"]
|
keywords = ["xoxb"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-legacy-token"
|
id = "slack-legacy-token"
|
||||||
description = "Detected a Slack Legacy token, risking unauthorized access to older Slack integrations and user data."
|
description = "Detected a Slack Legacy token, risking unauthorized access to older Slack integrations and user data."
|
||||||
regex = '''xox[os]-\d+-\d+-\d+-[a-fA-F\d]+'''
|
regex = '''xox[os]-\d+-\d+-\d+-[a-fA-F\d]+'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"xoxo",
|
"xoxo",
|
||||||
"xoxs",
|
"xoxs",
|
||||||
@@ -2660,7 +2729,8 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-legacy-workspace-token"
|
id = "slack-legacy-workspace-token"
|
||||||
description = "Identified a Slack Legacy Workspace token, potentially compromising access to workspace data and legacy features."
|
description = "Identified a Slack Legacy Workspace token, potentially compromising access to workspace data and legacy features."
|
||||||
regex = '''(xox[ar]-(?:\d-)?[0-9a-zA-Z]{8,48})'''
|
regex = '''xox[ar]-(?:\d-)?[0-9a-zA-Z]{8,48}'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"xoxa",
|
"xoxa",
|
||||||
"xoxr",
|
"xoxr",
|
||||||
@@ -2670,6 +2740,7 @@ keywords = [
|
|||||||
id = "slack-user-token"
|
id = "slack-user-token"
|
||||||
description = "Found a Slack User token, posing a risk of unauthorized user impersonation and data access within Slack workspaces."
|
description = "Found a Slack User token, posing a risk of unauthorized user impersonation and data access within Slack workspaces."
|
||||||
regex = '''xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34}'''
|
regex = '''xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34}'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"xoxp-",
|
"xoxp-",
|
||||||
"xoxe-",
|
"xoxe-",
|
||||||
@@ -2678,7 +2749,7 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-webhook-url"
|
id = "slack-webhook-url"
|
||||||
description = "Discovered a Slack Webhook, which could lead to unauthorized message posting and data leakage in Slack channels."
|
description = "Discovered a Slack Webhook, which could lead to unauthorized message posting and data leakage in Slack channels."
|
||||||
regex = '''(https?:\/\/)?hooks.slack.com\/(services|workflows)\/[A-Za-z0-9+\/]{43,46}'''
|
regex = '''(?:https?://)?hooks.slack.com/(?:services|workflows)/[A-Za-z0-9+/]{43,46}'''
|
||||||
keywords = ["hooks.slack.com"]
|
keywords = ["hooks.slack.com"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
@@ -2697,6 +2768,7 @@ keywords = [
|
|||||||
id = "square-access-token"
|
id = "square-access-token"
|
||||||
description = "Detected a Square Access Token, risking unauthorized payment processing and financial transaction exposure."
|
description = "Detected a Square Access Token, risking unauthorized payment processing and financial transaction exposure."
|
||||||
regex = '''\b((?:EAAA|sq0atp-)[\w-]{22,60})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b((?:EAAA|sq0atp-)[\w-]{22,60})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"sq0atp-",
|
"sq0atp-",
|
||||||
"eaaa",
|
"eaaa",
|
||||||
@@ -2711,7 +2783,8 @@ keywords = ["squarespace"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "stripe-access-token"
|
id = "stripe-access-token"
|
||||||
description = "Found a Stripe Access Token, posing a risk to payment processing services and sensitive financial data."
|
description = "Found a Stripe Access Token, posing a risk to payment processing services and sensitive financial data."
|
||||||
regex = '''(?i)\b((sk|rk)_(test|live|prod)_[0-9a-z]{10,99})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b((?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
|
entropy = 2
|
||||||
keywords = [
|
keywords = [
|
||||||
"sk_test",
|
"sk_test",
|
||||||
"sk_live",
|
"sk_live",
|
||||||
@@ -2724,20 +2797,14 @@ keywords = [
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "sumologic-access-id"
|
id = "sumologic-access-id"
|
||||||
description = "Discovered a SumoLogic Access ID, potentially compromising log management services and data analytics integrity."
|
description = "Discovered a SumoLogic Access ID, potentially compromising log management services and data analytics integrity."
|
||||||
regex = '''[\w.-]{0,10}?(?i:[\w.-]{0,10}?(?:sumo)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3})(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(su[a-zA-Z0-9]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''[\w.-]{0,10}?(?i:[\w.-]{0,10}?(?:(?-i:[Ss]umo|SUMO))(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3})(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(su[a-zA-Z0-9]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
entropy = 3
|
entropy = 3
|
||||||
keywords = ["sumo"]
|
keywords = ["sumo"]
|
||||||
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
|
||||||
[rules.allowlist]
|
|
||||||
regexTarget = "line"
|
|
||||||
regexes = [
|
|
||||||
'''sumOf''',
|
|
||||||
]
|
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "sumologic-access-token"
|
id = "sumologic-access-token"
|
||||||
description = "Uncovered a SumoLogic Access Token, which could lead to unauthorized access to log data and analytics insights."
|
description = "Uncovered a SumoLogic Access Token, which could lead to unauthorized access to log data and analytics insights."
|
||||||
regex = '''(?i)[\w.-]{0,10}?(?:sumo)(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''(?i)[\w.-]{0,10}?(?:(?-i:[Ss]umo|SUMO))(?:[ \t\w.-]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
entropy = 3
|
entropy = 3
|
||||||
keywords = ["sumo"]
|
keywords = ["sumo"]
|
||||||
|
|
||||||
@@ -2757,7 +2824,8 @@ keywords = ["travis"]
|
|||||||
id = "twilio-api-key"
|
id = "twilio-api-key"
|
||||||
description = "Found a Twilio API Key, posing a risk to communication services and sensitive customer interaction data."
|
description = "Found a Twilio API Key, posing a risk to communication services and sensitive customer interaction data."
|
||||||
regex = '''SK[0-9a-fA-F]{32}'''
|
regex = '''SK[0-9a-fA-F]{32}'''
|
||||||
keywords = ["twilio"]
|
entropy = 3
|
||||||
|
keywords = ["sk"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "twitch-api-token"
|
id = "twitch-api-token"
|
||||||
@@ -2804,8 +2872,9 @@ keywords = ["tfp_"]
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "vault-batch-token"
|
id = "vault-batch-token"
|
||||||
description = "Detected a Vault Batch Token, risking unauthorized access to secret management services and sensitive data."
|
description = "Detected a Vault Batch Token, risking unauthorized access to secret management services and sensitive data."
|
||||||
regex = '''(?i)\b(hvb\.[a-z0-9_-]{138,212})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b(hvb\.[\w-]{138,300})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
keywords = ["hvb"]
|
entropy = 4
|
||||||
|
keywords = ["hvb."]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "vault-service-token"
|
id = "vault-service-token"
|
||||||
@@ -2813,7 +2882,7 @@ description = "Identified a Vault Service Token, potentially compromising infras
|
|||||||
regex = '''\b((?:hvs\.[\w-]{90,120}|s\.(?i:[a-z0-9]{24})))(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
regex = '''\b((?:hvs\.[\w-]{90,120}|s\.(?i:[a-z0-9]{24})))(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||||
entropy = 3.5
|
entropy = 3.5
|
||||||
keywords = [
|
keywords = [
|
||||||
"hvs",
|
"hvs.",
|
||||||
"s.",
|
"s.",
|
||||||
]
|
]
|
||||||
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
||||||
|
|||||||
Reference in new issue
Block a user