mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
stricter ionic regex for less fps (#757)
This commit is contained in:
1 parent
3d3d801729
commit
36779df3bb
1 file changed
+19
-19
+19
-19
@@ -2,33 +2,33 @@ title = "gitleaks config"
|
|||||||
|
|
||||||
# Gitleaks rules are defined by regular expressions and entropy ranges.
|
# Gitleaks rules are defined by regular expressions and entropy ranges.
|
||||||
# Some secrets have unique signatures which make detecting those secrets easy.
|
# 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.
|
# 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.
|
# 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
|
# 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.
|
# that what we are matching is a secret.
|
||||||
#
|
#
|
||||||
# Here is an example of a semi-generic secret
|
# Here is an example of a semi-generic secret
|
||||||
#
|
#
|
||||||
# discord_client_secret = "8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"
|
# discord_client_secret = "8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"
|
||||||
#
|
#
|
||||||
# We can write a regular expression to capture the variable name (identifier),
|
# We can write a regular expression to capture the variable name (identifier),
|
||||||
# the assignment symbol (like '=' or ':='), and finally the actual secret.
|
# the assignment symbol (like '=' or ':='), and finally the actual secret.
|
||||||
# The structure of a rule to match this example secret is below:
|
# The structure of a rule to match this example secret is below:
|
||||||
#
|
#
|
||||||
# Beginning string
|
# Beginning string
|
||||||
# quotation
|
# quotation
|
||||||
# │ End string quotation
|
# │ End string quotation
|
||||||
# │ │
|
# │ │
|
||||||
# ▼ ▼
|
# ▼ ▼
|
||||||
# (?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_\-]{32})['\"]
|
# (?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_\-]{32})['\"]
|
||||||
#
|
#
|
||||||
# ▲ ▲ ▲
|
# ▲ ▲ ▲
|
||||||
# │ │ │
|
# │ │ │
|
||||||
# │ │ │
|
# │ │ │
|
||||||
# identifier assignment symbol
|
# identifier assignment symbol
|
||||||
# Secret
|
# Secret
|
||||||
#
|
#
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "gitlab-pat"
|
id = "gitlab-pat"
|
||||||
description = "GitLab Personal Access Token"
|
description = "GitLab Personal Access Token"
|
||||||
@@ -381,7 +381,7 @@ secretGroup = 3
|
|||||||
[[rules]]
|
[[rules]]
|
||||||
id = "ionic-api-token"
|
id = "ionic-api-token"
|
||||||
description = "Ionic API token"
|
description = "Ionic API token"
|
||||||
regex = '''ion_(?i)[a-z0-9]{42}'''
|
regex = '''(?i)(ionic[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](ion_[a-z0-9]{42})['\"]'''
|
||||||
|
|
||||||
[[rules]]
|
[[rules]]
|
||||||
id = "linear-api-token"
|
id = "linear-api-token"
|
||||||
|
|||||||
Reference in new issue
Block a user