U

Ultimate Insecure Defaults Detector Workshop

Professional-grade skill designed for detect hardcoded secrets and insecure configurations. Built for Claude Code with best practices and real-world patterns.

SkillCommunitysecurityv1.0.0MIT
0 views0 copies

Insecure Defaults Detector

Automated security scanner that identifies insecure default configurations in applications, frameworks, databases, cloud services, and infrastructure components before deployment.

When to Use This Skill

Choose Insecure Defaults Detector when:

  • Setting up new application frameworks and need secure baseline configs
  • Auditing existing configurations for known insecure defaults
  • Hardening cloud infrastructure before production deployment
  • Reviewing database and middleware configurations
  • Building security baseline policies for new technology adoptions

Consider alternatives when:

  • Need runtime vulnerability detection — use DAST tools
  • Need compliance-specific checks — use CIS Benchmark scanners
  • Performing code-level security analysis — use SAST tools

Quick Start

# Activate insecure defaults detector claude skill activate ultimate-insecure-defaults-detector-workshop # Scan application configs claude "Check for insecure defaults in our Express.js configuration" # Database hardening claude "Audit PostgreSQL default configuration for security issues"

Example Default Detection

// Common insecure defaults in Express.js const express = require('express'); const app = express(); // INSECURE DEFAULT: X-Powered-By header reveals framework // Fix: app.disable('x-powered-by'); // INSECURE DEFAULT: No rate limiting // Fix: app.use(rateLimit({ windowMs: 15 * 60 * 1000, max: 100 })); // INSECURE DEFAULT: No CORS restrictions // Fix: app.use(cors({ origin: 'https://yourdomain.com' })); // INSECURE DEFAULT: Body parser with unlimited size // Fix: app.use(express.json({ limit: '10kb' })); // INSECURE DEFAULT: No security headers // Fix: app.use(helmet()); // INSECURE DEFAULT: Verbose error messages in production // Fix: app.use((err, req, res, next) => { // res.status(500).json({ error: 'Internal Server Error' }); // }); // INSECURE DEFAULT: Session with default secret // Fix: app.use(session({ // secret: process.env.SESSION_SECRET, // Not 'keyboard cat' // cookie: { secure: true, httpOnly: true, sameSite: 'strict' } // }));

Core Concepts

Common Insecure Defaults by Category

CategoryInsecure DefaultSecure Alternative
Web FrameworkDebug mode enabledDisable debug in production
Web FrameworkVerbose error responsesGeneric error messages
DatabaseRoot/admin without passwordStrong password + least privilege
DatabaseListening on 0.0.0.0Bind to localhost or private IP
CloudPublic S3 bucketsPrivate with explicit access policies
CloudDefault VPC security groupsRestrictive ingress/egress rules
AuthNo password complexityMinimum 12 chars, complexity rules
AuthUnlimited login attemptsAccount lockout after 5 failures
TLSAll cipher suites enabledTLS 1.2+ with strong ciphers only
LoggingSensitive data loggedPII masking in all log outputs

Technology-Specific Checks

TechnologyKey Defaults to ChangeRisk Level
PostgreSQLlisten_addresses = '*', no pg_hba.conf restrictionsCritical
MongoDBNo authentication, bind to all interfacesCritical
RedisNo password, protected-mode offCritical
NginxServer tokens on, autoindex onMedium
DockerRunning as root, no resource limitsHigh
KubernetesNo network policies, default service accountHigh
AWSPublic access on new resources, overprivileged IAMCritical
Node.jsNo helmet, no rate limiting, trust proxy offHigh
# Kubernetes insecure defaults to fix apiVersion: v1 kind: Pod spec: containers: - name: app # INSECURE: Running as root (default) # FIX: securityContext: runAsNonRoot: true runAsUser: 1000 readOnlyRootFilesystem: true allowPrivilegeEscalation: false capabilities: drop: ["ALL"] # INSECURE: No resource limits (default) # FIX: resources: limits: memory: "256Mi" cpu: "500m" requests: memory: "128Mi" cpu: "250m"

Configuration

ParameterDescriptionDefault
scan_targetsTechnologies to scanAuto-detect
severity_thresholdMinimum severity to reportmedium
include_fixesInclude remediation commandstrue
check_cloudScan cloud provider configstrue
output_formatReport format: markdown, json, sarifmarkdown
baseline_fileKnown accepted risks to suppressnull

Best Practices

  1. Audit defaults immediately when adopting new technology — Don't wait for a security review cycle. The first deployment of any new technology should include a default configuration audit. Create a hardening checklist specific to each technology in your stack.

  2. Automate default detection in CI/CD pipelines — Add configuration scanning to your deployment pipeline. Tools like checkov (Terraform), hadolint (Dockerfile), and kubesec (Kubernetes) catch insecure defaults before they reach production.

  3. Maintain a secure baseline configuration library — Create templated, hardened configurations for every technology in your stack. New projects start from these templates rather than framework defaults, eliminating entire classes of insecure defaults by default.

  4. Document every accepted risk — When business requirements force accepting an insecure default (e.g., public S3 bucket for static assets), document the risk, mitigation controls (CloudFront + WAF), and review schedule in a risk register.

  5. Review defaults after every major version upgrade — Framework and database upgrades sometimes change default values. A default that was secure in PostgreSQL 14 might change behavior in PostgreSQL 16. Review release notes specifically for default value changes.

Common Issues

Security scanner flags defaults that are already overridden in runtime configuration. Scanners may read configuration files without understanding runtime overrides, environment variables, or infrastructure-level controls. Document which defaults are overridden and where, and use scanner suppression with justification comments for verified-safe configurations.

Hardening defaults breaks application functionality. Some insecure defaults exist because the secure alternative requires additional setup. For example, enabling readOnlyRootFilesystem in Kubernetes breaks applications that write to temporary files. Fix by adding explicit emptyDir volume mounts for write-needed paths rather than reverting to insecure defaults.

Team members reset configurations to defaults during troubleshooting. Use infrastructure-as-code and gitops to manage all configurations. When someone manually changes a config for debugging, the IaC system reverts it on next deployment. Add pre-commit hooks that validate configuration files against your security baseline before allowing commits.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates