ci_cd/TEST_KEY_PATTERNS.md
Standard patterns for test/mock keys and credentials in the LiteLLM codebase to avoid triggering secret detection.
GitGuardian uses machine learning and entropy analysis, not just pattern matching:
sk-1234, postgres) are automatically ignoredos.environ["KEY"]These won't trigger GitGuardian's ML detector:
api_key = "sk-1234"
api_key = "sk-12345"
database_password = "postgres"
token = "test123"
If you need realistic-looking test keys with high entropy, use these prefixes:
api_key = "sk-test-abc123def456ghi789..." # OpenAI-style test key
api_key = "sk-mock-1234567890abcdef1234..." # Mock key
api_key = "sk-fake-xyz789uvw456rst123..." # Fake key
token = "test-api-key-with-high-entropy"
These patterns are in .gitguardian.yaml for high-entropy test keys:
sk-test-* - OpenAI-style test keyssk-mock-* - Mock API keyssk-fake-* - Fake API keystest-api-key - Generic test tokens