mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0a958f55e | ||
|
|
237b03af18 | ||
|
|
f348991d21 | ||
|
|
e0745adbd2 | ||
|
|
1ddc924a67 | ||
|
|
0b07625567 | ||
|
|
0cabbf8ca8 | ||
|
|
ba9e089e35 | ||
|
|
31ff8677dd |
No files matched your search
@@ -4,3 +4,8 @@
|
|||||||
entry: gitleaks protect --verbose --redact --staged
|
entry: gitleaks protect --verbose --redact --staged
|
||||||
language: golang
|
language: golang
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
- id: gitleaks-docker
|
||||||
|
name: Detect hardcoded secrets
|
||||||
|
description: Detect hardcoded secrets using Gitleaks
|
||||||
|
entry: zricethezav/gitleaks:v8.5.2 protect --verbose --redact --staged
|
||||||
|
language: docker_image
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
|
# gitleaks
|
||||||
```
|
```
|
||||||
○
|
┌─○───┐
|
||||||
│╲
|
│ │╲ │
|
||||||
│ ○
|
│ │ ○ │
|
||||||
○ ░
|
│ ○ ░ │
|
||||||
░ gitleaks
|
└─░───┘
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@@ -62,13 +62,15 @@ make build
|
|||||||
### Pre-Commit
|
### Pre-Commit
|
||||||
1. Install pre-commit from https://pre-commit.com/#install
|
1. Install pre-commit from https://pre-commit.com/#install
|
||||||
2. Create a `.pre-commit-config.yaml` file at the root of your repository with the following content:
|
2. Create a `.pre-commit-config.yaml` file at the root of your repository with the following content:
|
||||||
```
|
```
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/zricethezav/gitleaks
|
- repo: https://github.com/zricethezav/gitleaks
|
||||||
rev: v8.2.0
|
rev: v8.2.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: gitleaks
|
- id: gitleaks
|
||||||
```
|
```
|
||||||
|
for a [native execution of GitLeaks](https://github.com/zricethezav/gitleaks/releases) or use the [`gitleaks-docker` pre-commit ID](https://github.com/zricethezav/gitleaks/blob/master/.pre-commit-hooks.yaml) for executing GitLeaks using the [official Docker images](#docker)
|
||||||
|
|
||||||
3. Install with `pre-commit install`
|
3. Install with `pre-commit install`
|
||||||
4. Now you're all set!
|
4. Now you're all set!
|
||||||
```
|
```
|
||||||
@@ -200,93 +202,74 @@ title = "Gitleaks title"
|
|||||||
# An array of tables that contain information that define instructions
|
# An array of tables that contain information that define instructions
|
||||||
# on how to detect secrets
|
# on how to detect secrets
|
||||||
[[rules]]
|
[[rules]]
|
||||||
|
|
||||||
# Unique identifier for this rule
|
# Unique identifier for this rule
|
||||||
id = "awesome-rule-1"
|
id = "awesome-rule-1"
|
||||||
|
|
||||||
# Short human readable description of the rule.
|
# Short human readable description of the rule.
|
||||||
description = "awesome rule 1"
|
description = "awesome rule 1"
|
||||||
|
|
||||||
# Golang regular expression used to detect secrets. Note Golang's regex engine
|
# Golang regular expression used to detect secrets. Note Golang's regex engine
|
||||||
# does not support lookaheads.
|
# does not support lookaheads.
|
||||||
regex = '''one-go-style-regex-for-this-rule'''
|
regex = '''one-go-style-regex-for-this-rule'''
|
||||||
|
|
||||||
# Golang regular expression used to match paths. This can be used as a standalone rule or it can be used
|
# Golang regular expression used to match paths. This can be used as a standalone rule or it can be used
|
||||||
# in conjunction with a valid `regex` entry.
|
# in conjunction with a valid `regex` entry.
|
||||||
path = '''a-file-path-regex'''
|
path = '''a-file-path-regex'''
|
||||||
|
|
||||||
# Array of strings used for metadata and reporting purposes.
|
# Array of strings used for metadata and reporting purposes.
|
||||||
tags = ["tag","another tag"]
|
tags = ["tag","another tag"]
|
||||||
|
|
||||||
# Int used to extract secret from regex match and used as the group that will have
|
# Int used to extract secret from regex match and used as the group that will have
|
||||||
# its entropy checked if `entropy` is set.
|
# its entropy checked if `entropy` is set.
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
|
||||||
# Float representing the minimum shannon entropy a regex group must have to be considered a secret.
|
# Float representing the minimum shannon entropy a regex group must have to be considered a secret.
|
||||||
entropy = 3.5
|
entropy = 3.5
|
||||||
|
|
||||||
|
# Keywords are used for pre-regex check filtering. Rules that contain
|
||||||
|
# keywords will perform a quick string compare check to make sure the
|
||||||
|
# keyword(s) are in the content being scanned. Ideally these values should
|
||||||
|
# either be part of the idenitifer or unique strings specific to the rule's regex
|
||||||
|
# (introduced in v8.6.0)
|
||||||
|
keywords = [
|
||||||
|
"auth",
|
||||||
|
"password",
|
||||||
|
"token",
|
||||||
|
]
|
||||||
|
|
||||||
# You can include an allowlist table for a single rule to reduce false positives or ignore commits
|
# You can include an allowlist table for a single rule to reduce false positives or ignore commits
|
||||||
# with known/rotated secrets
|
# with known/rotated secrets
|
||||||
[rules.allowlist]
|
[rules.allowlist]
|
||||||
description = "ignore commit A"
|
description = "ignore commit A"
|
||||||
commits = [ "commit-A", "commit-B"]
|
commits = [ "commit-A", "commit-B"]
|
||||||
paths = ['''one-file-path-regex''']
|
paths = [
|
||||||
regexes = ['''one-regex-within-the-already-matched-regex''']
|
'''go\.mod''',
|
||||||
|
'''go\.sum'''
|
||||||
|
]
|
||||||
|
regexes = [
|
||||||
|
'''process''',
|
||||||
|
'''getenv''',
|
||||||
|
]
|
||||||
|
|
||||||
# This is a global allowlist which has a higher order of precedence than rule-specific allowlists.
|
# This is a global allowlist which has a higher order of precedence than rule-specific allowlists.
|
||||||
# If a commit listed in the `commits` field below is encountered then that commit will be skipped and no
|
# If a commit listed in the `commits` field below is encountered then that commit will be skipped and no
|
||||||
# secrets will be detected for said commit. The same logic applies for regexes and paths.
|
# secrets will be detected for said commit. The same logic applies for regexes and paths.
|
||||||
[allowlist]
|
[allowlist]
|
||||||
description = "ignore commit A"
|
description = "global allow list"
|
||||||
commits = [ "commit-A", "commit-B"]
|
commits = [ "commit-A", "commit-B", "commit-C"]
|
||||||
paths = ['''one-file-path-regex''']
|
paths = [
|
||||||
regexes = ['''one-regex-within-the-already-matched-regex''']
|
'''gitleaks\.toml''',
|
||||||
|
'''(.*?)(jpg|gif|doc)'''
|
||||||
|
]
|
||||||
|
regexes = [
|
||||||
|
'''219-09-9999''',
|
||||||
|
'''078-05-1120''',
|
||||||
|
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
|
||||||
|
]
|
||||||
```
|
```
|
||||||
Refer to the default [gitleaks config](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) for examples and advice on writing regular expressions for secret detection.
|
Refer to the default [gitleaks config](https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml) for examples and advice on writing regular expressions for secret detection.
|
||||||
|
|
||||||
### Tips on Writing Regular Expressions
|
|
||||||
Gitleaks rules are defined by regular expressions and entropy ranges.
|
|
||||||
Some secrets have unique signatures which make detecting those secrets easy.
|
|
||||||
Examples of those secrets would be Gitlab Personal Access Tokens, AWS keys, and Github Access Tokens.
|
|
||||||
All these examples have defined prefixes like `glpat`, `AKIA`, `ghp_`, etc.
|
|
||||||
|
|
||||||
Other secrets might just be a hash which means we need to write more complex rules to verify
|
|
||||||
that what we are matching is a secret.
|
|
||||||
|
|
||||||
Here is an example of a semi-generic secret
|
|
||||||
```
|
|
||||||
discord_client_secret = "8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"
|
|
||||||
```
|
|
||||||
We can write a regular expression to capture the variable name (identifier),
|
|
||||||
the assignment symbol (like '=' or ':='), and finally the actual secret.
|
|
||||||
The structure of a rule to match this example secret is below:
|
|
||||||
|
|
||||||
Beginning string
|
|
||||||
quotation
|
|
||||||
│ End string quotation
|
|
||||||
│ │
|
|
||||||
▼ ▼
|
|
||||||
(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_\-]{32})['\"]
|
|
||||||
|
|
||||||
▲ ▲ ▲
|
|
||||||
│ │ │
|
|
||||||
│ │ │
|
|
||||||
identifier assignment symbol
|
|
||||||
Secret
|
|
||||||
|
|
||||||
|
|
||||||
#### A Note on Generic Secrets
|
|
||||||
Let's continue with the example `discord_client_secret = "8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"`.
|
|
||||||
This secret would match both the `discord-client-secret` rule and the `generic-api-key` rule in the default config.
|
|
||||||
```
|
|
||||||
[[rules]]
|
|
||||||
id = "discord-client-secret"
|
|
||||||
description = "Discord client secret"
|
|
||||||
regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_\-]{32})['\"]'''
|
|
||||||
secretGroup = 3
|
|
||||||
|
|
||||||
[[rules]]
|
|
||||||
id = "generic-api-key"
|
|
||||||
description = "Generic API Key"
|
|
||||||
regex = '''(?i)((key|api|token|secret|password)[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9a-zA-Z\-_=]{8,64})['\"]'''
|
|
||||||
entropy = 3.7
|
|
||||||
secretGroup = 4
|
|
||||||
```
|
|
||||||
If gitleaks encountered `discord_client_secret = "8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"`, only the `discord` rule would report a finding because
|
|
||||||
the generic rule has the string `generic` somewhere in the rule's `id`. If a secret is encountered and both a `generic` and non-generic rule have discovered the same secret, the non-generic
|
|
||||||
will be given precedence.
|
|
||||||
|
|
||||||
|
|
||||||
## Sponsorships
|
## Sponsorships
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ type ViperConfig struct {
|
|||||||
Entropy float64
|
Entropy float64
|
||||||
SecretGroup int
|
SecretGroup int
|
||||||
Regex string
|
Regex string
|
||||||
|
Keywords []string
|
||||||
Path string
|
Path string
|
||||||
Tags []string
|
Tags []string
|
||||||
|
|
||||||
@@ -56,6 +57,10 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
|||||||
allowlistPaths = append(allowlistPaths, regexp.MustCompile(a))
|
allowlistPaths = append(allowlistPaths, regexp.MustCompile(a))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if r.Keywords == nil {
|
||||||
|
r.Keywords = []string{}
|
||||||
|
}
|
||||||
|
|
||||||
if r.Tags == nil {
|
if r.Tags == nil {
|
||||||
r.Tags = []string{}
|
r.Tags = []string{}
|
||||||
}
|
}
|
||||||
@@ -80,6 +85,7 @@ func (vc *ViperConfig) Translate() (Config, error) {
|
|||||||
SecretGroup: r.SecretGroup,
|
SecretGroup: r.SecretGroup,
|
||||||
Entropy: r.Entropy,
|
Entropy: r.Entropy,
|
||||||
Tags: r.Tags,
|
Tags: r.Tags,
|
||||||
|
Keywords: r.Keywords,
|
||||||
Allowlist: Allowlist{
|
Allowlist: Allowlist{
|
||||||
Regexes: allowlistRegexes,
|
Regexes: allowlistRegexes,
|
||||||
Paths: allowlistPaths,
|
Paths: allowlistPaths,
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ func TestTranslate(t *testing.T) {
|
|||||||
Description: "AWS Access Key",
|
Description: "AWS Access Key",
|
||||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
|
Keywords: []string{},
|
||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Allowlist: Allowlist{
|
Allowlist: Allowlist{
|
||||||
Regexes: []*regexp.Regexp{
|
Regexes: []*regexp.Regexp{
|
||||||
@@ -43,6 +44,7 @@ func TestTranslate(t *testing.T) {
|
|||||||
Description: "AWS Access Key",
|
Description: "AWS Access Key",
|
||||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
|
Keywords: []string{},
|
||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Allowlist: Allowlist{
|
Allowlist: Allowlist{
|
||||||
Commits: []string{"allowthiscommit"},
|
Commits: []string{"allowthiscommit"},
|
||||||
@@ -59,6 +61,7 @@ func TestTranslate(t *testing.T) {
|
|||||||
Description: "AWS Access Key",
|
Description: "AWS Access Key",
|
||||||
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
Regex: regexp.MustCompile("(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}"),
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
|
Keywords: []string{},
|
||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Allowlist: Allowlist{
|
Allowlist: Allowlist{
|
||||||
Paths: []*regexp.Regexp{
|
Paths: []*regexp.Regexp{
|
||||||
@@ -81,6 +84,7 @@ func TestTranslate(t *testing.T) {
|
|||||||
Entropy: 3.5,
|
Entropy: 3.5,
|
||||||
SecretGroup: 3,
|
SecretGroup: 3,
|
||||||
Tags: []string{},
|
Tags: []string{},
|
||||||
|
Keywords: []string{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
+144
-52
@@ -1,558 +1,650 @@
|
|||||||
title = "gitleaks config"
|
title = "gitleaks config"
|
||||||
|
|
||||||
# Gitleaks rules are defined by regular expressions and entropy ranges.
|
|
||||||
# Some secrets have unique signatures which make detecting those secrets easy.
|
|
||||||
# Examples of those secrets would be GitLab Personal Access Tokens, AWS keys, and GitHub Access Tokens.
|
|
||||||
# All these examples have defined prefixes like `glpat`, `AKIA`, `ghp_`, etc.
|
|
||||||
#
|
|
||||||
# Other secrets might just be a hash which means we need to write more complex rules to verify
|
|
||||||
# that what we are matching is a secret.
|
|
||||||
#
|
|
||||||
# Here is an example of a semi-generic secret
|
|
||||||
#
|
|
||||||
# discord_client_secret = "8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"
|
|
||||||
#
|
|
||||||
# We can write a regular expression to capture the variable name (identifier),
|
|
||||||
# the assignment symbol (like '=' or ':='), and finally the actual secret.
|
|
||||||
# The structure of a rule to match this example secret is below:
|
|
||||||
#
|
|
||||||
# Beginning string
|
|
||||||
# quotation
|
|
||||||
# │ End string quotation
|
|
||||||
# │ │
|
|
||||||
# ▼ ▼
|
|
||||||
# (?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_\-]{32})['\"]
|
|
||||||
#
|
|
||||||
# ▲ ▲ ▲
|
|
||||||
# │ │ │
|
|
||||||
# │ │ │
|
|
||||||
# identifier assignment symbol
|
|
||||||
# Secret
|
|
||||||
#
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "gitlab-pat"
|
id = "gitlab-pat"
|
||||||
description = "GitLab Personal Access Token"
|
description = "GitLab Personal Access Token"
|
||||||
regex = '''glpat-[0-9a-zA-Z\-\_]{20}'''
|
regex = '''glpat-[0-9a-zA-Z\-\_]{20}'''
|
||||||
|
keywords = ["glpat"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "aws-access-token"
|
id = "aws-access-token"
|
||||||
description = "AWS"
|
description = "AWS"
|
||||||
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
|
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
|
||||||
|
keywords = [
|
||||||
|
"AKIA",
|
||||||
|
"AGPA",
|
||||||
|
"AIDA",
|
||||||
|
"AROA",
|
||||||
|
"AIPA",
|
||||||
|
"ANPA",
|
||||||
|
"ANVA",
|
||||||
|
"ASIA",
|
||||||
|
]
|
||||||
|
|
||||||
# Cryptographic keys
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "PKCS8-PK"
|
id = "PKCS8-PK"
|
||||||
description = "PKCS8 private key"
|
description = "PKCS8 private key"
|
||||||
regex = '''-----BEGIN PRIVATE KEY-----'''
|
regex = '''-----BEGIN PRIVATE KEY-----'''
|
||||||
|
keywords = ["BEGIN PRIVATE"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "RSA-PK"
|
id = "RSA-PK"
|
||||||
description = "RSA private key"
|
description = "RSA private key"
|
||||||
regex = '''-----BEGIN RSA PRIVATE KEY-----'''
|
regex = '''-----BEGIN RSA PRIVATE KEY-----'''
|
||||||
|
keywords = ["BEGIN RSA"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "OPENSSH-PK"
|
id = "OPENSSH-PK"
|
||||||
description = "SSH private key"
|
description = "SSH private key"
|
||||||
regex = '''-----BEGIN OPENSSH PRIVATE KEY-----'''
|
regex = '''-----BEGIN OPENSSH PRIVATE KEY-----'''
|
||||||
|
keywords = ["BEGIN OPENSSH"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "PGP-PK"
|
id = "PGP-PK"
|
||||||
description = "PGP private key"
|
description = "PGP private key"
|
||||||
regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
|
regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
|
||||||
|
keywords = ["BEGIN PGP"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "github-pat"
|
id = "github-pat"
|
||||||
description = "GitHub Personal Access Token"
|
description = "GitHub Personal Access Token"
|
||||||
regex = '''ghp_[0-9a-zA-Z]{36}'''
|
regex = '''ghp_[0-9a-zA-Z]{36}'''
|
||||||
|
keywords = ["ghp_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "github-oauth"
|
id = "github-oauth"
|
||||||
description = "GitHub OAuth Access Token"
|
description = "GitHub OAuth Access Token"
|
||||||
regex = '''gho_[0-9a-zA-Z]{36}'''
|
regex = '''gho_[0-9a-zA-Z]{36}'''
|
||||||
|
keywords = ["gho_"]
|
||||||
|
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "SSH-DSA-PK"
|
id = "SSH-DSA-PK"
|
||||||
description = "SSH (DSA) private key"
|
description = "SSH (DSA) private key"
|
||||||
regex = '''-----BEGIN DSA PRIVATE KEY-----'''
|
regex = '''-----BEGIN DSA PRIVATE KEY-----'''
|
||||||
|
keywords = ["BEGIN DSA"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "SSH-EC-PK"
|
id = "SSH-EC-PK"
|
||||||
description = "SSH (EC) private key"
|
description = "SSH (EC) private key"
|
||||||
regex = '''-----BEGIN EC PRIVATE KEY-----'''
|
regex = '''-----BEGIN EC PRIVATE KEY-----'''
|
||||||
|
keywords = ["BEGIN EC"]
|
||||||
|
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "github-app-token"
|
id = "github-app-token"
|
||||||
description = "GitHub App Token"
|
description = "GitHub App Token"
|
||||||
regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}'''
|
regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}'''
|
||||||
|
keywords = [
|
||||||
|
"ghu_",
|
||||||
|
"ghs_"
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "github-refresh-token"
|
id = "github-refresh-token"
|
||||||
description = "GitHub Refresh Token"
|
description = "GitHub Refresh Token"
|
||||||
regex = '''ghr_[0-9a-zA-Z]{76}'''
|
regex = '''ghr_[0-9a-zA-Z]{76}'''
|
||||||
|
keywords = ["ghr_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shopify-shared-secret"
|
id = "shopify-shared-secret"
|
||||||
description = "Shopify shared secret"
|
description = "Shopify shared secret"
|
||||||
regex = '''shpss_[a-fA-F0-9]{32}'''
|
regex = '''shpss_[a-fA-F0-9]{32}'''
|
||||||
|
keywords = ["shpss_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shopify-access-token"
|
id = "shopify-access-token"
|
||||||
description = "Shopify access token"
|
description = "Shopify access token"
|
||||||
regex = '''shpat_[a-fA-F0-9]{32}'''
|
regex = '''shpat_[a-fA-F0-9]{32}'''
|
||||||
|
keywords = ["shpat_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shopify-custom-access-token"
|
id = "shopify-custom-access-token"
|
||||||
description = "Shopify custom app access token"
|
description = "Shopify custom app access token"
|
||||||
regex = '''shpca_[a-fA-F0-9]{32}'''
|
regex = '''shpca_[a-fA-F0-9]{32}'''
|
||||||
|
keywords = ["shpca_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shopify-private-app-access-token"
|
id = "shopify-private-app-access-token"
|
||||||
description = "Shopify private app access token"
|
description = "Shopify private app access token"
|
||||||
regex = '''shppa_[a-fA-F0-9]{32}'''
|
regex = '''shppa_[a-fA-F0-9]{32}'''
|
||||||
|
keywords = ["shppa_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-access-token"
|
id = "slack-access-token"
|
||||||
description = "Slack token"
|
description = "Slack token"
|
||||||
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
|
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
|
||||||
|
keywords = [
|
||||||
|
"xoxb",
|
||||||
|
"xoxa",
|
||||||
|
"xoxp",
|
||||||
|
"xoxr",
|
||||||
|
"xoxs"
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "stripe-access-token"
|
id = "stripe-access-token"
|
||||||
description = "Stripe"
|
description = "Stripe"
|
||||||
regex = '''(?i)(sk|pk)_(test|live)_[0-9a-z]{10,32}'''
|
regex = '''(?i)(sk|pk)_(test|live)_[0-9a-z]{10,32}'''
|
||||||
|
keywords = [
|
||||||
|
"sk_test",
|
||||||
|
"pk_test",
|
||||||
|
"sk_live",
|
||||||
|
"pk_live"
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "pypi-upload-token"
|
id = "pypi-upload-token"
|
||||||
description = "PyPI upload token"
|
description = "PyPI upload token"
|
||||||
regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}'''
|
regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}'''
|
||||||
|
keywords = ["pypi-AgEIcHlwaS5vcmc"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "gcp-service-account"
|
id = "gcp-service-account"
|
||||||
description = "Google (GCP) Service-account"
|
description = "Google (GCP) Service-account"
|
||||||
regex = '''\"type\": \"service_account\"'''
|
regex = '''\"type\": \"service_account\"'''
|
||||||
|
keywords = ["\"type\": \"service_account\""]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "heroku-api-key"
|
id = "heroku-api-key"
|
||||||
description = "Heroku API Key"
|
description = "Heroku API Key"
|
||||||
regex = ''' (?i)(heroku[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})['\"]'''
|
regex = ''' (?i)(heroku[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["heroku"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "slack-web-hook"
|
id = "slack-web-hook"
|
||||||
description = "Slack Webhook"
|
description = "Slack Webhook"
|
||||||
regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}'''
|
regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}'''
|
||||||
|
keywords = ["https://hooks.slack.com/services/"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "twilio-api-key"
|
id = "twilio-api-key"
|
||||||
description = "Twilio API Key"
|
description = "Twilio API Key"
|
||||||
regex = '''SK[0-9a-fA-F]{32}'''
|
regex = '''SK[0-9a-fA-F]{32}'''
|
||||||
|
keywords = ["twilio"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "age-secret-key"
|
id = "age-secret-key"
|
||||||
description = "Age secret key"
|
description = "Age secret key"
|
||||||
regex = '''AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}'''
|
regex = '''AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}'''
|
||||||
|
keywords = ["AGE-SECRET-KEY-1"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "facebook-token"
|
id = "facebook-token"
|
||||||
description = "Facebook token"
|
description = "Facebook token"
|
||||||
regex = '''(?i)(facebook[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
|
regex = '''(?i)(facebook[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["facebook"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "twitter-token"
|
id = "twitter-token"
|
||||||
description = "Twitter token"
|
description = "Twitter token"
|
||||||
regex = '''(?i)(twitter[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{35,44})['\"]'''
|
regex = '''(?i)(twitter[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{35,44})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["twitter"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "adobe-client-id"
|
id = "adobe-client-id"
|
||||||
description = "Adobe Client ID (Oauth Web)"
|
description = "Adobe Client ID (Oauth Web)"
|
||||||
regex = '''(?i)(adobe[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
|
regex = '''(?i)(adobe[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["adobe"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "adobe-client-secret"
|
id = "adobe-client-secret"
|
||||||
description = "Adobe Client Secret"
|
description = "Adobe Client Secret"
|
||||||
regex = '''(p8e-)(?i)[a-z0-9]{32}'''
|
regex = '''(p8e-)(?i)[a-z0-9]{32}'''
|
||||||
|
keywords = ["p8e-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "alibaba-access-key-id"
|
id = "alibaba-access-key-id"
|
||||||
description = "Alibaba AccessKey ID"
|
description = "Alibaba AccessKey ID"
|
||||||
regex = '''(LTAI)(?i)[a-z0-9]{20}'''
|
regex = '''(LTAI)(?i)[a-z0-9]{20}'''
|
||||||
|
keywords = ["LTAI"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "alibaba-secret-key"
|
id = "alibaba-secret-key"
|
||||||
description = "Alibaba Secret Key"
|
description = "Alibaba Secret Key"
|
||||||
regex = '''(?i)(alibaba[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{30})['\"]'''
|
regex = '''(?i)(alibaba[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{30})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["alibaba"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "asana-client-id"
|
id = "asana-client-id"
|
||||||
description = "Asana Client ID"
|
description = "Asana Client ID"
|
||||||
regex = '''(?i)(asana[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9]{16})['\"]'''
|
regex = '''(?i)(asana[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9]{16})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["asana"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "asana-client-secret"
|
id = "asana-client-secret"
|
||||||
description = "Asana Client Secret"
|
description = "Asana Client Secret"
|
||||||
regex = '''(?i)(asana[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{32})['\"]'''
|
regex = '''(?i)(asana[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["asana"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "atlassian-api-token"
|
id = "atlassian-api-token"
|
||||||
description = "Atlassian API token"
|
description = "Atlassian API token"
|
||||||
regex = '''(?i)(atlassian[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{24})['\"]'''
|
regex = '''(?i)(atlassian[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{24})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["atlassian"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "bitbucket-client-id"
|
id = "bitbucket-client-id"
|
||||||
description = "Bitbucket client ID"
|
description = "Bitbucket client ID"
|
||||||
regex = '''(?i)(bitbucket[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{32})['\"]'''
|
regex = '''(?i)(bitbucket[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["bitbucket"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "bitbucket-client-secret"
|
id = "bitbucket-client-secret"
|
||||||
description = "Bitbucket client secret"
|
description = "Bitbucket client secret"
|
||||||
regex = '''(?i)(bitbucket[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9_\-]{64})['\"]'''
|
regex = '''(?i)(bitbucket[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9_\-]{64})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["bitbucket"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "beamer-api-token"
|
id = "beamer-api-token"
|
||||||
description = "Beamer API token"
|
description = "Beamer API token"
|
||||||
regex = '''(?i)(beamer[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](b_[a-z0-9=_\-]{44})['\"]'''
|
regex = '''(?i)(beamer[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](b_[a-z0-9=_\-]{44})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["beamer"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "clojars-api-token"
|
id = "clojars-api-token"
|
||||||
description = "Clojars API token"
|
description = "Clojars API token"
|
||||||
regex = '''(CLOJARS_)(?i)[a-z0-9]{60}'''
|
regex = '''(CLOJARS_)(?i)[a-z0-9]{60}'''
|
||||||
|
keywords = ["clojars"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "contentful-delivery-api-token"
|
id = "contentful-delivery-api-token"
|
||||||
description = "Contentful delivery API token"
|
description = "Contentful delivery API token"
|
||||||
regex = '''(?i)(contentful[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9\-=_]{43})['\"]'''
|
regex = '''(?i)(contentful[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9\-=_]{43})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["contentful"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "databricks-api-token"
|
id = "databricks-api-token"
|
||||||
description = "Databricks API token"
|
description = "Databricks API token"
|
||||||
regex = '''dapi[a-h0-9]{32}'''
|
regex = '''dapi[a-h0-9]{32}'''
|
||||||
|
keywords = ["dapi"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "discord-api-token"
|
id = "discord-api-token"
|
||||||
description = "Discord API key"
|
description = "Discord API key"
|
||||||
regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{64})['\"]'''
|
regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{64})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["discord"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "discord-client-id"
|
id = "discord-client-id"
|
||||||
description = "Discord client ID"
|
description = "Discord client ID"
|
||||||
regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9]{18})['\"]'''
|
regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9]{18})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["discord"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "discord-client-secret"
|
id = "discord-client-secret"
|
||||||
description = "Discord client secret"
|
description = "Discord client secret"
|
||||||
regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_\-]{32})['\"]'''
|
regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_\-]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["discord"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "doppler-api-token"
|
id = "doppler-api-token"
|
||||||
description = "Doppler API token"
|
description = "Doppler API token"
|
||||||
regex = '''['\"](dp\.pt\.)(?i)[a-z0-9]{43}['\"]'''
|
regex = '''['\"](dp\.pt\.)(?i)[a-z0-9]{43}['\"]'''
|
||||||
|
keywords = ["doppler"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "dropbox-api-secret"
|
id = "dropbox-api-secret"
|
||||||
description = "Dropbox API secret/key"
|
description = "Dropbox API secret/key"
|
||||||
regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{15})['\"]'''
|
regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{15})['\"]'''
|
||||||
|
keywords = ["dropbox"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "dropbox--api-key"
|
id = "dropbox--api-key"
|
||||||
description = "Dropbox API secret/key"
|
description = "Dropbox API secret/key"
|
||||||
regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{15})['\"]'''
|
regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{15})['\"]'''
|
||||||
|
keywords = ["dropbox"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "dropbox-short-lived-api-token"
|
id = "dropbox-short-lived-api-token"
|
||||||
description = "Dropbox short lived API token"
|
description = "Dropbox short lived API token"
|
||||||
regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](sl\.[a-z0-9\-=_]{135})['\"]'''
|
regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](sl\.[a-z0-9\-=_]{135})['\"]'''
|
||||||
|
keywords = ["dropbox"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "dropbox-long-lived-api-token"
|
id = "dropbox-long-lived-api-token"
|
||||||
description = "Dropbox long lived API token"
|
description = "Dropbox long lived API token"
|
||||||
regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"][a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43}['\"]'''
|
regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"][a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43}['\"]'''
|
||||||
|
keywords = ["dropbox"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "duffel-api-token"
|
id = "duffel-api-token"
|
||||||
description = "Duffel API token"
|
description = "Duffel API token"
|
||||||
regex = '''['\"]duffel_(test|live)_(?i)[a-z0-9_-]{43}['\"]'''
|
regex = '''['\"]duffel_(test|live)_(?i)[a-z0-9_-]{43}['\"]'''
|
||||||
|
keywords = ["duffel"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "dynatrace-api-token"
|
id = "dynatrace-api-token"
|
||||||
description = "Dynatrace API token"
|
description = "Dynatrace API token"
|
||||||
regex = '''['\"]dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}['\"]'''
|
regex = '''['\"]dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}['\"]'''
|
||||||
|
keywords = ["dynatrace"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "easypost-api-token"
|
id = "easypost-api-token"
|
||||||
description = "EasyPost API token"
|
description = "EasyPost API token"
|
||||||
regex = '''['\"]EZAK(?i)[a-z0-9]{54}['\"]'''
|
regex = '''['\"]EZAK(?i)[a-z0-9]{54}['\"]'''
|
||||||
|
keywords = ["EZAK"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "easypost-test-api-token"
|
id = "easypost-test-api-token"
|
||||||
description = "EasyPost test API token"
|
description = "EasyPost test API token"
|
||||||
regex = '''['\"]EZTK(?i)[a-z0-9]{54}['\"]'''
|
regex = '''['\"]EZTK(?i)[a-z0-9]{54}['\"]'''
|
||||||
|
keywords = ["EZTK"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "fastly-api-token"
|
id = "fastly-api-token"
|
||||||
description = "Fastly API token"
|
description = "Fastly API token"
|
||||||
regex = '''(?i)(fastly[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9\-=_]{32})['\"]'''
|
regex = '''(?i)(fastly[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9\-=_]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["fastly"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "finicity-client-secret"
|
id = "finicity-client-secret"
|
||||||
description = "Finicity client secret"
|
description = "Finicity client secret"
|
||||||
regex = '''(?i)(finicity[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{20})['\"]'''
|
regex = '''(?i)(finicity[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{20})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["finicity"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "finicity-api-token"
|
id = "finicity-api-token"
|
||||||
description = "Finicity API token"
|
description = "Finicity API token"
|
||||||
regex = '''(?i)(finicity[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
|
regex = '''(?i)(finicity[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["finicity"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "flutterwave-public-key"
|
id = "flutterwave-public-key"
|
||||||
description = "Flutterwave public key"
|
description = "Flutterwave public key"
|
||||||
regex = '''FLWPUBK_TEST-(?i)[a-h0-9]{32}-X'''
|
regex = '''FLWPUBK_TEST-(?i)[a-h0-9]{32}-X'''
|
||||||
|
keywords = ["FLWPUBK_TEST"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "flutterwave-secret-key"
|
id = "flutterwave-secret-key"
|
||||||
description = "Flutterwave secret key"
|
description = "Flutterwave secret key"
|
||||||
regex = '''FLWSECK_TEST-(?i)[a-h0-9]{32}-X'''
|
regex = '''FLWSECK_TEST-(?i)[a-h0-9]{32}-X'''
|
||||||
|
keywords = ["FLWSECK_TEST"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "flutterwave-enc-key"
|
id = "flutterwave-enc-key"
|
||||||
description = "Flutterwave encrypted key"
|
description = "Flutterwave encrypted key"
|
||||||
regex = '''FLWSECK_TEST[a-h0-9]{12}'''
|
regex = '''FLWSECK_TEST[a-h0-9]{12}'''
|
||||||
|
keywords = ["FLWSECK_TEST"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "frameio-api-token"
|
id = "frameio-api-token"
|
||||||
description = "Frame.io API token"
|
description = "Frame.io API token"
|
||||||
regex = '''fio-u-(?i)[a-z0-9\-_=]{64}'''
|
regex = '''fio-u-(?i)[a-z0-9\-_=]{64}'''
|
||||||
|
keywords = ["fio-u-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "gocardless-api-token"
|
id = "gocardless-api-token"
|
||||||
description = "GoCardless API token"
|
description = "GoCardless API token"
|
||||||
regex = '''['\"]live_(?i)[a-z0-9\-_=]{40}['\"]'''
|
regex = '''['\"]live_(?i)[a-z0-9\-_=]{40}['\"]'''
|
||||||
|
keywords = ["live_"]
|
||||||
[[rules]]
|
|
||||||
id = "grafana-api-token"
|
|
||||||
description = "Grafana API token"
|
|
||||||
regex = '''['\"]eyJrIjoi(?i)[a-z0-9\-_=]{72,92}['\"]'''
|
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "hashicorp-tf-api-token"
|
id = "hashicorp-tf-api-token"
|
||||||
description = "HashiCorp Terraform user/org API token"
|
description = "HashiCorp Terraform user/org API token"
|
||||||
regex = '''['\"](?i)[a-z0-9]{14}\.atlasv1\.[a-z0-9\-_=]{60,70}['\"]'''
|
regex = '''['\"](?i)[a-z0-9]{14}\.atlasv1\.[a-z0-9\-_=]{60,70}['\"]'''
|
||||||
|
keywords = ["atlasv1"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "hubspot-api-token"
|
id = "hubspot-api-token"
|
||||||
description = "HubSpot API token"
|
description = "HubSpot API token"
|
||||||
regex = '''(?i)(hubspot[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
|
regex = '''(?i)(hubspot[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["hubspot"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "intercom-api-token"
|
id = "intercom-api-token"
|
||||||
description = "Intercom API token"
|
description = "Intercom API token"
|
||||||
regex = '''(?i)(intercom[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_]{60})['\"]'''
|
regex = '''(?i)(intercom[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_]{60})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["intercom"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "intercom-client-secret"
|
id = "intercom-client-secret"
|
||||||
description = "Intercom client secret/ID"
|
description = "Intercom client secret/ID"
|
||||||
regex = '''(?i)(intercom[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
|
regex = '''(?i)(intercom[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["intercom"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "ionic-api-token"
|
id = "ionic-api-token"
|
||||||
description = "Ionic API token"
|
description = "Ionic API token"
|
||||||
regex = '''(?i)(ionic[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](ion_[a-z0-9]{42})['\"]'''
|
regex = '''(?i)(ionic[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](ion_[a-z0-9]{42})['\"]'''
|
||||||
|
keywords = ["ionic"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "linear-api-token"
|
id = "linear-api-token"
|
||||||
description = "Linear API token"
|
description = "Linear API token"
|
||||||
regex = '''lin_api_(?i)[a-z0-9]{40}'''
|
regex = '''lin_api_(?i)[a-z0-9]{40}'''
|
||||||
|
keywords = ["lin_api_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "linear-client-secret"
|
id = "linear-client-secret"
|
||||||
description = "Linear client secret/ID"
|
description = "Linear client secret/ID"
|
||||||
regex = '''(?i)(linear[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
|
regex = '''(?i)(linear[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["linear"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "lob-api-key"
|
id = "lob-api-key"
|
||||||
description = "Lob API Key"
|
description = "Lob API Key"
|
||||||
regex = '''(?i)(lob[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]((live|test)_[a-f0-9]{35})['\"]'''
|
regex = '''(?i)(lob[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]((live|test)_[a-f0-9]{35})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["lob"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "lob-pub-api-key"
|
id = "lob-pub-api-key"
|
||||||
description = "Lob Publishable API Key"
|
description = "Lob Publishable API Key"
|
||||||
regex = '''(?i)(lob[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]((test|live)_pub_[a-f0-9]{31})['\"]'''
|
regex = '''(?i)(lob[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]((test|live)_pub_[a-f0-9]{31})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = [
|
||||||
|
"test_pub",
|
||||||
|
"live_pub",
|
||||||
|
"_pub"
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "mailchimp-api-key"
|
id = "mailchimp-api-key"
|
||||||
description = "Mailchimp API key"
|
description = "Mailchimp API key"
|
||||||
regex = '''(?i)(mailchimp[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32}-us20)['\"]'''
|
regex = '''(?i)(mailchimp[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32}-us20)['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["mailchimp"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "mailgun-private-api-token"
|
id = "mailgun-private-api-token"
|
||||||
description = "Mailgun private API token"
|
description = "Mailgun private API token"
|
||||||
regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](key-[a-f0-9]{32})['\"]'''
|
regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](key-[a-f0-9]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = [
|
||||||
|
"mailgun",
|
||||||
|
"key-"
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "mailgun-pub-key"
|
id = "mailgun-pub-key"
|
||||||
description = "Mailgun public validation key"
|
description = "Mailgun public validation key"
|
||||||
regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](pubkey-[a-f0-9]{32})['\"]'''
|
regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](pubkey-[a-f0-9]{32})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = [
|
||||||
|
"mailgun",
|
||||||
|
"pubkey-"
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "mailgun-signing-key"
|
id = "mailgun-signing-key"
|
||||||
description = "Mailgun webhook signing key"
|
description = "Mailgun webhook signing key"
|
||||||
regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})['\"]'''
|
regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["mailgun"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "mapbox-api-token"
|
id = "mapbox-api-token"
|
||||||
description = "Mapbox API token"
|
description = "Mapbox API token"
|
||||||
regex = '''(?i)(pk\.[a-z0-9]{60}\.[a-z0-9]{22})'''
|
regex = '''(?i)(pk\.[a-z0-9]{60}\.[a-z0-9]{22})'''
|
||||||
|
keywords = ["mapbox"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "messagebird-api-token"
|
id = "messagebird-api-token"
|
||||||
description = "MessageBird API token"
|
description = "MessageBird API token"
|
||||||
regex = '''(?i)(messagebird[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{25})['\"]'''
|
regex = '''(?i)(messagebird[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{25})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = [
|
||||||
|
"messagebird",
|
||||||
|
"message_bird",
|
||||||
|
"message-bird"
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "messagebird-client-id"
|
id = "messagebird-client-id"
|
||||||
description = "MessageBird API client ID"
|
description = "MessageBird API client ID"
|
||||||
regex = '''(?i)(messagebird[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
|
regex = '''(?i)(messagebird[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = [
|
||||||
|
"messagebird",
|
||||||
|
"message_bird",
|
||||||
|
"message-bird"
|
||||||
|
]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "new-relic-user-api-key"
|
id = "new-relic-user-api-key"
|
||||||
description = "New Relic user API Key"
|
description = "New Relic user API Key"
|
||||||
regex = '''['\"](NRAK-[A-Z0-9]{27})['\"]'''
|
regex = '''['\"](NRAK-[A-Z0-9]{27})['\"]'''
|
||||||
|
keywords = ["NRAK-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "new-relic-user-api-id"
|
id = "new-relic-user-api-id"
|
||||||
description = "New Relic user API ID"
|
description = "New Relic user API ID"
|
||||||
regex = '''(?i)(newrelic[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([A-Z0-9]{64})['\"]'''
|
regex = '''(?i)(newrelic[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([A-Z0-9]{64})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["newrelic"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "new-relic-browser-api-token"
|
id = "new-relic-browser-api-token"
|
||||||
description = "New Relic ingest browser API token"
|
description = "New Relic ingest browser API token"
|
||||||
regex = '''['\"](NRJS-[a-f0-9]{19})['\"]'''
|
regex = '''['\"](NRJS-[a-f0-9]{19})['\"]'''
|
||||||
|
keywords = ["NRJS-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "npm-access-token"
|
id = "npm-access-token"
|
||||||
description = "npm access token"
|
description = "npm access token"
|
||||||
regex = '''['\"](npm_(?i)[a-z0-9]{36})['\"]'''
|
regex = '''['\"](npm_(?i)[a-z0-9]{36})['\"]'''
|
||||||
|
keywords = ["npm_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "planetscale-password"
|
id = "planetscale-password"
|
||||||
description = "PlanetScale password"
|
description = "PlanetScale password"
|
||||||
regex = '''pscale_pw_(?i)[a-z0-9\-_\.]{43}'''
|
regex = '''pscale_pw_(?i)[a-z0-9\-_\.]{43}'''
|
||||||
|
keywords = ["pscale_pw_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "planetscale-api-token"
|
id = "planetscale-api-token"
|
||||||
description = "PlanetScale API token"
|
description = "PlanetScale API token"
|
||||||
regex = '''pscale_tkn_(?i)[a-z0-9\-_\.]{43}'''
|
regex = '''pscale_tkn_(?i)[a-z0-9\-_\.]{43}'''
|
||||||
|
keywords = ["pscale_tkn_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "postman-api-token"
|
id = "postman-api-token"
|
||||||
description = "Postman API token"
|
description = "Postman API token"
|
||||||
regex = '''PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34}'''
|
regex = '''PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34}'''
|
||||||
|
keywords = ["PMAK-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "pulumi-api-token"
|
id = "pulumi-api-token"
|
||||||
description = "Pulumi API token"
|
description = "Pulumi API token"
|
||||||
regex = '''pul-[a-f0-9]{40}'''
|
regex = '''pul-[a-f0-9]{40}'''
|
||||||
|
keywords = ["pul-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "rubygems-api-token"
|
id = "rubygems-api-token"
|
||||||
description = "Rubygem API token"
|
description = "Rubygem API token"
|
||||||
regex = '''rubygems_[a-f0-9]{48}'''
|
regex = '''rubygems_[a-f0-9]{48}'''
|
||||||
|
keywords = ["rubygems_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "sendgrid-api-token"
|
id = "sendgrid-api-token"
|
||||||
description = "SendGrid API token"
|
description = "SendGrid API token"
|
||||||
regex = '''SG\.(?i)[a-z0-9_\-\.]{66}'''
|
regex = '''SG\.(?i)[a-z0-9_\-\.]{66}'''
|
||||||
|
keywords = ["sendgrid"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "sendinblue-api-token"
|
id = "sendinblue-api-token"
|
||||||
description = "Sendinblue API token"
|
description = "Sendinblue API token"
|
||||||
regex = '''xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16}'''
|
regex = '''xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16}'''
|
||||||
|
keywords = ["xkeysib-"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "shippo-api-token"
|
id = "shippo-api-token"
|
||||||
description = "Shippo API token"
|
description = "Shippo API token"
|
||||||
regex = '''shippo_(live|test)_[a-f0-9]{40}'''
|
regex = '''shippo_(live|test)_[a-f0-9]{40}'''
|
||||||
|
keywords = ["shippo_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "linkedin-client-secret"
|
id = "linkedin-client-secret"
|
||||||
description = "LinkedIn Client secret"
|
description = "LinkedIn Client secret"
|
||||||
regex = '''(?i)(linkedin[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z]{16})['\"]'''
|
regex = '''(?i)(linkedin[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z]{16})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["linkedin"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "linkedin-client-id"
|
id = "linkedin-client-id"
|
||||||
description = "LinkedIn Client ID"
|
description = "LinkedIn Client ID"
|
||||||
regex = '''(?i)(linkedin[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{14})['\"]'''
|
regex = '''(?i)(linkedin[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{14})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["linkedin"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "twitch-api-token"
|
id = "twitch-api-token"
|
||||||
description = "Twitch API token"
|
description = "Twitch API token"
|
||||||
regex = '''(?i)(twitch[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{30})['\"]'''
|
regex = '''(?i)(twitch[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{30})['\"]'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["twitch"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "typeform-api-token"
|
id = "typeform-api-token"
|
||||||
description = "Typeform API token"
|
description = "Typeform API token"
|
||||||
regex = '''(?i)(typeform[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}(tfp_[a-z0-9\-_\.=]{59})'''
|
regex = '''(?i)(typeform[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}(tfp_[a-z0-9\-_\.=]{59})'''
|
||||||
secretGroup = 3
|
secretGroup = 3
|
||||||
|
keywords = ["tpf_"]
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "generic-api-key"
|
id = "generic-api-key"
|
||||||
description = "Generic API Key"
|
description = "Generic API Key"
|
||||||
regex = '''(?i)((key|api[^Version]|token|secret|password)[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9a-zA-Z\-_=]{8,64})['\"]'''
|
regex = '''(?i)((key|api[^Version]|token|secret|password|auth)[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9a-zA-Z\-_=]{8,64})['\"]'''
|
||||||
entropy = 3.7
|
entropy = 3.7
|
||||||
secretGroup = 4
|
secretGroup = 4
|
||||||
|
keywords = [
|
||||||
|
"key",
|
||||||
|
"api",
|
||||||
|
"token",
|
||||||
|
"secret",
|
||||||
|
"password",
|
||||||
|
"auth",
|
||||||
|
]
|
||||||
|
|
||||||
[allowlist]
|
[allowlist]
|
||||||
description = "global allow lists"
|
description = "global allow lists"
|
||||||
regexes = [
|
regexes = [
|
||||||
'''219-09-9999''',
|
'''219-09-9999''',
|
||||||
'''078-05-1120''',
|
'''078-05-1120''',
|
||||||
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
|
'''(9[0-9]{2}|666)-\d{2}-\d{4}''',
|
||||||
'''process''',
|
|
||||||
'''getenv''',
|
|
||||||
'''\.env''',
|
|
||||||
'''env\(''',
|
|
||||||
'''env\.''',
|
|
||||||
'''setting''',
|
|
||||||
'''load''',
|
|
||||||
'''token''',
|
|
||||||
'''password''',
|
|
||||||
'''secret''',
|
|
||||||
'''api\_key''',
|
|
||||||
'''apikey''',
|
|
||||||
'''api\-key''',
|
|
||||||
]
|
]
|
||||||
paths = [
|
paths = [
|
||||||
'''gitleaks.toml''',
|
'''gitleaks.toml''',
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ type Rule struct {
|
|||||||
// and reporting purposes.
|
// and reporting purposes.
|
||||||
Tags []string
|
Tags []string
|
||||||
|
|
||||||
|
// Keywords are used for pre-regex check filtering. Rules that contain
|
||||||
|
// keywords will perform a quick string compare check to make sure the
|
||||||
|
// keyword(s) are in the content being scanned.
|
||||||
|
Keywords []string
|
||||||
|
|
||||||
// Allowlist allows a rule to be ignored for specific
|
// Allowlist allows a rule to be ignored for specific
|
||||||
// regexes, paths, and/or commits
|
// regexes, paths, and/or commits
|
||||||
Allowlist Allowlist
|
Allowlist Allowlist
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import (
|
|||||||
|
|
||||||
"github.com/fatih/semgroup"
|
"github.com/fatih/semgroup"
|
||||||
"github.com/gitleaks/go-gitdiff/gitdiff"
|
"github.com/gitleaks/go-gitdiff/gitdiff"
|
||||||
|
"github.com/h2non/filetype"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
@@ -148,6 +149,22 @@ func (d *Detector) detectRule(fragment Fragment, rule *config.Rule) []report.Fin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if path only rule, skip content checks
|
||||||
|
if rule.Regex == nil {
|
||||||
|
return findings
|
||||||
|
}
|
||||||
|
|
||||||
|
containsKeyword := false
|
||||||
|
for _, k := range rule.Keywords {
|
||||||
|
if strings.Contains(fragment.Raw, k) {
|
||||||
|
containsKeyword = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !containsKeyword && len(rule.Keywords) != 0 {
|
||||||
|
return findings
|
||||||
|
}
|
||||||
|
|
||||||
matchIndices := rule.Regex.FindAllStringIndex(fragment.Raw, -1)
|
matchIndices := rule.Regex.FindAllStringIndex(fragment.Raw, -1)
|
||||||
for _, matchIndex := range matchIndices {
|
for _, matchIndex := range matchIndices {
|
||||||
// extract secret from match
|
// extract secret from match
|
||||||
@@ -322,6 +339,15 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mimetype, err := filetype.Match(b)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if mimetype.MIME.Type == "application" {
|
||||||
|
return nil // skip binary files
|
||||||
|
}
|
||||||
|
|
||||||
fragment := Fragment{
|
fragment := Fragment{
|
||||||
Raw: string(b),
|
Raw: string(b),
|
||||||
FilePath: p,
|
FilePath: p,
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ func TestDetect(t *testing.T) {
|
|||||||
File: "tmp.go",
|
File: "tmp.go",
|
||||||
RuleID: "pypi-upload-token",
|
RuleID: "pypi-upload-token",
|
||||||
Tags: []string{"key", "pypi"},
|
Tags: []string{"key", "pypi"},
|
||||||
StartLine: 0,
|
StartLine: 1,
|
||||||
EndLine: 0,
|
EndLine: 1,
|
||||||
StartColumn: 1,
|
StartColumn: 1,
|
||||||
EndColumn: 86,
|
EndColumn: 86,
|
||||||
Entropy: 1.9606875,
|
Entropy: 1.9606875,
|
||||||
@@ -106,8 +106,8 @@ func TestDetect(t *testing.T) {
|
|||||||
File: "tmp.go",
|
File: "tmp.go",
|
||||||
RuleID: "aws-access-key",
|
RuleID: "aws-access-key",
|
||||||
Tags: []string{"key", "AWS"},
|
Tags: []string{"key", "AWS"},
|
||||||
StartLine: 0,
|
StartLine: 1,
|
||||||
EndLine: 0,
|
EndLine: 1,
|
||||||
StartColumn: 15,
|
StartColumn: 15,
|
||||||
EndColumn: 34,
|
EndColumn: 34,
|
||||||
Entropy: 3.0841837,
|
Entropy: 3.0841837,
|
||||||
@@ -154,8 +154,8 @@ func TestDetect(t *testing.T) {
|
|||||||
RuleID: "discord-api-key",
|
RuleID: "discord-api-key",
|
||||||
Tags: []string{},
|
Tags: []string{},
|
||||||
Entropy: 3.7906237,
|
Entropy: 3.7906237,
|
||||||
StartLine: 0,
|
StartLine: 1,
|
||||||
EndLine: 0,
|
EndLine: 1,
|
||||||
StartColumn: 7,
|
StartColumn: 7,
|
||||||
EndColumn: 93,
|
EndColumn: 93,
|
||||||
},
|
},
|
||||||
@@ -184,8 +184,8 @@ func TestDetect(t *testing.T) {
|
|||||||
RuleID: "generic-api-key",
|
RuleID: "generic-api-key",
|
||||||
Tags: []string{},
|
Tags: []string{},
|
||||||
Entropy: 3.7906237,
|
Entropy: 3.7906237,
|
||||||
StartLine: 0,
|
StartLine: 1,
|
||||||
EndLine: 0,
|
EndLine: 1,
|
||||||
StartColumn: 22,
|
StartColumn: 22,
|
||||||
EndColumn: 93,
|
EndColumn: 93,
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-3
@@ -22,7 +22,6 @@ func location(fragment Fragment, matchIndex []int) Location {
|
|||||||
end := matchIndex[1]
|
end := matchIndex[1]
|
||||||
|
|
||||||
for lineNum, pair := range fragment.newlineIndices {
|
for lineNum, pair := range fragment.newlineIndices {
|
||||||
_lineNum = lineNum
|
|
||||||
newLineByteIndex := pair[0]
|
newLineByteIndex := pair[0]
|
||||||
if prevNewLine <= start && start < newLineByteIndex {
|
if prevNewLine <= start && start < newLineByteIndex {
|
||||||
lineSet = true
|
lineSet = true
|
||||||
@@ -46,8 +45,8 @@ func location(fragment Fragment, matchIndex []int) Location {
|
|||||||
// a newline
|
// a newline
|
||||||
location.startColumn = (start - prevNewLine) + 1 // +1 because counting starts at 1
|
location.startColumn = (start - prevNewLine) + 1 // +1 because counting starts at 1
|
||||||
location.endColumn = (end - prevNewLine)
|
location.endColumn = (end - prevNewLine)
|
||||||
location.startLine = _lineNum
|
location.startLine = _lineNum + 1
|
||||||
location.endLine = _lineNum
|
location.endLine = _lineNum + 1
|
||||||
location.startLineIndex = start
|
location.startLineIndex = start
|
||||||
|
|
||||||
// search for new line byte index
|
// search for new line byte index
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ require (
|
|||||||
require (
|
require (
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
||||||
|
github.com/h2non/filetype v1.1.3 // indirect
|
||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||||
github.com/magiconair/properties v1.8.5 // indirect
|
github.com/magiconair/properties v1.8.5 // indirect
|
||||||
|
|||||||
@@ -143,6 +143,8 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m
|
|||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||||
|
github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg=
|
||||||
|
github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY=
|
||||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
||||||
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
|
|||||||
Reference in new issue
Block a user