Overview
The insecure-defaults plugin identifies security vulnerabilities caused by dangerous default values that allow applications to run in production with weak or missing security controls. It distinguishes between fail-secure patterns (app crashes) and fail-open patterns (app runs insecurely).Author: Trail of Bits
Version: 1.0.0
Version: 1.0.0
Critical Distinction: Applications that crash without proper configuration are safe (fail-secure). Applications that run with insecure defaults are vulnerable (fail-open).
Vulnerability Categories
The plugin detects five categories of insecure defaults:Hardcoded Fallback Secrets
JWT keys, API keys, session secrets with fallback values
Default Credentials
admin/admin, root/password, test API keys
Weak Cryptographic Defaults
MD5, DES, ECB mode for security-sensitive operations
Permissive Access Control
CORS *, public by default, world-writable permissions
Missing Security Configuration
Authentication disabled by default, debug mode enabled
When to Use
Use this skill when:- Security auditing production applications or services
- Configuration review of deployment manifests (Docker, Kubernetes, IaC)
- Pre-production checks before deploying new services
- Code review of authentication, authorization, or cryptographic code
- Environment variable handling analysis for secrets management
- API security review checking CORS, rate limiting, authentication
- Third-party integration review for hardcoded test credentials
When NOT to Use
Do not use this skill for:- Test fixtures explicitly scoped to test environments (
test/,spec/,__tests__/) - Example/template files (
.example,.template,.samplesuffixes) - Development-only tools (local Docker Compose for dev, debug scripts)
- Documentation examples in README.md or docs/ directories
- Build-time configuration that gets replaced during deployment
- Crash-on-missing behavior where app won’t start without proper config (fail-secure)
Installation
Workflow
Follow this workflow for every potential finding:SEARCH: Project Discovery
Determine language, framework, and project conventions. Find secret storage locations, credentialed integrations, cryptography usage, and security configuration.
VERIFY: Actual Behavior
Trace code paths to understand runtime behavior. Determine what happens if configuration is missing.
CONFIRM: Production Impact
Check if production config provides the variable or if the insecure default reaches production.
Category 1: Fallback Secrets
Vulnerable Patterns
Secure Patterns
Category 2: Default Credentials
Vulnerable Patterns
Secure Patterns
Disabled default account
Category 3: Fail-Open Security
Vulnerable Patterns
Secure Patterns
Category 4: Weak Crypto
Vulnerable Patterns
- MD5 is cryptographically broken, rainbow tables exist
- DES has 56-bit keys (brute-forceable), ECB mode leaks patterns
- SHA1 collisions exist
Secure Patterns
Weak crypto for non-security checksums (cache keys, ETags) is acceptable.
Category 5: Permissive Access
Vulnerable Patterns
- Any user can write to file (should be 0o600 or 0o644)
- Sensitive data exposed publicly
- CORS misconfiguration allows credential theft from any site
Search Patterns
Use these grep patterns to discover insecure defaults:Fallback Secrets
Fallback Secrets
Hardcoded Credentials
Hardcoded Credentials
Weak Defaults
Weak Defaults
Crypto Algorithms
Crypto Algorithms
Rationalizations to Reject
| Rationalization | Why It’s Wrong |
|---|---|
| ”It’s just a development default” | If it reaches production code, it’s a finding |
| ”The production config overrides it” | Verify prod config exists; code-level vulnerability remains |
| ”This would never run without proper config” | Prove it with code trace; many apps fail silently |
| ”It’s behind authentication” | Defense in depth; compromised session still exploits weak defaults |
| ”We’ll fix it before release” | Document now; “later” rarely comes |
Report Format
For each finding, document:Related Skills
- Audit Context Building - Understand security architecture
- Differential Review - Review config changes in PRs