What We Detect
API Keys & Tokens
AWS, Azure, GCP, GitHub, and 200+ services
Database Credentials
Connection strings and passwords
Private Keys
SSH keys and TLS certificates
Authentication Tokens
JWTs and OAuth tokens
Detection Methods
Pattern-Based Detection
Deterministic pattern matching using regex patterns for known secret formats and high-entropy string analysis.Contextual Analysis
Contextual analysis reduces false positives by examining code context. Placeholders like “your-api-key-here” are automatically excluded. View complete secrets support matrix →Scan Coverage
Source Code
Scans all code files across supported languages: Python, JavaScript, TypeScript, Java, Go, Ruby, PHP, C/C++, C#, Shell scripts, and more.Configuration Files
- Environment files (.env, .env.local)
- Config files (config.json, settings.yml)
- CI/CD configs (.github/workflows, .gitlab-ci.yml)
- Docker and Kubernetes configs
Git History
Secrets remain in git history even after removal. CodeThreat scans full commit history to detect past exposures.Secret Types
Cloud Provider Credentials
- AWS: Access keys, session tokens, account IDs
- Azure: Connection strings, storage keys, service principals
- GCP: Service account JSON files, API keys
Third-Party Services
- Development: GitHub, GitLab, NPM, Docker Hub tokens
- Payment: Stripe, PayPal credentials
- Communication: Slack, Twilio, SendGrid API keys
- Monitoring: Datadog, Sentry, PagerDuty tokens
Remediation
Immediate Actions
- Revoke exposed credential via service provider
- Generate new credential
- Update all systems using the credential
- Remove secret from git history if publicly exposed
Secret Management
Integrate with secret management services:- HashiCorp Vault
- AWS Secrets Manager
- Azure Key Vault
- GCP Secret Manager
Configuration
Configure secret detection in repository settings:- Enable/disable secret scanning
- Set entropy threshold
- Configure scan paths
- Exclude test files and mock data
Best Practices
- Never commit secrets to version control
- Use environment variables or secret managers
- Scan regularly on all branches
- Rotate exposed credentials immediately
- Audit secret access regularly
