insecure-defaults
- Repo stars 5,723
- Forks 499
- Author updated Jun 15, 2026, 04:05 PM
- Author repo skills
- Domain
- Other
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @trailofbits · no license declared
- Token usage
- Lean
- Setup complexity
- Manual integration
- External API key
- Not required
- Operating systems
- Docker
- Runtime requirements
- Docker
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Env read
- Network behavior
- External requests
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: insecure-defaults
description: Detects fail-open insecure defaults (hardcoded secrets, weak auth, permissive security) that all…
category: other
runtime: Docker
---
# insecure-defaults output preview
## PART A: Task fit
- Use case: Detects fail-open insecure defaults (hardcoded secrets, weak auth, permissive security) that allow apps to run insecurely in production. Use when auditing security, reviewing config management, or analyzing environment variable handling..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “When to Use / When NOT to Use / Rationalizations to Reject” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Detects fail-open insecure defaults (hardcoded secrets, weak auth, permissive security) that allow apps to run insecurely in production. Use when auditing security, reviewing config management, or analyzing environment variable handling.”.
- **02** When the source has headings, the agent prioritizes “When to Use / When NOT to Use / Rationalizations to Reject” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands, read environment variables; may access external network resources; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands, read environment variables; may access external network resources; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands, read environment variables.
Start with a small task and check whether the result follows “When to Use / When NOT to Use / Rationalizations to Reject”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: insecure-defaults
description: Detects fail-open insecure defaults (hardcoded secrets, weak auth, permissive security) that all…
category: other
source: trailofbits/skills
---
# insecure-defaults
## When to use
- Detects fail-open insecure defaults (hardcoded secrets, weak auth, permissive security) that allow apps to run insecur…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “When to Use / When NOT to Use / Rationalizations to Reject” and keep inference separate from source facts.
- read files, write/modify files, run shell commands, read environment variables; may access external network resources; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "insecure-defaults" {
input -> user goal + target files + boundaries + acceptance criteria
context -> When to Use / When NOT to Use / Rationalizations to Reject
rules -> SKILL.md triggers / order / output contract
runtime -> Docker | read files, write/modify files, run shell commands, read environment variables | may access external network resources
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Insecure Defaults Detection
Finds fail-open vulnerabilities where apps run insecurely with missing configuration. Distinguishes exploitable defaults from fail-secure patterns that crash safely.
- Fail-open (CRITICAL):
SECRET = env.get('KEY') or 'default'→ App runs with weak secret - Fail-secure (SAFE):
SECRET = env['KEY']→ App crashes if missing
When to Use
- Security audits of production applications (auth, crypto, API security)
- Configuration review of deployment files, IaC templates, Docker configs
- Code review of environment variable handling and secrets management
- Pre-deployment checks for hardcoded credentials or weak defaults
When NOT to Use
Do not use this skill for:
- Test fixtures explicitly scoped to test environments (files in
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)
When in doubt: trace the code path to determine if the app runs with the default or crashes.
Rationalizations to Reject
- "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 if not
- "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
Workflow
Follow this workflow for every potential finding:
1. SEARCH: Perform Project Discovery and Find Insecure Defaults
Determine language, framework, and project conventions. Use this information to further discover things like secret storage locations, secret usage patterns, credentialed third-party integrations, cryptography, and any other relevant configuration. Further use information to analyze insecure default configurations.
Example
Search for patterns in **/config/, **/auth/, **/database/, and env files:
- Fallback secrets:
getenv.*\) or ['"],process\.env\.[A-Z_]+ \|\| ['"],ENV\.fetch.*default: - Hardcoded credentials:
password.*=.*['"][^'"]{8,}['"],api[_-]?key.*=.*['"][^'"]+['"] - Weak defaults:
DEBUG.*=.*true,AUTH.*=.*false,CORS.*=.*\* - Crypto algorithms:
MD5|SHA1|DES|RC4|ECBin security contexts
Tailor search approach based on discovery results.
Focus on production-reachable code, not test fixtures or example files.
2. VERIFY: Actual Behavior
For each match, trace the code path to understand runtime behavior.
Questions to answer:
- When is this code executed? (Startup vs. runtime)
- What happens if a configuration variable is missing?
- Is there validation that enforces secure configuration?
3. CONFIRM: Production Impact
Determine if this issue reaches production:
If production config provides the variable → Lower severity (but still a code-level vulnerability) If production config missing or uses default → CRITICAL
4. REPORT: with Evidence
Example report:
Finding: Hardcoded JWT Secret Fallback
Location: src/auth/jwt.ts:15
Pattern: const secret = process.env.JWT_SECRET || 'default';
Verification: App starts without JWT_SECRET; secret used in jwt.sign() at line 42
Production Impact: Dockerfile missing JWT_SECRET
Exploitation: Attacker forges JWTs using 'default', gains unauthorized access
Quick Verification Checklist
Fallback Secrets: SECRET = env.get(X) or Y
→ Verify: App starts without env var? Secret used in crypto/auth?
→ Skip: Test fixtures, example files
Default Credentials: Hardcoded username/password pairs
→ Verify: Active in deployed config? No runtime override?
→ Skip: Disabled accounts, documentation examples
Fail-Open Security: AUTH_REQUIRED = env.get(X, 'false')
→ Verify: Default is insecure (false/disabled/permissive)?
→ Safe: App crashes or default is secure (true/enabled/restricted)
Weak Crypto: MD5/SHA1/DES/RC4/ECB in security contexts → Verify: Used for passwords, encryption, or tokens? → Skip: Checksums, non-security hashing
Permissive Access: CORS *, permissions 0777, public-by-default
→ Verify: Default allows unauthorized access?
→ Skip: Explicitly configured permissiveness with justification
Debug Features: Stack traces, introspection, verbose errors → Verify: Enabled by default? Exposed in responses? → Skip: Logging-only, not user-facing
For detailed examples and counter-examples, see examples.md.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review