[detector]
id = "fantom-api-credentials"
name = "Fantom API Credentials"
service = "fantom"
severity = "high"
keywords = ["fantom", "FANTOM", "ftm", "FTM", "ftmscan", "fantom.network"]
[[detector.patterns]]
regex = '(?:fantom|FANTOM|ftm|FTM)[._-]?(?:rpc|RPC)[._-]?(?:url|URL|endpoint)[=:" \s]+(https?://[a-zA-Z0-9._-]+\.fantom\.[a-z]+/[a-zA-Z0-9_-]+)'
description = "Fantom RPC URL with embedded access token"
group = 1
[[detector.patterns]]
regex = '(?:fantom|FANTOM|ftm|FTM)[._-]?(?:rpc|RPC)[._-]?(?:url|URL|endpoint)[=:" \s]+(https?://[a-zA-Z0-9._-]+/v2/[a-zA-Z0-9_-]+)'
description = "Fantom RPC URL with API version and key"
group = 1
[[detector.patterns]]
regex = '(?:fantom|FANTOM|ftm|FTM)[._-]?(?:api|API)[._-]?key[=:" \s]+([a-f0-9]{32})'
description = "Fantom API key (32 hex characters)"
group = 1