insecure-defaults — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited insecure-defaults (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Identifies fail-open vulnerabilities: configurations where missing env vars, secrets, or settings cause the application to run in an insecure state rather than failing safely.
.env handling, or secrets managementtests/, spec/, __tests__/, *.test.*) — test defaults are intentional.example, .template, .sample files — placeholders by designThe fundamental question for every finding:
Fail-Open (DANGEROUS): App runs insecurely when config is absent
# DANGEROUS — runs with weak secret if env var missing
SECRET = os.environ.get('SECRET_KEY') or 'default-secret'Fail-Secure (SAFE): App crashes/refuses to start when required config is absent
# SAFE — raises KeyError if env var missing, app won't start
SECRET = os.environ['SECRET_KEY']
# Also safe — explicit error message
SECRET = os.environ.get('SECRET_KEY')
if not SECRET:
raise RuntimeError("SECRET_KEY environment variable is required")Map the attack surface:
# Find all env var reads
grep -rn "os.environ\|os.getenv\|process.env\|getenv" --include="*.py" --include="*.ts" --include="*.js" .
# Find all config/settings files
find . -name "config*.py" -o -name "settings*.py" -o -name "*.env*" | grep -v ".example"
# Find potential hardcoded secrets
grep -rn "password\|secret\|token\|api_key\|apikey\|credential" -i --include="*.py" .
grep -rn "password\|secret\|token\|api_key\|apikey\|credential" -i --include="*.ts" .Inventory:
For each env var read, classify:
| Pattern | Classification | Risk |
|---|---|---|
os.environ['KEY'] | Fail-secure | Safe |
os.environ.get('KEY') with no default + validation | Fail-secure | Safe |
os.environ.get('KEY', '') + if not value: raise | Fail-secure | Safe |
os.environ.get('KEY') or 'fallback' | Fail-open | HIGH |
os.environ.get('KEY', 'fallback') | Fail-open | HIGH |
os.environ.get('KEY', None) used without None-check | Fail-open | MEDIUM |
Trace each fail-open pattern: where is the value used?
Verify whether production actually sets required variables:
docker-compose.yml, k8s/, .env.production, CI/CD secretsA fail-open pattern is more severe if:
For each finding:
## [Severity] <Short title>
**File:** path/to/file.py:42
**Pattern:** fail-open / hardcoded / weak algorithm
**Vulnerable code:**SECRET = os.environ.get('SECRET_KEY') or 'dev-secret-change-me'
**What happens if env var is missing:**
Application starts with `SECRET_KEY = 'dev-secret-change-me'`. An attacker
who knows this default can forge session tokens / HMAC signatures.
**Fix:**SECRET = os.environ.get('SECRET_KEY') if not SECRET: raise RuntimeError("SECRET_KEY is required. Set it in your environment.")
# All of these are fail-open:
SECRET = os.getenv('SECRET') or 'default'
SECRET = os.environ.get('SECRET', 'changeme')
DB_PASSWORD = config.get('db_password', 'postgres')
API_KEY = os.environ.get('API_KEY', '') # empty string = no auth# Hardcoded in source — always a finding regardless of context
DB_URI = "postgresql://admin:password123@localhost/prod"
AWS_SECRET = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"# Weak — even if fallback looks "fine"
hashlib.md5(password) # collision attacks, rainbow tables
hashlib.sha1(password) # deprecated for password hashing
Cipher.new(key, AES.MODE_ECB) # ECB reveals patterns
DES.new(key) # 56-bit key, brute-forceableCORS_ORIGINS = ["*"] # any origin can send cookies
DEBUG = os.environ.get('DEBUG', True) # debug on by default
ALLOW_REGISTRATION = True # open registration in productionrequests.get(url, verify=False) # MITM possible
ssl._create_unverified_context() # disables cert validation globally# docker-compose.yml
services:
db:
environment:
POSTGRES_PASSWORD: "" # empty password
# nginx.conf
server_tokens on; # leaks nginx version| Severity | When |
|---|---|
| 🔴 Critical | Fail-open on auth/crypto/session secret; hardcoded production credential |
| 🟠 High | Fail-open on API key, DB password; weak algorithm for security-critical data |
| 🟡 Medium | Permissive CORS/access defaults; weak algorithm for non-critical data |
| 🟢 Low | Missing startup validation despite correct production config; undocumented required var |
# Insecure Defaults Audit: <scope>
## Summary
- Fail-open patterns found: X
- Hardcoded credentials found: X
- Weak algorithms found: X
- Files audited: X / Y total
## 🔴 Critical
### [C1] Fail-open session secret
...
## 🟠 High
...
## ✅ What's secure
- `DATABASE_URL` correctly uses `os.environ['DATABASE_URL']` (fail-secure)
- Password hashing uses `bcrypt` correctly~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.