{
  "$comment": "The one list of credential shapes. Every secret detector is generated from `patterns` (gen-secret-patterns.mjs writes lib/secret-patterns.generated.mjs and the marked blocks in the shell scanners; the toolkit vendors the generated module). `ere` is POSIX ERE that grep -E reads as written and JavaScript reads once the generator turns [[:space:]] into \\s, so it uses no \\b, \\s, \\d, \\w or lookaround. `left` and `right` add a boundary: `word` is \\b in JavaScript and (^|[^A-Za-z0-9_]) or ([^A-Za-z0-9_]|$) in grep; any other value is a bracket body of characters that may not touch the match, read the same two ways. `kind` token is a fixed-prefix shape, context needs the text around it. `lead` is how a token opens, used to rejoin one hard-wrapped by whitespace; `blockEnd` closes a multi-line block a redactor removes whole. `providers` are the test samples, at least one per pattern: each is SPLIT into a prefix, a filler character and a length and joined at run time, so this file holds no complete credential-shaped string for the scanners it feeds to refuse.",
  "patterns": [
    {
      "id": "github-pat",
      "label": "GitHub token",
      "kind": "token",
      "ere": "gh[pousr]_[A-Za-z0-9]{36,}",
      "left": "word",
      "right": "word",
      "lead": "gh[pousr]_"
    },
    {
      "id": "github-fine-grained-pat",
      "label": "GitHub fine-grained token",
      "kind": "token",
      "ere": "github_pat_[A-Za-z0-9_]{50,}",
      "left": "word",
      "right": "word",
      "lead": "github_pat_"
    },
    {
      "id": "slack-token",
      "label": "Slack token",
      "kind": "token",
      "ere": "xox[abprs]-[A-Za-z0-9-]{10,}",
      "left": "word",
      "right": "word",
      "lead": "xox[abprs]-"
    },
    {
      "id": "aws-access-key-id",
      "label": "AWS access key",
      "kind": "token",
      "ere": "(AKIA|ASIA)[0-9A-Z]{16}",
      "left": "word",
      "lead": "(AKIA|ASIA)"
    },
    {
      "id": "google-api-key",
      "label": "Google API key",
      "kind": "token",
      "ere": "AIza[0-9A-Za-z_-]{35}",
      "left": "word",
      "right": "word",
      "lead": "AIza"
    },
    {
      "id": "openai-key",
      "label": "OpenAI API key",
      "kind": "token",
      "ere": "sk-(proj-)?[A-Za-z0-9_-]{32,}",
      "left": "word",
      "right": "word",
      "lead": "sk-"
    },
    {
      "id": "anthropic-key",
      "label": "Anthropic API key",
      "kind": "token",
      "ere": "sk-ant-[A-Za-z0-9_-]{32,}",
      "left": "word",
      "right": "word",
      "lead": "sk-ant-"
    },
    {
      "id": "figma-token",
      "label": "Figma token",
      "kind": "token",
      "ere": "fig[a-z]_[A-Za-z0-9_-]{20,}",
      "left": "word",
      "right": "word",
      "lead": "fig[a-z]_"
    },
    {
      "id": "npm-token",
      "label": "npm token",
      "kind": "token",
      "ere": "npm_[A-Za-z0-9]{36}",
      "left": "word",
      "right": "word",
      "lead": "npm_"
    },
    {
      "id": "gitlab-pat",
      "label": "GitLab token",
      "kind": "token",
      "ere": "glpat-[A-Za-z0-9_-]{20,}",
      "left": "word",
      "right": "word",
      "lead": "glpat-"
    },
    {
      "id": "stripe-key",
      "label": "Stripe live key",
      "kind": "token",
      "ere": "[sr]k_live_[A-Za-z0-9]{20,}",
      "left": "word",
      "right": "word",
      "lead": "[sr]k_live_"
    },
    {
      "id": "perplexity-key",
      "label": "Perplexity API key",
      "kind": "token",
      "ere": "pplx-[A-Za-z0-9]{32,}",
      "left": "word",
      "right": "word",
      "lead": "pplx-"
    },
    {
      "id": "huggingface-token",
      "label": "Hugging Face token",
      "kind": "token",
      "ere": "hf_[A-Za-z0-9]{30,}",
      "left": "word",
      "right": "word",
      "lead": "hf_"
    },
    {
      "id": "groq-key",
      "label": "Groq API key",
      "kind": "token",
      "ere": "gsk_[A-Za-z0-9]{40,}",
      "left": "word",
      "right": "word",
      "lead": "gsk_"
    },
    {
      "id": "openrouter-key",
      "label": "OpenRouter API key",
      "kind": "token",
      "ere": "sk-or-v1-[A-Za-z0-9]{40,}",
      "left": "word",
      "right": "word",
      "lead": "sk-or-v1-"
    },
    {
      "id": "slack-app-token",
      "label": "Slack app-level token",
      "kind": "token",
      "ere": "xapp-[0-9]+-[A-Za-z0-9]{8,}-[0-9]{8,}-[A-Za-z0-9]{32,}",
      "left": "word",
      "right": "word",
      "lead": "xapp-"
    },
    {
      "id": "sendgrid-key",
      "label": "SendGrid API key",
      "kind": "token",
      "ere": "SG\\.[A-Za-z0-9_-]{22}\\.[A-Za-z0-9_-]{43}",
      "left": "word",
      "right": "A-Za-z0-9_-",
      "lead": "SG\\."
    },
    {
      "id": "twilio-api-key",
      "label": "Twilio API key SID",
      "kind": "token",
      "ere": "SK[0-9a-f]{32}",
      "left": "A-Za-z0-9_",
      "right": "A-Za-z0-9_"
    },
    {
      "id": "aws-secret-access-key",
      "label": "AWS secret access key",
      "kind": "context",
      "ere": "aws_?secret_?access_?key[\"']?[[:space:]]*[:=][[:space:]]*[\"']?[A-Za-z0-9/+=]{40}",
      "right": "A-Za-z0-9/+=",
      "ignoreCase": true
    },
    {
      "id": "aws-session-token",
      "label": "AWS session token",
      "kind": "context",
      "ere": "aws_?session_?token[\"']?[[:space:]]*[:=][[:space:]]*[\"']?[A-Za-z0-9/+=]{100,}",
      "ignoreCase": true
    },
    {
      "id": "service-account-json",
      "label": "Service account JSON",
      "kind": "context",
      "ere": "\"type\"[[:space:]]*:[[:space:]]*\"service_account\""
    },
    {
      "id": "jwt",
      "label": "JWT",
      "kind": "token",
      "ere": "eyJ[A-Za-z0-9_-]{10,}\\.[A-Za-z0-9_-]{10,}\\.[A-Za-z0-9_-]{10,}",
      "left": "word",
      "right": "word",
      "lead": "eyJ"
    },
    {
      "id": "private-key-block",
      "label": "Private key",
      "kind": "token",
      "ere": "-----BEGIN [A-Z0-9 ]*PRIVATE KEY( BLOCK)?-----",
      "blockEnd": "-----END [A-Z0-9 ]*PRIVATE KEY( BLOCK)?-----"
    },
    {
      "id": "url-with-credentials",
      "label": "URL with embedded credentials",
      "kind": "context",
      "ere": "[a-z][a-z0-9+.-]{0,31}://[^[:space:]/:@]{1,255}:[^[:space:]/@]+@",
      "left": "word"
    },
    {
      "id": "bearer-header",
      "label": "Authorization header with a token",
      "kind": "context",
      "ere": "Authorization:[[:space:]]*(Bearer|Basic)[[:space:]]+[A-Za-z0-9._~+/=-]{16,}",
      "left": "word",
      "ignoreCase": true
    }
  ],
  "providers": [
    {
      "id": "github-pat",
      "rule": "github-pat",
      "prefix": "ghp_",
      "fill": "A",
      "len": 36,
      "suffix": ""
    },
    {
      "id": "github-fine-grained",
      "rule": "github-fine-grained-pat",
      "prefix": "github_pat_",
      "fill": "A",
      "len": 66,
      "suffix": ""
    },
    {
      "id": "slack",
      "rule": "slack-token",
      "prefix": "xoxb-",
      "fill": "A",
      "len": 16,
      "suffix": ""
    },
    {
      "id": "slack-app",
      "rule": "slack-app-token",
      "prefix": "xapp-1-A0BBBBBBBB-7777777777777-",
      "fill": "c",
      "len": 64,
      "suffix": ""
    },
    {
      "id": "aws",
      "rule": "aws-access-key-id",
      "prefix": "AKIA",
      "fill": "A",
      "len": 16,
      "suffix": ""
    },
    {
      "id": "aws-sts",
      "rule": "aws-access-key-id",
      "prefix": "ASIA",
      "fill": "A",
      "len": 16,
      "suffix": ""
    },
    {
      "id": "aws-run-on",
      "rule": "aws-access-key-id",
      "prefix": "AKIA",
      "fill": "B",
      "len": 16,
      "suffix": "EXAMPLE7"
    },
    {
      "id": "aws-secret-access-key",
      "rule": "aws-secret-access-key",
      "prefix": "aws_secret_access_key = ",
      "fill": "A",
      "len": 40,
      "suffix": ""
    },
    {
      "id": "aws-session-token",
      "rule": "aws-session-token",
      "prefix": "aws_session_token = ",
      "fill": "A",
      "len": 120,
      "suffix": ""
    },
    {
      "id": "sendgrid",
      "rule": "sendgrid-key",
      "prefix": "SG.",
      "fill": "A",
      "len": 22,
      "suffix": ".BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
    },
    {
      "id": "twilio",
      "rule": "twilio-api-key",
      "prefix": "SK",
      "fill": "a",
      "len": 32,
      "suffix": ""
    },
    {
      "id": "private-key-pgp",
      "rule": "private-key-block",
      "prefix": "-----BEGIN PGP PRIVATE",
      "fill": "",
      "len": 0,
      "suffix": " KEY BLOCK-----"
    },
    {
      "id": "google",
      "rule": "google-api-key",
      "prefix": "AIza",
      "fill": "A",
      "len": 35,
      "suffix": ""
    },
    {
      "id": "npm",
      "rule": "npm-token",
      "prefix": "npm_",
      "fill": "A",
      "len": 36,
      "suffix": ""
    },
    {
      "id": "gitlab",
      "rule": "gitlab-pat",
      "prefix": "glpat-",
      "fill": "A",
      "len": 20,
      "suffix": ""
    },
    {
      "id": "stripe",
      "rule": "stripe-key",
      "prefix": "sk_live_",
      "fill": "A",
      "len": 20,
      "suffix": ""
    },
    {
      "id": "anthropic",
      "rule": "anthropic-key",
      "prefix": "sk-ant-",
      "fill": "A",
      "len": 36,
      "suffix": ""
    },
    {
      "id": "openai",
      "rule": "openai-key",
      "prefix": "sk-proj-",
      "fill": "A",
      "len": 36,
      "suffix": ""
    },
    {
      "id": "perplexity",
      "rule": "perplexity-key",
      "prefix": "pplx-",
      "fill": "A",
      "len": 36,
      "suffix": ""
    },
    {
      "id": "groq",
      "rule": "groq-key",
      "prefix": "gsk_",
      "fill": "A",
      "len": 52,
      "suffix": ""
    },
    {
      "id": "openrouter",
      "rule": "openrouter-key",
      "prefix": "sk-or-v1-",
      "fill": "a",
      "len": 64,
      "suffix": ""
    },
    {
      "id": "huggingface",
      "rule": "huggingface-token",
      "prefix": "hf_",
      "fill": "A",
      "len": 32,
      "suffix": ""
    },
    {
      "id": "figma-pat",
      "rule": "figma-token",
      "prefix": "figd_",
      "fill": "A",
      "len": 24,
      "suffix": ""
    },
    {
      "id": "figma-mcp",
      "rule": "figma-token",
      "prefix": "figu_",
      "fill": "A",
      "len": 24,
      "suffix": ""
    },
    {
      "id": "service-account",
      "rule": "service-account-json",
      "prefix": "\"type\": \"service_",
      "fill": "",
      "len": 0,
      "suffix": "account\""
    },
    {
      "id": "url-with-credentials",
      "rule": "url-with-credentials",
      "prefix": "https://user:",
      "fill": "s",
      "len": 12,
      "suffix": "@example.com/x.git"
    },
    {
      "id": "url-with-credentials-300",
      "rule": "url-with-credentials",
      "prefix": "https://user:",
      "fill": "s",
      "len": 300,
      "suffix": "@example.com/x.git"
    },
    {
      "id": "url-with-credentials-2000",
      "rule": "url-with-credentials",
      "prefix": "https://user:",
      "fill": "s",
      "len": 2000,
      "suffix": "@example.com/x.git"
    },
    {
      "id": "bearer-header",
      "rule": "bearer-header",
      "prefix": "Authorization: Bearer ",
      "fill": "A",
      "len": 24,
      "suffix": ""
    },
    {
      "id": "jwt",
      "rule": "jwt",
      "prefix": "eyJ",
      "fill": "A",
      "len": 20,
      "suffix": ".eyJBBBBBBBBBBBB.CCCCCCCCCCCC"
    }
  ]
}
