diff --git a/cmd/generate/config/base/config.go b/cmd/generate/config/base/config.go new file mode 100644 index 00000000..97d0197a --- /dev/null +++ b/cmd/generate/config/base/config.go @@ -0,0 +1,69 @@ +package base + +import ( + "github.com/zricethezav/gitleaks/v8/config" + "regexp" +) + +func CreateGlobalConfig() config.Config { + return config.Config{ + Title: "gitleaks config", + Allowlist: config.Allowlist{ + Description: "global allow lists", + Paths: []*regexp.Regexp{ + regexp.MustCompile(`^gitleaks\.toml$`), + + // Images + regexp.MustCompile(`(?i)\.(bmp|gif|jpe?g|svg|tiff?)$`), + regexp.MustCompile(`(.*?)(doc|docx|zip|xls|pdf|bin|socket|vsidx|v2|suo|wsuo|.dll|pdb|exe|gltf)$`), + + // ----------- Golang files ----------- + regexp.MustCompile(`go\.(mod|sum|work(\.sum)?)$`), + regexp.MustCompile(`(^|/)vendor/modules\.txt$`), + regexp.MustCompile(`(^|/)vendor/(github\.com|golang\.org/x|google\.golang\.org|gopkg\.in|istio\.io|k8s\.io|sigs\.k8s\.io)/.*$`), + + // ----------- Java files ----------- + // Gradle + regexp.MustCompile(`(^|/)gradlew(\.bat)?$`), + regexp.MustCompile(`(^|/)gradle\.lockfile$`), + regexp.MustCompile(`(^|/)mvnw(\.cmd)?$`), + regexp.MustCompile(`(^|/)\.mvn/wrapper/MavenWrapperDownloader\.java$`), + + // ----------- Node.js files ----------- + // Dependencies and lock files. + regexp.MustCompile(`(^|/)node_modules/.*?$`), + regexp.MustCompile(`(^|/)package-lock\.json$`), + regexp.MustCompile(`(^|/)yarn\.lock$`), + regexp.MustCompile(`(^|/)pnpm-lock\.yaml$`), + regexp.MustCompile(`(^|/)npm-shrinkwrap\.json$`), + regexp.MustCompile(`(^|/)bower_components/.*?$`), + + // ----------- Python files ----------- + // Dependencies and lock files. + regexp.MustCompile(`(^|/)Pipfile\.lock$`), + regexp.MustCompile(`(^|/)poetry\.lock$`), + // Virtual environments + // env/lib/python3.7/site-packages/urllib3/util/url.py + regexp.MustCompile(`(?i)/?(v?env|virtualenv)/lib/.+$`), + // /python/3.7.4/Lib/site-packages/dask/bytes/tests/test_bytes_utils.py + // python/3.7.4/Lib/site-packages/fsspec/utils.py + // python/2.7.16.32/Lib/bsddb/test/test_dbenv.py + regexp.MustCompile(`(?i)/?python/[23](\.\d{1,2})+/lib/.+$`), + // python/lib/python3.8/site-packages/boto3/data/ec2/2016-04-01/resources-1.json + // python/lib/python3.8/site-packages/botocore/data/alexaforbusiness/2017-11-09/service-2.json + regexp.MustCompile(`(?i)/?python/lib/python[23](\.\d{1,2})+/.+$`), + // dist-info directory (https://py-pkgs.org/04-package-structure.html#building-sdists-and-wheels) + regexp.MustCompile(`(?i)(^|/)[a-z0-9_.]+-[0-9.]+\.dist-info/.+$`), + + // ----------- Ruby files ----------- + regexp.MustCompile(`(^|/)vendor/(bundle|ruby)/.*?$`), + regexp.MustCompile(`\.gem$`), // tar archive + + // Misc + regexp.MustCompile(`verification-metadata.xml`), + regexp.MustCompile(`Database.refactorlog`), + //regexp.MustCompile(`vendor`), + }, + }, + } +} diff --git a/cmd/generate/config/main.go b/cmd/generate/config/main.go index 75b0ec69..86d7011a 100644 --- a/cmd/generate/config/main.go +++ b/cmd/generate/config/main.go @@ -1,6 +1,7 @@ package main import ( + "github.com/zricethezav/gitleaks/v8/cmd/generate/config/base" "os" "text/template" @@ -228,7 +229,9 @@ func main() { log.Fatal().Err(err).Msg("Failed to create rules.toml") } - if err = tmpl.Execute(f, config.Config{Rules: ruleLookUp}); err != nil { + cfg := base.CreateGlobalConfig() + cfg.Rules = ruleLookUp + if err = tmpl.Execute(f, cfg); err != nil { log.Fatal().Err(err).Msg("could not execute template") } diff --git a/cmd/generate/config/rules/config.tmpl b/cmd/generate/config/rules/config.tmpl index 99550528..5c2da979 100644 --- a/cmd/generate/config/rules/config.tmpl +++ b/cmd/generate/config/rules/config.tmpl @@ -8,24 +8,20 @@ # Rules instruct gitleaks on what should be considered a secret. # Allowlists instruct gitleaks on what is allowed, i.e. not a secret. -title = "gitleaks config" +title = "{{.Title}}" [allowlist] -description = "global allow lists" -paths = [ - '''gitleaks.toml''', - '''(.*?)(jpg|gif|doc|docx|zip|xls|pdf|bin|svg|socket|vsidx|v2|suo|wsuo|.dll|pdb|exe|gltf)$''', - '''(go.mod|go.sum|go.work|go.work.sum)$''', - '''gradle.lockfile''', - '''verification-metadata.xml''', - '''node_modules''', - '''package-lock.json''', - '''yarn.lock''', - '''pnpm-lock.yaml''', - '''poetry.lock''', - '''Database.refactorlog''', - '''vendor''', -] +description = "{{.Allowlist.Description}}" +{{- with .Allowlist.RegexTarget }} +regexTarget = "{{ . }}"{{ end -}} +{{- with .Allowlist.Regexes }} +regexes = [ + {{ range $i, $regex := . }}'''{{ $regex }}''',{{ end }} +]{{ end }} +{{- with .Allowlist.Paths }} +paths = [{{ range $i, $path := . }} + '''{{ $path }}''',{{ end }} +]{{ end }} {{ range $i, $rule := .Rules }}[[rules]] id = "{{$rule.RuleID}}" @@ -38,9 +34,11 @@ secretGroup = {{ . }}{{ end -}} {{- with $rule.Entropy }} entropy = {{ . }}{{ end -}} {{- with $rule.Keywords }} -keywords = [ - {{ range $j, $keyword := . }}"{{ $keyword }}",{{ end }} -]{{ end }} +{{- if gt (len .) 1}} +keywords = [{{ range $j, $keyword := . }} + "{{ $keyword }}",{{ end }} +]{{else}} +keywords = [{{ range $j, $keyword := . }}"{{ $keyword }}"{{ end }}]{{end}}{{ end }} {{- with $rule.Tags }} tags = [ {{ range $j, $tag := . }}"{{ $tag }}",{{ end }} diff --git a/cmd/generate/config/utils/validate.go b/cmd/generate/config/utils/validate.go index 2d093545..5104eaa3 100644 --- a/cmd/generate/config/utils/validate.go +++ b/cmd/generate/config/utils/validate.go @@ -6,6 +6,7 @@ package utils import ( "github.com/rs/zerolog/log" + "github.com/zricethezav/gitleaks/v8/cmd/generate/config/base" "github.com/zricethezav/gitleaks/v8/config" "github.com/zricethezav/gitleaks/v8/detect" "strings" @@ -82,8 +83,8 @@ func createSingleRuleDetector(r *config.Rule) *detect.Detector { rules := map[string]config.Rule{ r.RuleID: *r, } - return detect.NewDetector(config.Config{ - Rules: rules, - Keywords: uniqueKeywords, - }) + cfg := base.CreateGlobalConfig() + cfg.Rules = rules + cfg.Keywords = uniqueKeywords + return detect.NewDetector(cfg) } diff --git a/config/config.go b/config/config.go index 140b5e3c..6b4e286b 100644 --- a/config/config.go +++ b/config/config.go @@ -54,6 +54,7 @@ type ViperConfig struct { // Config is a configuration struct that contains rules and an allowlist if present. type Config struct { + Title string Extend Extend Path string Description string diff --git a/config/gitleaks.toml b/config/gitleaks.toml index 3a3465f1..c1484d35 100644 --- a/config/gitleaks.toml +++ b/config/gitleaks.toml @@ -13,106 +13,102 @@ title = "gitleaks config" [allowlist] description = "global allow lists" paths = [ - '''gitleaks.toml''', - '''(.*?)(jpg|gif|doc|docx|zip|xls|pdf|bin|svg|socket|vsidx|v2|suo|wsuo|.dll|pdb|exe|gltf)$''', - '''(go.mod|go.sum|go.work|go.work.sum)$''', - '''gradle.lockfile''', + '''^gitleaks\.toml$''', + '''(?i)\.(bmp|gif|jpe?g|svg|tiff?)$''', + '''(.*?)(doc|docx|zip|xls|pdf|bin|socket|vsidx|v2|suo|wsuo|.dll|pdb|exe|gltf)$''', + '''go\.(mod|sum|work(\.sum)?)$''', + '''(^|/)vendor/modules\.txt$''', + '''(^|/)vendor/(github\.com|golang\.org/x|google\.golang\.org|gopkg\.in|istio\.io|k8s\.io|sigs\.k8s\.io)/.*$''', + '''(^|/)gradlew(\.bat)?$''', + '''(^|/)gradle\.lockfile$''', + '''(^|/)mvnw(\.cmd)?$''', + '''(^|/)\.mvn/wrapper/MavenWrapperDownloader\.java$''', + '''(^|/)node_modules/.*?$''', + '''(^|/)package-lock\.json$''', + '''(^|/)yarn\.lock$''', + '''(^|/)pnpm-lock\.yaml$''', + '''(^|/)npm-shrinkwrap\.json$''', + '''(^|/)bower_components/.*?$''', + '''(^|/)Pipfile\.lock$''', + '''(^|/)poetry\.lock$''', + '''(?i)/?(v?env|virtualenv)/lib/.+$''', + '''(?i)/?python/[23](\.\d{1,2})+/lib/.+$''', + '''(?i)/?python/lib/python[23](\.\d{1,2})+/.+$''', + '''(?i)(^|/)[a-z0-9_.]+-[0-9.]+\.dist-info/.+$''', + '''(^|/)vendor/(bundle|ruby)/.*?$''', + '''\.gem$''', '''verification-metadata.xml''', - '''node_modules''', - '''package-lock.json''', - '''yarn.lock''', - '''pnpm-lock.yaml''', - '''poetry.lock''', '''Database.refactorlog''', - '''vendor''', ] [[rules]] id = "adafruit-api-key" description = "Identified a potential Adafruit API Key, which could lead to unauthorized access to Adafruit services and sensitive data exposure." regex = '''(?i)(?:adafruit)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "adafruit", -] +keywords = ["adafruit"] [[rules]] 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." regex = '''(?i)(?:adobe)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "adobe", -] +keywords = ["adobe"] [[rules]] id = "adobe-client-secret" 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|;]|$)''' -keywords = [ - "p8e-", -] +keywords = ["p8e-"] [[rules]] id = "age-secret-key" description = "Discovered a potential Age encryption tool secret key, risking data decryption and unauthorized access to sensitive information." regex = '''AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}''' -keywords = [ - "age-secret-key-1", -] +keywords = ["age-secret-key-1"] [[rules]] id = "airtable-api-key" description = "Uncovered a possible Airtable API Key, potentially compromising database access and leading to data leakage or alteration." regex = '''(?i)(?:airtable)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{17})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "airtable", -] +keywords = ["airtable"] [[rules]] id = "algolia-api-key" description = "Identified an Algolia API Key, which could result in unauthorized search operations and data exposure on Algolia-managed platforms." regex = '''(?i)(?:algolia)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "algolia", -] +keywords = ["algolia"] [[rules]] id = "alibaba-access-key-id" 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|;]|$)''' -keywords = [ - "ltai", -] +keywords = ["ltai"] [[rules]] id = "alibaba-secret-key" description = "Discovered a potential Alibaba Cloud Secret Key, potentially allowing unauthorized operations and data access within Alibaba Cloud." regex = '''(?i)(?:alibaba)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "alibaba", -] +keywords = ["alibaba"] [[rules]] id = "asana-client-id" description = "Discovered a potential Asana Client ID, risking unauthorized access to Asana projects and sensitive task information." regex = '''(?i)(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "asana", -] +keywords = ["asana"] [[rules]] id = "asana-client-secret" description = "Identified an Asana Client Secret, which could lead to compromised project management integrity and unauthorized access." regex = '''(?i)(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "asana", -] +keywords = ["asana"] [[rules]] id = "atlassian-api-token" description = "Detected an Atlassian API token, posing a threat to project management and collaboration tool security and data confidentiality." regex = '''(?i)(?:atlassian|confluence|jira)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "atlassian","confluence","jira", + "atlassian", + "confluence", + "jira", ] [[rules]] @@ -120,7 +116,10 @@ id = "authress-service-client-access-key" 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|;]|$)''' keywords = [ - "sc_","ext_","scauth_","authress_", + "sc_", + "ext_", + "scauth_", + "authress_", ] [[rules]] @@ -128,273 +127,213 @@ id = "aws-access-token" description = "Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms." regex = '''(?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z0-9]{16}''' keywords = [ - "akia","asia","abia","acca", + "akia", + "asia", + "abia", + "acca", ] [[rules]] id = "beamer-api-token" description = "Detected a Beamer API token, potentially compromising content management and exposing sensitive notifications and updates." regex = '''(?i)(?:beamer)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(b_[a-z0-9=_\-]{44})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "beamer", -] +keywords = ["beamer"] [[rules]] id = "bitbucket-client-id" description = "Discovered a potential Bitbucket Client ID, risking unauthorized repository access and potential codebase exposure." regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "bitbucket", -] +keywords = ["bitbucket"] [[rules]] id = "bitbucket-client-secret" description = "Discovered a potential Bitbucket Client Secret, posing a risk of compromised code repositories and unauthorized access." regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "bitbucket", -] +keywords = ["bitbucket"] [[rules]] id = "bittrex-access-key" description = "Identified a Bittrex Access Key, which could lead to unauthorized access to cryptocurrency trading accounts and financial loss." regex = '''(?i)(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "bittrex", -] +keywords = ["bittrex"] [[rules]] id = "bittrex-secret-key" description = "Detected a Bittrex Secret Key, potentially compromising cryptocurrency transactions and financial security." regex = '''(?i)(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "bittrex", -] +keywords = ["bittrex"] [[rules]] id = "clojars-api-token" description = "Uncovered a possible Clojars API token, risking unauthorized access to Clojure libraries and potential code manipulation." regex = '''(?i)CLOJARS_[a-z0-9]{60}''' -keywords = [ - "clojars", -] +keywords = ["clojars"] [[rules]] id = "cloudflare-api-key" description = "Detected a Cloudflare API Key, potentially compromising cloud application deployments and operational security." regex = '''(?i)(?:cloudflare)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "cloudflare", -] +keywords = ["cloudflare"] [[rules]] id = "cloudflare-global-api-key" description = "Detected a Cloudflare Global API Key, potentially compromising cloud application deployments and operational security." regex = '''(?i)(?:cloudflare)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{37})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "cloudflare", -] +keywords = ["cloudflare"] [[rules]] id = "cloudflare-origin-ca-key" 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|;]|$)''' keywords = [ - "cloudflare","v1.0-", + "cloudflare", + "v1.0-", ] [[rules]] id = "codecov-access-token" description = "Found a pattern resembling a Codecov Access Token, posing a risk of unauthorized access to code coverage reports and sensitive data." regex = '''(?i)(?:codecov)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "codecov", -] +keywords = ["codecov"] [[rules]] id = "coinbase-access-token" description = "Detected a Coinbase Access Token, posing a risk of unauthorized access to cryptocurrency accounts and financial transactions." regex = '''(?i)(?:coinbase)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "coinbase", -] +keywords = ["coinbase"] [[rules]] id = "confluent-access-token" description = "Identified a Confluent Access Token, which could compromise access to streaming data platforms and sensitive data flow." regex = '''(?i)(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "confluent", -] +keywords = ["confluent"] [[rules]] id = "confluent-secret-key" description = "Found a Confluent Secret Key, potentially risking unauthorized operations and data access within Confluent services." regex = '''(?i)(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "confluent", -] +keywords = ["confluent"] [[rules]] id = "contentful-delivery-api-token" description = "Discovered a Contentful delivery API token, posing a risk to content management systems and data integrity." regex = '''(?i)(?:contentful)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "contentful", -] +keywords = ["contentful"] [[rules]] id = "databricks-api-token" 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|;]|$)''' -keywords = [ - "dapi", -] +keywords = ["dapi"] [[rules]] id = "datadog-access-token" description = "Detected a Datadog Access Token, potentially risking monitoring and analytics data exposure and manipulation." regex = '''(?i)(?:datadog)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "datadog", -] +keywords = ["datadog"] [[rules]] id = "defined-networking-api-token" description = "Identified a Defined Networking API token, which could lead to unauthorized network operations and data breaches." regex = '''(?i)(?:dnkey)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(dnkey-[a-z0-9=_\-]{26}-[a-z0-9=_\-]{52})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "dnkey", -] +keywords = ["dnkey"] [[rules]] id = "digitalocean-access-token" 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|;]|$)''' -keywords = [ - "doo_v1_", -] +keywords = ["doo_v1_"] [[rules]] id = "digitalocean-pat" 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|;]|$)''' -keywords = [ - "dop_v1_", -] +keywords = ["dop_v1_"] [[rules]] id = "digitalocean-refresh-token" description = "Uncovered a DigitalOcean OAuth Refresh Token, which could allow prolonged unauthorized access and resource manipulation." regex = '''(?i)\b(dor_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "dor_v1_", -] +keywords = ["dor_v1_"] [[rules]] id = "discord-api-token" description = "Detected a Discord API key, potentially compromising communication channels and user data privacy on Discord." regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "discord", -] +keywords = ["discord"] [[rules]] id = "discord-client-id" description = "Identified a Discord client ID, which may lead to unauthorized integrations and data exposure in Discord applications." regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{18})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "discord", -] +keywords = ["discord"] [[rules]] id = "discord-client-secret" description = "Discovered a potential Discord client secret, risking compromised Discord bot integrations and data leaks." regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "discord", -] +keywords = ["discord"] [[rules]] id = "doppler-api-token" description = "Discovered a Doppler API token, posing a risk to environment and secrets management security." regex = '''dp\.pt\.(?i)[a-z0-9]{43}''' -keywords = [ - "doppler", -] +keywords = ["doppler"] [[rules]] id = "droneci-access-token" description = "Detected a Droneci Access Token, potentially compromising continuous integration and deployment workflows." regex = '''(?i)(?:droneci)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "droneci", -] +keywords = ["droneci"] [[rules]] id = "dropbox-api-token" description = "Identified a Dropbox API secret, which could lead to unauthorized file access and data breaches in Dropbox storage." regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{15})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "dropbox", -] +keywords = ["dropbox"] [[rules]] id = "dropbox-long-lived-api-token" description = "Found a Dropbox long-lived API token, risking prolonged unauthorized access to cloud storage and sensitive data." regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "dropbox", -] +keywords = ["dropbox"] [[rules]] id = "dropbox-short-lived-api-token" description = "Discovered a Dropbox short-lived API token, posing a risk of temporary but potentially harmful data access and manipulation." regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(sl\.[a-z0-9\-=_]{135})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "dropbox", -] +keywords = ["dropbox"] [[rules]] id = "duffel-api-token" 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}''' -keywords = [ - "duffel", -] +keywords = ["duffel"] [[rules]] id = "dynatrace-api-token" 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}''' -keywords = [ - "dynatrace", -] +keywords = ["dynatrace"] [[rules]] id = "easypost-api-token" 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}''' -keywords = [ - "ezak", -] +keywords = ["ezak"] [[rules]] id = "easypost-test-api-token" description = "Detected an EasyPost test API token, risking exposure of test environments and potentially sensitive shipment data." regex = '''\bEZTK(?i)[a-z0-9]{54}''' -keywords = [ - "eztk", -] +keywords = ["eztk"] [[rules]] id = "etsy-access-token" description = "Found an Etsy Access Token, potentially compromising Etsy shop management and customer data." regex = '''(?i)(?:(?-i:ETSY|[Ee]tsy))(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)''' entropy = 3 -keywords = [ - "etsy", -] +keywords = ["etsy"] [[rules]] id = "facebook-access-token" @@ -406,80 +345,63 @@ 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." regex = '''(?i)\b(EAA[MC][a-z0-9]{20,})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "eaam","eaac", + "eaam", + "eaac", ] [[rules]] id = "facebook-secret" description = "Discovered a Facebook Application secret, posing a risk of unauthorized access to Facebook accounts and personal data exposure." regex = '''(?i)(?:facebook)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "facebook", -] +keywords = ["facebook"] [[rules]] id = "fastly-api-token" description = "Uncovered a Fastly API key, which may compromise CDN and edge cloud services, leading to content delivery and security issues." regex = '''(?i)(?:fastly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "fastly", -] +keywords = ["fastly"] [[rules]] id = "finicity-api-token" description = "Detected a Finicity API token, potentially risking financial data access and unauthorized financial operations." regex = '''(?i)(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "finicity", -] +keywords = ["finicity"] [[rules]] id = "finicity-client-secret" description = "Identified a Finicity Client Secret, which could lead to compromised financial service integrations and data breaches." regex = '''(?i)(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "finicity", -] +keywords = ["finicity"] [[rules]] id = "finnhub-access-token" description = "Found a Finnhub Access Token, risking unauthorized access to financial market data and analytics." regex = '''(?i)(?:finnhub)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "finnhub", -] +keywords = ["finnhub"] [[rules]] id = "flickr-access-token" description = "Discovered a Flickr Access Token, posing a risk of unauthorized photo management and potential data leakage." regex = '''(?i)(?:flickr)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "flickr", -] +keywords = ["flickr"] [[rules]] id = "flutterwave-encryption-key" description = "Uncovered a Flutterwave Encryption Key, which may compromise payment processing and sensitive financial information." regex = '''FLWSECK_TEST-(?i)[a-h0-9]{12}''' -keywords = [ - "flwseck_test", -] +keywords = ["flwseck_test"] [[rules]] id = "flutterwave-public-key" description = "Detected a Finicity Public Key, potentially exposing public cryptographic operations and integrations." regex = '''FLWPUBK_TEST-(?i)[a-h0-9]{32}-X''' -keywords = [ - "flwpubk_test", -] +keywords = ["flwpubk_test"] [[rules]] id = "flutterwave-secret-key" description = "Identified a Flutterwave Secret Key, risking unauthorized financial transactions and data breaches." regex = '''FLWSECK_TEST-(?i)[a-h0-9]{32}-X''' -keywords = [ - "flwseck_test", -] +keywords = ["flwseck_test"] [[rules]] id = "flyio-access-token" @@ -487,33 +409,29 @@ description = "Uncovered a Fly.io API key" regex = '''\b((?:fo1_[\w-]{43}|fm1[ar]_[a-zA-Z0-9+\/]{100,}={0,3}|fm2_[a-zA-Z0-9+\/]{100,}={0,3}))(?:['|\"|\n|\r|\s|\x60|;]|$)''' entropy = 4 keywords = [ - "fo1_","fm1","fm2_", + "fo1_", + "fm1", + "fm2_", ] [[rules]] id = "frameio-api-token" description = "Found a Frame.io API token, potentially compromising video collaboration and project management." regex = '''fio-u-(?i)[a-z0-9\-_=]{64}''' -keywords = [ - "fio-u-", -] +keywords = ["fio-u-"] [[rules]] id = "freshbooks-access-token" description = "Discovered a Freshbooks Access Token, posing a risk to accounting software access and sensitive financial data exposure." regex = '''(?i)(?:freshbooks)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "freshbooks", -] +keywords = ["freshbooks"] [[rules]] id = "gcp-api-key" description = "Uncovered a GCP API key, which could lead to unauthorized access to Google Cloud services and data breaches." regex = '''\b(AIza[\w-]{35})(?:['|\"|\n|\r|\s|\x60|;]|$)''' entropy = 3 -keywords = [ - "aiza", -] +keywords = ["aiza"] [[rules]] id = "generic-api-key" @@ -521,7 +439,15 @@ description = "Detected a Generic API Key, potentially exposing access to variou regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60|;]|$)''' entropy = 3.5 keywords = [ - "key","api","token","secret","client","passwd","password","auth","access", + "key", + "api", + "token", + "secret", + "client", + "passwd", + "password", + "auth", + "access", ] [rules.allowlist] @@ -2008,7 +1934,8 @@ description = "Identified a GitHub App Token, which may compromise GitHub applic regex = '''(?:ghu|ghs)_[0-9a-zA-Z]{36}''' entropy = 3 keywords = [ - "ghu_","ghs_", + "ghu_", + "ghs_", ] [[rules]] @@ -2016,107 +1943,87 @@ id = "github-fine-grained-pat" description = "Found a GitHub Fine-Grained Personal Access Token, risking unauthorized repository access and code manipulation." regex = '''github_pat_\w{82}''' entropy = 3 -keywords = [ - "github_pat_", -] +keywords = ["github_pat_"] [[rules]] id = "github-oauth" description = "Discovered a GitHub OAuth Access Token, posing a risk of compromised GitHub account integrations and data leaks." regex = '''gho_[0-9a-zA-Z]{36}''' entropy = 3 -keywords = [ - "gho_", -] +keywords = ["gho_"] [[rules]] id = "github-pat" description = "Uncovered a GitHub Personal Access Token, potentially leading to unauthorized repository access and sensitive content exposure." regex = '''ghp_[0-9a-zA-Z]{36}''' entropy = 3 -keywords = [ - "ghp_", -] +keywords = ["ghp_"] [[rules]] id = "github-refresh-token" description = "Detected a GitHub Refresh Token, which could allow prolonged unauthorized access to GitHub services." regex = '''ghr_[0-9a-zA-Z]{36}''' entropy = 3 -keywords = [ - "ghr_", -] +keywords = ["ghr_"] [[rules]] id = "gitlab-pat" description = "Identified a GitLab Personal Access Token, risking unauthorized access to GitLab repositories and codebase exposure." regex = '''glpat-[0-9a-zA-Z\-\_]{20}''' -keywords = [ - "glpat-", -] +keywords = ["glpat-"] [[rules]] id = "gitlab-ptt" description = "Found a GitLab Pipeline Trigger Token, potentially compromising continuous integration workflows and project security." regex = '''glptt-[0-9a-f]{40}''' -keywords = [ - "glptt-", -] +keywords = ["glptt-"] [[rules]] id = "gitlab-rrt" description = "Discovered a GitLab Runner Registration Token, posing a risk to CI/CD pipeline integrity and unauthorized access." regex = '''GR1348941[0-9a-zA-Z\-\_]{20}''' -keywords = [ - "gr1348941", -] +keywords = ["gr1348941"] [[rules]] id = "gitter-access-token" description = "Uncovered a Gitter Access Token, which may lead to unauthorized access to chat and communication services." regex = '''(?i)(?:gitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "gitter", -] +keywords = ["gitter"] [[rules]] id = "gocardless-api-token" description = "Detected a GoCardless API token, potentially risking unauthorized direct debit payment operations and financial data exposure." regex = '''(?i)(?:gocardless)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(live_(?i)[a-z0-9\-_=]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "live_","gocardless", + "live_", + "gocardless", ] [[rules]] id = "grafana-api-key" 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,2})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "eyjrijoi", -] +keywords = ["eyjrijoi"] [[rules]] id = "grafana-cloud-api-token" description = "Found a Grafana cloud API token, risking unauthorized access to cloud-based monitoring services and data exposure." regex = '''(?i)\b(glc_[A-Za-z0-9+/]{32,400}={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "glc_", -] +keywords = ["glc_"] [[rules]] id = "grafana-service-account-token" description = "Discovered a Grafana service account token, posing a risk of compromised monitoring services and data integrity." regex = '''(?i)\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "glsa_", -] +keywords = ["glsa_"] [[rules]] id = "harness-api-key" description = "Identified a Harness Access Token (PAT or SAT), risking unauthorized access to a Harness account." regex = '''(?:pat|sat)\.[a-zA-Z0-9_-]{22}\.[a-zA-Z0-9]{24}\.[a-zA-Z0-9]{20}''' keywords = [ - "pat.","sat.", + "pat.", + "sat.", ] [[rules]] @@ -2124,9 +2031,7 @@ id = "hashicorp-tf-api-token" description = "Uncovered a HashiCorp Terraform user/org API token, which may lead to unauthorized infrastructure management and security breaches." regex = '''(?i)[a-z0-9]{14}\.(?-i:atlasv1)\.[a-z0-9\-_=]{60,70}''' entropy = 3.5 -keywords = [ - "atlasv1", -] +keywords = ["atlasv1"] [[rules]] id = "hashicorp-tf-password" @@ -2134,65 +2039,56 @@ description = "Identified a HashiCorp Terraform password field, risking unauthor regex = '''(?i)(?:administrator_login_password|password)(?:[0-9a-z\-_\t .]{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)$''' keywords = [ - "administrator_login_password","password", + "administrator_login_password", + "password", ] [[rules]] id = "heroku-api-key" description = "Detected a Heroku API Key, potentially compromising cloud application deployments and operational security." regex = '''(?i)(?:heroku)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "heroku", -] +keywords = ["heroku"] [[rules]] id = "hubspot-api-key" description = "Found a HubSpot API Token, posing a risk to CRM data integrity and unauthorized marketing operations." regex = '''(?i)(?:hubspot)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "hubspot", -] +keywords = ["hubspot"] [[rules]] id = "huggingface-access-token" 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})(?:$|[\\'"` <])''' entropy = 1 -keywords = [ - "hf_", -] +keywords = ["hf_"] [[rules]] id = "huggingface-organization-api-token" description = "Uncovered a Hugging Face Organization API token, potentially compromising AI organization accounts and associated data." regex = '''(?:^|[\\'"` >=:\(,)])(api_org_[a-zA-Z]{34})(?:$|[\\'"` <\),])''' entropy = 2 -keywords = [ - "api_org_", -] +keywords = ["api_org_"] [[rules]] id = "infracost-api-token" description = "Detected an Infracost API Token, risking unauthorized access to cloud cost estimation tools and financial data." regex = '''(?i)\b(ico-[a-zA-Z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "ico-", -] +keywords = ["ico-"] [[rules]] id = "intercom-api-key" description = "Identified an Intercom API Token, which could compromise customer communication channels and data privacy." regex = '''(?i)(?:intercom)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{60})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "intercom", -] +keywords = ["intercom"] [[rules]] id = "intra42-client-secret" 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|;]|$)''' keywords = [ - "intra","s-s4t2ud-","s-s4t2af-", + "intra", + "s-s4t2ud-", + "s-s4t2af-", ] [[rules]] @@ -2200,7 +2096,10 @@ id = "jfrog-api-key" description = "Found a JFrog API Key, posing a risk of unauthorized access to software artifact repositories and build pipelines." regex = '''(?i)(?:jfrog|artifactory|bintray|xray)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{73})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "jfrog","artifactory","bintray","xray", + "jfrog", + "artifactory", + "bintray", + "xray", ] [[rules]] @@ -2208,41 +2107,36 @@ id = "jfrog-identity-token" description = "Discovered a JFrog Identity Token, potentially compromising access to JFrog services and sensitive software artifacts." regex = '''(?i)(?:jfrog|artifactory|bintray|xray)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "jfrog","artifactory","bintray","xray", + "jfrog", + "artifactory", + "bintray", + "xray", ] [[rules]] id = "jwt" 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|;]|$)''' -keywords = [ - "ey", -] +keywords = ["ey"] [[rules]] id = "jwt-base64" description = "Detected a Base64-encoded JSON Web Token, posing a risk of exposing encoded authentication and data exchange information." regex = '''\bZXlK(?:(?PaGJHY2lPaU)|(?PaGNIVWlPaU)|(?PaGNIWWlPaU)|(?PaGRXUWlPaU)|(?PaU5qUWlP)|(?PamNtbDBJanBi)|(?PamRIa2lPaU)|(?PbGNHc2lPbn)|(?PbGJtTWlPaU)|(?PcWEzVWlPaU)|(?PcWQyc2lPb)|(?PcGMzTWlPaU)|(?PcGRpSTZJ)|(?PcmFXUWlP)|(?PclpYbGZiM0J6SWpwY)|(?PcmRIa2lPaUp)|(?PdWIyNWpaU0k2)|(?Pd01tTWlP)|(?Pd01uTWlPaU)|(?Pd2NIUWlPaU)|(?PemRXSWlPaU)|(?PemRuUWlP)|(?PMFlXY2lPaU)|(?PMGVYQWlPaUp)|(?PMWNtd2l)|(?PMWMyVWlPaUp)|(?PMlpYSWlPaU)|(?PMlpYSnphVzl1SWpv)|(?PNElqb2)|(?PNE5XTWlP)|(?PNE5YUWlPaU)|(?PNE5YUWpVekkxTmlJNkl)|(?PNE5YVWlPaU)|(?PNmFYQWlPaU))[a-zA-Z0-9\/\\_+\-\r\n]{40,}={0,2}''' -keywords = [ - "zxlk", -] +keywords = ["zxlk"] [[rules]] id = "kraken-access-token" description = "Identified a Kraken Access Token, potentially compromising cryptocurrency trading accounts and financial security." regex = '''(?i)(?:kraken)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9\/=_\+\-]{80,90})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "kraken", -] +keywords = ["kraken"] [[rules]] id = "kubernetes-secret-yaml" 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["']?)''' path = '''(?i)\.ya?ml$''' -keywords = [ - "secret", -] +keywords = ["secret"] [rules.allowlist] @@ -2254,48 +2148,39 @@ regexes = [ id = "kucoin-access-token" description = "Found a Kucoin Access Token, risking unauthorized access to cryptocurrency exchange services and transactions." regex = '''(?i)(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "kucoin", -] +keywords = ["kucoin"] [[rules]] id = "kucoin-secret-key" description = "Discovered a Kucoin Secret Key, which could lead to compromised cryptocurrency operations and financial data breaches." regex = '''(?i)(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "kucoin", -] +keywords = ["kucoin"] [[rules]] id = "launchdarkly-access-token" description = "Uncovered a Launchdarkly Access Token, potentially compromising feature flag management and application functionality." regex = '''(?i)(?:launchdarkly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "launchdarkly", -] +keywords = ["launchdarkly"] [[rules]] id = "linear-api-key" 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}''' -keywords = [ - "lin_api_", -] +keywords = ["lin_api_"] [[rules]] id = "linear-client-secret" description = "Identified a Linear Client Secret, which may compromise secure integrations and sensitive project management data." regex = '''(?i)(?:linear)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "linear", -] +keywords = ["linear"] [[rules]] id = "linkedin-client-id" description = "Found a LinkedIn Client ID, risking unauthorized access to LinkedIn integrations and professional data exposure." regex = '''(?i)(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{14})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "linkedin","linked-in", + "linkedin", + "linked-in", ] [[rules]] @@ -2303,7 +2188,8 @@ id = "linkedin-client-secret" description = "Discovered a LinkedIn Client secret, potentially compromising LinkedIn application integrations and user data." regex = '''(?i)(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "linkedin","linked-in", + "linkedin", + "linked-in", ] [[rules]] @@ -2311,7 +2197,8 @@ id = "lob-api-key" description = "Uncovered a Lob API Key, which could lead to unauthorized access to mailing and address verification services." regex = '''(?i)(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}((live|test)_[a-f0-9]{35})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "test_","live_", + "test_", + "live_", ] [[rules]] @@ -2319,63 +2206,55 @@ id = "lob-pub-api-key" description = "Detected a Lob Publishable API Key, posing a risk of exposing mail and print service integrations." regex = '''(?i)(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}((test|live)_pub_[a-f0-9]{31})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "test_pub","live_pub","_pub", + "test_pub", + "live_pub", + "_pub", ] [[rules]] id = "mailchimp-api-key" description = "Identified a Mailchimp API key, potentially compromising email marketing campaigns and subscriber data." regex = '''(?i)(?:MailchimpSDK.initialize|mailchimp)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32}-us\d\d)(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "mailchimp", -] +keywords = ["mailchimp"] [[rules]] id = "mailgun-private-api-token" description = "Found a Mailgun private API token, risking unauthorized email service operations and data breaches." regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(key-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "mailgun", -] +keywords = ["mailgun"] [[rules]] id = "mailgun-pub-key" description = "Discovered a Mailgun public validation key, which could expose email verification processes and associated data." regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(pubkey-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "mailgun", -] +keywords = ["mailgun"] [[rules]] id = "mailgun-signing-key" description = "Uncovered a Mailgun webhook signing key, potentially compromising email automation and data integrity." regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "mailgun", -] +keywords = ["mailgun"] [[rules]] id = "mapbox-api-token" description = "Detected a MapBox API token, posing a risk to geospatial services and sensitive location data exposure." regex = '''(?i)(?:mapbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(pk\.[a-z0-9]{60}\.[a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "mapbox", -] +keywords = ["mapbox"] [[rules]] id = "mattermost-access-token" description = "Identified a Mattermost Access Token, which may compromise team communication channels and data privacy." regex = '''(?i)(?:mattermost)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{26})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "mattermost", -] +keywords = ["mattermost"] [[rules]] id = "messagebird-api-token" description = "Found a MessageBird API token, risking unauthorized access to communication platforms and message data." regex = '''(?i)(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "messagebird","message-bird","message_bird", + "messagebird", + "message-bird", + "message_bird", ] [[rules]] @@ -2383,7 +2262,9 @@ id = "messagebird-client-id" description = "Discovered a MessageBird client ID, potentially compromising API integrations and sensitive communication data." regex = '''(?i)(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "messagebird","message-bird","message_bird", + "messagebird", + "message-bird", + "message_bird", ] [[rules]] @@ -2391,56 +2272,50 @@ id = "microsoft-teams-webhook" 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}''' keywords = [ - "webhook.office.com","webhookb2","incomingwebhook", + "webhook.office.com", + "webhookb2", + "incomingwebhook", ] [[rules]] id = "netlify-access-token" description = "Detected a Netlify Access Token, potentially compromising web hosting services and site management." regex = '''(?i)(?:netlify)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40,46})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "netlify", -] +keywords = ["netlify"] [[rules]] id = "new-relic-browser-api-token" description = "Identified a New Relic ingest browser API token, risking unauthorized access to application performance data and analytics." regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(NRJS-[a-f0-9]{19})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "nrjs-", -] +keywords = ["nrjs-"] [[rules]] id = "new-relic-insert-key" description = "Discovered a New Relic insight insert key, compromising data injection into the platform." regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(NRII-[a-z0-9-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "nrii-", -] +keywords = ["nrii-"] [[rules]] id = "new-relic-user-api-id" description = "Found a New Relic user API ID, posing a risk to application monitoring services and data integrity." regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "new-relic","newrelic","new_relic", + "new-relic", + "newrelic", + "new_relic", ] [[rules]] id = "new-relic-user-api-key" description = "Discovered a New Relic user API Key, which could lead to compromised application insights and performance monitoring." regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(NRAK-[a-z0-9]{27})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "nrak", -] +keywords = ["nrak"] [[rules]] id = "npm-access-token" 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|;]|$)''' -keywords = [ - "npm_", -] +keywords = ["npm_"] [[rules]] id = "nuget-config-password" @@ -2448,9 +2323,7 @@ description = "Identified a password within a Nuget config file, potentially com regex = '''(?i)''' path = '''(?i)nuget\.config$''' entropy = 1 -keywords = [ - "|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "nytimes","new-york-times","newyorktimes", + "nytimes", + "new-york-times", + "newyorktimes", ] [[rules]] id = "okta-access-token" description = "Identified an Okta Access Token, which may compromise identity management services and user authentication data." regex = '''(?i)(?:okta)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{42})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "okta", -] +keywords = ["okta"] [[rules]] id = "openai-api-key" 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|;]|$)''' -keywords = [ - "t3blbkfj", -] +keywords = ["t3blbkfj"] [[rules]] id = "openshift-user-token" description = "Found an OpenShift user token, potentially compromising an OpenShift/Kubernetes cluster." regex = '''\b(sha256~[\w-]{43})(?:[^\w-]|\z)''' entropy = 3.5 -keywords = [ - "sha256~", -] +keywords = ["sha256~"] [[rules]] id = "plaid-api-token" description = "Discovered a Plaid API Token, potentially compromising financial data aggregation and banking services." regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "plaid", -] +keywords = ["plaid"] [[rules]] id = "plaid-client-id" description = "Uncovered a Plaid Client ID, which could lead to unauthorized financial service integrations and data breaches." regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)''' entropy = 3.5 -keywords = [ - "plaid", -] +keywords = ["plaid"] [[rules]] id = "plaid-secret-key" description = "Detected a Plaid Secret key, risking unauthorized access to financial accounts and sensitive transaction data." regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)''' entropy = 3.5 -keywords = [ - "plaid", -] +keywords = ["plaid"] [[rules]] id = "planetscale-api-token" 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|;]|$)''' -keywords = [ - "pscale_tkn_", -] +keywords = ["pscale_tkn_"] [[rules]] id = "planetscale-oauth-token" 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|;]|$)''' -keywords = [ - "pscale_oauth_", -] +keywords = ["pscale_oauth_"] [[rules]] id = "planetscale-password" 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|;]|$)''' -keywords = [ - "pscale_pw_", -] +keywords = ["pscale_pw_"] [[rules]] id = "postman-api-token" 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|;]|$)''' -keywords = [ - "pmak-", -] +keywords = ["pmak-"] [[rules]] id = "prefect-api-token" 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|;]|$)''' -keywords = [ - "pnu_", -] +keywords = ["pnu_"] [[rules]] id = "private-key" description = "Identified a Private Key, which may compromise cryptographic security and sensitive data encryption." regex = '''(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY(?: BLOCK)?-----[\s\S-]*?KEY(?: BLOCK)?-----''' -keywords = [ - "-----begin", -] +keywords = ["-----begin"] [[rules]] id = "pulumi-api-token" 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|;]|$)''' -keywords = [ - "pul-", -] +keywords = ["pul-"] [[rules]] id = "pypi-upload-token" description = "Discovered a PyPI upload token, potentially compromising Python package distribution and repository integrity." regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}''' -keywords = [ - "pypi-ageichlwas5vcmc", -] +keywords = ["pypi-ageichlwas5vcmc"] [[rules]] id = "rapidapi-access-token" description = "Uncovered a RapidAPI Access Token, which could lead to unauthorized access to various APIs and data services." regex = '''(?i)(?:rapidapi)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{50})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "rapidapi", -] +keywords = ["rapidapi"] [[rules]] id = "readme-api-token" 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|;]|$)''' -keywords = [ - "rdme_", -] +keywords = ["rdme_"] [[rules]] id = "rubygems-api-token" 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|;]|$)''' -keywords = [ - "rubygems_", -] +keywords = ["rubygems_"] [[rules]] id = "scalingo-api-token" 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|;]|$)''' -keywords = [ - "tk-us-", -] +keywords = ["tk-us-"] [[rules]] id = "sendbird-access-id" description = "Discovered a Sendbird Access ID, which could compromise chat and messaging platform integrations." regex = '''(?i)(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "sendbird", -] +keywords = ["sendbird"] [[rules]] id = "sendbird-access-token" description = "Uncovered a Sendbird Access Token, potentially risking unauthorized access to communication services and user data." regex = '''(?i)(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "sendbird", -] +keywords = ["sendbird"] [[rules]] id = "sendgrid-api-token" 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|;]|$)''' -keywords = [ - "sg.", -] +keywords = ["sg."] [[rules]] id = "sendinblue-api-token" 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|;]|$)''' -keywords = [ - "xkeysib-", -] +keywords = ["xkeysib-"] [[rules]] id = "sentry-access-token" description = "Found a Sentry Access Token, risking unauthorized access to error tracking services and sensitive application data." regex = '''(?i)(?:sentry)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "sentry", -] +keywords = ["sentry"] [[rules]] id = "shippo-api-token" 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|;]|$)''' -keywords = [ - "shippo_", -] +keywords = ["shippo_"] [[rules]] id = "shopify-access-token" 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}''' -keywords = [ - "shpat_", -] +keywords = ["shpat_"] [[rules]] id = "shopify-custom-access-token" description = "Detected a Shopify custom access token, potentially compromising custom app integrations and e-commerce data security." regex = '''shpca_[a-fA-F0-9]{32}''' -keywords = [ - "shpca_", -] +keywords = ["shpca_"] [[rules]] id = "shopify-private-app-access-token" 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}''' -keywords = [ - "shppa_", -] +keywords = ["shppa_"] [[rules]] id = "shopify-shared-secret" description = "Found a Shopify shared secret, posing a risk to application authentication and e-commerce platform security." regex = '''shpss_[a-fA-F0-9]{32}''' -keywords = [ - "shpss_", -] +keywords = ["shpss_"] [[rules]] id = "sidekiq-secret" description = "Discovered a Sidekiq Secret, which could lead to compromised background job processing and application data breaches." regex = '''(?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "bundle_enterprise__contribsys__com","bundle_gems__contribsys__com", + "bundle_enterprise__contribsys__com", + "bundle_gems__contribsys__com", ] [[rules]] @@ -2706,55 +2526,50 @@ id = "sidekiq-sensitive-url" description = "Uncovered a Sidekiq Sensitive URL, potentially exposing internal job queues and sensitive operation details." regex = '''(?i)\bhttps?://([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)''' keywords = [ - "gems.contribsys.com","enterprise.contribsys.com", + "gems.contribsys.com", + "enterprise.contribsys.com", ] [[rules]] id = "slack-app-token" 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]+''' -keywords = [ - "xapp", -] +keywords = ["xapp"] [[rules]] id = "slack-bot-token" 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-]*)''' -keywords = [ - "xoxb", -] +keywords = ["xoxb"] [[rules]] id = "slack-config-access-token" 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}''' keywords = [ - "xoxe.xoxb-","xoxe.xoxp-", + "xoxe.xoxb-", + "xoxe.xoxp-", ] [[rules]] id = "slack-config-refresh-token" description = "Discovered a Slack Configuration refresh token, potentially allowing prolonged unauthorized access to configuration settings." regex = '''(?i)xoxe-\d-[A-Z0-9]{146}''' -keywords = [ - "xoxe-", -] +keywords = ["xoxe-"] [[rules]] id = "slack-legacy-bot-token" 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})''' -keywords = [ - "xoxb", -] +keywords = ["xoxb"] [[rules]] id = "slack-legacy-token" 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]+''' keywords = [ - "xoxo","xoxs", + "xoxo", + "xoxs", ] [[rules]] @@ -2762,7 +2577,8 @@ id = "slack-legacy-workspace-token" 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})''' keywords = [ - "xoxa","xoxr", + "xoxa", + "xoxr", ] [[rules]] @@ -2770,23 +2586,26 @@ id = "slack-user-token" 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}''' keywords = [ - "xoxp-","xoxe-", + "xoxp-", + "xoxe-", ] [[rules]] id = "slack-webhook-url" 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}''' -keywords = [ - "hooks.slack.com", -] +keywords = ["hooks.slack.com"] [[rules]] id = "snyk-api-token" description = "Uncovered a Snyk API token, potentially compromising software vulnerability scanning and code security." regex = '''(?i)(?:snyk_token|snyk_key|snyk_api_token|snyk_api_key|snyk_oauth_token)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' keywords = [ - "snyk_token","snyk_key","snyk_api_token","snyk_api_key","snyk_oauth_token", + "snyk_token", + "snyk_key", + "snyk_api_token", + "snyk_api_key", + "snyk_oauth_token", ] [[rules]] @@ -2794,23 +2613,27 @@ id = "square-access-token" 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|;]|$)''' keywords = [ - "sq0atp-","eaaa", + "sq0atp-", + "eaaa", ] [[rules]] id = "squarespace-access-token" description = "Identified a Squarespace Access Token, which may compromise website management and content control on Squarespace." regex = '''(?i)(?:squarespace)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "squarespace", -] +keywords = ["squarespace"] [[rules]] id = "stripe-access-token" 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|;]|$)''' keywords = [ - "sk_test","sk_live","sk_prod","rk_test","rk_live","rk_prod", + "sk_test", + "sk_live", + "sk_prod", + "rk_test", + "rk_live", + "rk_prod", ] [[rules]] @@ -2818,9 +2641,7 @@ id = "sumologic-access-id" description = "Discovered a SumoLogic Access ID, potentially compromising log management services and data analytics integrity." regex = '''(?i:(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3})(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(su[a-zA-Z0-9]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' entropy = 3 -keywords = [ - "sumo", -] +keywords = ["sumo"] [rules.allowlist] @@ -2834,97 +2655,73 @@ id = "sumologic-access-token" description = "Uncovered a SumoLogic Access Token, which could lead to unauthorized access to log data and analytics insights." regex = '''(?i)(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' entropy = 3 -keywords = [ - "sumo", -] +keywords = ["sumo"] [[rules]] id = "telegram-bot-api-token" description = "Detected a Telegram Bot API Token, risking unauthorized bot operations and message interception on Telegram." regex = '''(?i:telegr(?:[0-9a-z\(-_\t .\\]{0,40})(?:[\s|']|[\s|"]){0,3})(?:=|\|\|:|<=|=>|:|\?=|\()(?:'|\"|\s|=|\x60){0,5}([0-9]{5,16}:A[a-z0-9_\-]{34})(?:['|\"|\n|\r|\s|\x60|;|\\]|$)''' -keywords = [ - "telegr", -] +keywords = ["telegr"] [[rules]] id = "travisci-access-token" description = "Identified a Travis CI Access Token, potentially compromising continuous integration services and codebase security." regex = '''(?i)(?:travis)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "travis", -] +keywords = ["travis"] [[rules]] id = "twilio-api-key" description = "Found a Twilio API Key, posing a risk to communication services and sensitive customer interaction data." regex = '''SK[0-9a-fA-F]{32}''' -keywords = [ - "twilio", -] +keywords = ["twilio"] [[rules]] id = "twitch-api-token" description = "Discovered a Twitch API token, which could compromise streaming services and account integrations." regex = '''(?i)(?:twitch)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "twitch", -] +keywords = ["twitch"] [[rules]] id = "twitter-access-secret" description = "Uncovered a Twitter Access Secret, potentially risking unauthorized Twitter integrations and data breaches." regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{45})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "twitter", -] +keywords = ["twitter"] [[rules]] id = "twitter-access-token" description = "Detected a Twitter Access Token, posing a risk of unauthorized account operations and social media data exposure." regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "twitter", -] +keywords = ["twitter"] [[rules]] id = "twitter-api-key" description = "Identified a Twitter API Key, which may compromise Twitter application integrations and user data security." regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "twitter", -] +keywords = ["twitter"] [[rules]] id = "twitter-api-secret" description = "Found a Twitter API Secret, risking the security of Twitter app integrations and sensitive data access." regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{50})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "twitter", -] +keywords = ["twitter"] [[rules]] id = "twitter-bearer-token" description = "Discovered a Twitter Bearer Token, potentially compromising API access and data retrieval from Twitter." regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "twitter", -] +keywords = ["twitter"] [[rules]] id = "typeform-api-token" description = "Uncovered a Typeform API token, which could lead to unauthorized survey management and data collection." regex = '''(?i)(?:typeform)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(tfp_[a-z0-9\-_\.=]{59})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "tfp_", -] +keywords = ["tfp_"] [[rules]] id = "vault-batch-token" 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|;]|$)''' -keywords = [ - "hvb", -] +keywords = ["hvb"] [[rules]] id = "vault-service-token" @@ -2932,7 +2729,8 @@ 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|;]|$)''' entropy = 3.5 keywords = [ - "hvs","s.", + "hvs", + "s.", ] [rules.allowlist] @@ -2945,32 +2743,24 @@ regexes = [ id = "yandex-access-token" description = "Found a Yandex Access Token, posing a risk to Yandex service integrations and user data privacy." regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "yandex", -] +keywords = ["yandex"] [[rules]] id = "yandex-api-key" description = "Discovered a Yandex API Key, which could lead to unauthorized access to Yandex services and data manipulation." regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(AQVN[A-Za-z0-9_\-]{35,38})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "yandex", -] +keywords = ["yandex"] [[rules]] id = "yandex-aws-access-token" description = "Uncovered a Yandex AWS Access Token, potentially compromising cloud resource access and data security on Yandex Cloud." regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(YC[a-zA-Z0-9_\-]{38})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "yandex", -] +keywords = ["yandex"] [[rules]] id = "zendesk-secret-key" description = "Detected a Zendesk Secret Key, risking unauthorized access to customer support services and sensitive ticketing data." regex = '''(?i)(?:zendesk)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "zendesk", -] +keywords = ["zendesk"]