[detector]
id = "base-api-credentials"
name = "Base Chain API Credentials"
service = "base"
severity = "high"
keywords = ["base", "BASE", "base.org", "basescan", "base-mainnet"]
[[detector.patterns]]
regex = '(?:base|BASE)[._-]?(?:rpc|RPC)[._-]?(?:url|URL|endpoint)[=:" \s]+(https?://[a-zA-Z0-9._-]+\.g\.alchemy\.com/v2/[a-zA-Z0-9_-]+)'
description = "Base chain RPC URL with Alchemy API key"
group = 1
[[detector.patterns]]
regex = '(?:base|BASE)[._-]?(?:rpc|RPC)[._-]?(?:url|URL|endpoint)[=:" \s]+(https?://[a-zA-Z0-9._-]+/base/[a-zA-Z0-9_-]+)'
description = "Base chain RPC URL with embedded access token"
group = 1
[[detector.patterns]]
regex = '(?:base|BASE)[._-]?(?:rpc|RPC)[._-]?(?:url|URL|endpoint)[=:" \s]+(https?://[a-zA-Z0-9._-]+/8453/[a-zA-Z0-9_-]+)'
description = "Base chain RPC URL with chain ID and API key"
group = 1
[[detector.patterns]]
regex = '(?:base|BASE)[._-]?(?:api|API)[._-]?key[=:" \s]+([a-f0-9]{32})'
description = "Base chain API key (32 hex characters)"
group = 1