diff --git a/packages/secret-scan/src/rules/authress.ts b/packages/secret-scan/src/rules/authress.ts index 35d23c53..a81a781f 100644 --- a/packages/secret-scan/src/rules/authress.ts +++ b/packages/secret-scan/src/rules/authress.ts @@ -3,10 +3,10 @@ import type { TestCase } from '@/types' export default function authress(): RegExp[] { /* - Authress API key regex +Authress API key regex - reference: https://authress.io/knowledge-base/docs/authorization/service-clients/secrets-scanning/#1-detection - */ +reference: https://authress.io/knowledge-base/docs/authorization/service-clients/secrets-scanning/#1-detection +*/ return [ /(?: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}/i ] diff --git a/packages/secret-scan/src/rules/beamer.ts b/packages/secret-scan/src/rules/beamer.ts index e6d8b06b..b52982c2 100644 --- a/packages/secret-scan/src/rules/beamer.ts +++ b/packages/secret-scan/src/rules/beamer.ts @@ -4,7 +4,7 @@ import type { TestCase } from '@/types' export default function beamer(): RegExp[] { return [ // Beamer API key regex - /b_[a-z0-9=_\-]{44}/i + /b_[a-z0-9=_-]{44}/i ] } diff --git a/packages/secret-scan/src/rules/bitbucket.ts b/packages/secret-scan/src/rules/bitbucket.ts index 5fcbe083..ac1608c3 100644 --- a/packages/secret-scan/src/rules/bitbucket.ts +++ b/packages/secret-scan/src/rules/bitbucket.ts @@ -4,7 +4,7 @@ import type { TestCase } from '@/types' export default function bitbucket(): RegExp[] { return [ // BitBucket key regex - /bitbucket[a-zA-Z0-9]{32}|bitbucket[a-zA-Z0-9=_\-]{64}/i + /bitbucket[a-zA-Z0-9]{32}|bitbucket[a-zA-Z0-9=_-]{64}/i ] } diff --git a/packages/secret-scan/src/rules/cloudflare.ts b/packages/secret-scan/src/rules/cloudflare.ts index 4377f2ec..be75e8fa 100644 --- a/packages/secret-scan/src/rules/cloudflare.ts +++ b/packages/secret-scan/src/rules/cloudflare.ts @@ -12,7 +12,7 @@ export default function cloudflare(): RegExp[] { * */ return [ // Cloudflare key regex - /(?:[a-z0-9]{37}|[a-zA-Z0-9=_\-]{40}|v1\.0-[a-f0-9]{24}-[a-f0-9]{146})/i + /(?:[a-z0-9]{37}|[a-zA-Z0-9=_-]{40}|v1\.0-[a-f0-9]{24}-[a-f0-9]{146})/i ] } diff --git a/packages/secret-scan/src/rules/coinbase.ts b/packages/secret-scan/src/rules/coinbase.ts index bd5bf073..a5c808d7 100644 --- a/packages/secret-scan/src/rules/coinbase.ts +++ b/packages/secret-scan/src/rules/coinbase.ts @@ -2,7 +2,7 @@ import type { TestCase } from '@/types' export default function coinbase(): RegExp[] { - return [/coinbase[a-zA-Z0-9=_\-]{64}/i] + return [/coinbase[a-zA-Z0-9=_-]{64}/i] } const testcase: TestCase[] = [ diff --git a/packages/secret-scan/src/rules/contentful.ts b/packages/secret-scan/src/rules/contentful.ts index eaf282aa..8622553b 100644 --- a/packages/secret-scan/src/rules/contentful.ts +++ b/packages/secret-scan/src/rules/contentful.ts @@ -4,7 +4,7 @@ import type { TestCase } from '@/types' export default function contentful(): RegExp[] { return [ // Contentful Delivery API Token regex - /contentful[a-zA-Z0-9=_\-]{43}/i + /contentful[a-zA-Z0-9=_-]{43}/i ] } diff --git a/packages/secret-scan/src/rules/definednetworking.ts b/packages/secret-scan/src/rules/definednetworking.ts index a0877d6b..49e48556 100644 --- a/packages/secret-scan/src/rules/definednetworking.ts +++ b/packages/secret-scan/src/rules/definednetworking.ts @@ -4,7 +4,7 @@ import type { TestCase } from '@/types' export default function definednetworking(): RegExp[] { return [ // Defined Networking API Token Regex - /dnkey-[a-z0-9=_\-]{26}-[a-z0-9=_\-]{52}/i + /dnkey-[a-z0-9=_-]{26}-[a-z0-9=_-]{52}/i ] } diff --git a/packages/secret-scan/src/rules/dropbox.ts b/packages/secret-scan/src/rules/dropbox.ts index 08a291f8..b68a0e9d 100644 --- a/packages/secret-scan/src/rules/dropbox.ts +++ b/packages/secret-scan/src/rules/dropbox.ts @@ -3,7 +3,7 @@ import type { TestCase } from '@/types' export default function dropbox(): RegExp[] { return [ - // /[a-zA-Z0-9]{15}/i, // Dropbox API Secret TODO: This regex is too generic + // /[a-zA-Z0-9]{15}/i, // Dropbox API Secret TODO: This regex is too generic /sl\.[a-z0-9\-=_]{135}/i, // Dropbox Short Lived API Secret /[a-z0-9]{11}AAAAAAAAAA[a-z0-9\-_=]{43}/i // Dropbox Long Lived API Secret ] @@ -11,8 +11,8 @@ export default function dropbox(): RegExp[] { const testcase: TestCase[] = [ // { - // input: 'v3tpJLAgvfvDuOR', - // expected: true + // input: 'v3tpJLAgvfvDuOR', + // expected: true // }, { input: diff --git a/packages/secret-scan/src/rules/huggingface.ts b/packages/secret-scan/src/rules/huggingface.ts index 6fe5c5f9..35a77b54 100644 --- a/packages/secret-scan/src/rules/huggingface.ts +++ b/packages/secret-scan/src/rules/huggingface.ts @@ -7,7 +7,7 @@ export default function huggingface(): RegExp[] { /(?:^|[\\'"` + "`" + ` >=:])(hf_[a-zA-Z]{34})(?:$|[\\'"` + "`" + ` <])/, // Huggingface Organization Access Token Regex - /(?:^|[\\'"` + "`" + ` >=:\(,)])(api_org_[a-zA-Z]{34})(?:$|[\\'"` + "`" + ` <\),])/ + /(?:^|[\\'"` + "`" + ` >=:(,)])(api_org_[a-zA-Z]{34})(?:$|[\\'"` + "`" + ` <),])/ ] } diff --git a/packages/secret-scan/src/rules/ip_public.ts b/packages/secret-scan/src/rules/ip_public.ts index 03f0a225..eaa2a6da 100644 --- a/packages/secret-scan/src/rules/ip_public.ts +++ b/packages/secret-scan/src/rules/ip_public.ts @@ -4,7 +4,7 @@ import type { TestCase } from '@/types' // eslint-disable-next-line @typescript-eslint/naming-convention export default function ip_public(): RegExp[] { return [ - /(?