piighost/anthropic-api-key

Anthropic API key: the sk-ant-api user prefix and the sk-ant-admin admin prefix, the two version digits left open so a later rotation still matches. Noise is very low, the sk-ant- prefix belongs to no one else, and the loose bound of eighty to a hundred and twenty key characters is the only source of over-matching. Collision: the existing openai-api-key swallowed the identical span until its regex was given the (?!ant-) exclusion, which labelled every Anthropic key OPENAI_API_KEY. Keep that exclusion in place, or the two patterns fight over the same span again.

Label: ANTHROPIC_API_KEY

Pattern

\bsk-ant-(?:api|admin)\d{2}-[A-Za-z0-9_-]{80,120}(?![A-Za-z0-9_-])

Must be caught

Must be left alone

Tags: international, secrets, software-dev

Download the detector as TOML