[
  {
    "id": "github-fine-grained-pat",
    "name": "GitHub fine-grained personal access token",
    "description": "github_pat_ prefix followed by 22+ [A-Za-z0-9_]. Listed before github-pat so a fine-grained body that happens to contain ghp_ is consumed whole.",
    "regex": "github_pat_[A-Za-z0-9_]{22,255}",
    "flags": "",
    "severity": "critical",
    "context": [
      "tool-input",
      "tool-output"
    ]
  },
  {
    "id": "github-pat",
    "name": "GitHub token (ghp/gho/ghu/ghs/ghr)",
    "description": "GitHub classic PAT / OAuth / user-to-server / server-to-server / refresh token: 3-letter prefix, underscore, 36-255 alphanumerics.",
    "regex": "(?:ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9]{36,255}",
    "flags": "",
    "severity": "critical",
    "context": [
      "tool-input",
      "tool-output"
    ]
  },
  {
    "id": "aws-secret-key",
    "name": "AWS secret access key (context-anchored)",
    "description": "40+ chars of [A-Za-z0-9/+] ONLY when preceded by an AWS secret-key name (aws_secret_access_key, AWS_SECRET_KEY, SecretAccessKey, secretAccessKey, --aws-secret-access-key ...) plus a separator (:, =, =>, or whitespace) with optional quotes/escaped quotes. A bare 40-char base62 run is deliberately NOT matched: it is indistinguishable from a 40-hex git SHA. The match consumes the key name and separator. Listed before aws-access-key so an AKIA-looking prefix inside the value cannot split the secret.",
    "regex": "(?:aws[_.-]?secret[_.-]?(?:access[_.-]?)?key|secret[_.-]?access[_.-]?key)[\\\\\"']{0,4}(?:[ \\t]*(?::|=>?)[ \\t\\r\\n]*|[ \\t]+)[\\\\\"']{0,4}[A-Za-z0-9/+]{40,}",
    "flags": "i",
    "severity": "critical",
    "context": [
      "tool-input",
      "tool-output"
    ]
  },
  {
    "id": "aws-access-key",
    "name": "AWS access key ID",
    "description": "AKIA (long-term) or ASIA (STS temporary) followed by 16 uppercase alphanumerics. No boundary anchors (no lookbehind available): fails closed, may over-redact inside long uppercase blobs.",
    "regex": "(?:AKIA|ASIA)[0-9A-Z]{16}",
    "flags": "",
    "severity": "high",
    "context": [
      "tool-input",
      "tool-output"
    ]
  },
  {
    "id": "generic-bearer",
    "name": "HTTP Bearer token",
    "description": "Bearer (any case) + horizontal whitespace + 16+ token chars [A-Za-z0-9._~+/-] + optional = padding. Spec said '+'; 16+ avoids redacting prose such as 'bearer of'. Token class excludes '[' so it can never extend into a [REDACTED:..] marker.",
    "regex": "bearer[ \\t]+[A-Za-z0-9._~+/-]{16,}=*",
    "flags": "i",
    "severity": "high",
    "context": [
      "tool-input",
      "tool-output"
    ]
  },
  {
    "id": "password-in-url",
    "name": "Credentials embedded in URL",
    "description": "scheme://user:password@ . Scheme bounded to 30 chars (avoids quadratic scans on long alnum runs). User/password classes exclude whitespace, quotes, backslash, '/', '@', angle brackets and backtick, so a match cannot cross whitespace, a JSON string quote, or a path. Must stay LAST in the array: its password class accepts '[' and ':' so it can swallow earlier [REDACTED:..] markers (harmless, single pass), and nothing after it can re-form.",
    "regex": "[A-Za-z][A-Za-z0-9+.-]{0,30}://[^ \\t\\r\\n\"'\\\\/@:?#<>`]*:[^ \\t\\r\\n\"'\\\\/@<>`]+@",
    "flags": "",
    "severity": "high",
    "context": [
      "tool-input",
      "tool-output"
    ]
  }
]
