Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jwynia avatar

Config Scan

  • 256 installs
  • 133 repo stars
  • Updated February 24, 2026
  • jwynia/agent-skills

config-scan is a security review skill that scans project configuration files for misconfigurations, secret leaks, and insecure defaults for developers preparing a release or running appsec audits.

About

config-scan is a version 1.0 MIT-licensed utility skill by jwynia that performs evaluative security review of configuration files and infrastructure-as-code. Developers invoke /config-scan to scan all config files or narrow scope with --docker, --k8s, --terraform, or --env flags for container definitions, Kubernetes manifests, Terraform modules, and environment settings. The skill targets secrets exposure, insecure defaults, and environment-specific risks before merge or production deploy. It fits pre-release checklists and periodic security audits where misconfigured ports, overly permissive IAM, or committed credentials would otherwise slip past code review. Output is review-oriented rather than auto-remediation, keeping humans in the loop for fixes while giving agents a consistent audit command across polyglot repos mixing app config and IaC.

  • Secrets detection
  • Misconfiguration alerts
  • Env file audit
  • Policy compliance
  • Pre-release gate

Config Scan by the numbers

  • 256 all-time installs (skills.sh)
  • +2 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #676 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jwynia/agent-skills --skill config-scan

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs256
repo stars133
Last updatedFebruary 24, 2026
Repositoryjwynia/agent-skills

How do you scan Terraform for security misconfigurations?

Scan project configuration files for misconfigurations, secrets exposure, insecure defaults, and environment-specific risks before release or during security audits.

Who is it for?

Developers auditing container, Kubernetes, Terraform, or environment configs for secret leaks and insecure defaults before shipping or during security review.

Skip if: Dynamic penetration testing, runtime vulnerability scanning of running services, or application logic bug finding in business code.

When should I use this skill?

Configuration files, Docker Compose, Kubernetes manifests, Terraform, or .env files change and need a pre-release security misconfiguration pass.

What you get

Security findings report covering Docker, Kubernetes, Terraform, or .env misconfigurations with flagged secrets and insecure defaults.

  • Security findings list
  • Flagged secret exposures
  • Insecure default report

By the numbers

  • Skill version 1.0
  • Supports 4 targeted scan modes: --docker, --k8s, --terraform, --env

Files

SKILL.mdMarkdownGitHub ↗

Config Scan

Security review of configuration files and infrastructure as code.

Quick Start

/config-scan                      # Scan all config files
/config-scan --docker             # Docker files only
/config-scan --k8s                # Kubernetes manifests
/config-scan --terraform          # Terraform files
/config-scan --env                # Environment files

What This Skill Detects

Environment Files

  • Secrets in .env files
  • Insecure default values
  • Missing required security variables

Docker Security

  • Running as root
  • Exposed sensitive ports
  • Insecure base images
  • Missing security options

Kubernetes Security

  • Privileged containers
  • Missing resource limits
  • Insecure service accounts
  • Network policy gaps

Infrastructure as Code

  • Overly permissive IAM policies
  • Public S3 buckets
  • Unencrypted storage
  • Missing security groups

Application Config

  • Debug mode enabled
  • Verbose error messages
  • Insecure defaults

Scan Categories

Environment Files

Files scanned: .env, .env.*, *.env

IssueSeverityDescription
Secrets in .envHIGHCredentials should use secrets manager
.env committedCRITICALShould be in .gitignore
DEBUG=trueHIGHDebug mode in production config
Weak secretsMEDIUMShort or simple values

Detection patterns:

# Committed .env files
git ls-files | grep -E '\.env$|\.env\.'

# Secrets in env files
(PASSWORD|SECRET|KEY|TOKEN|CREDENTIAL)=.+

# Debug flags
DEBUG=(true|1|yes)
NODE_ENV=development

Docker Security

Files scanned: Dockerfile, docker-compose.yml

IssueSeverityDescription
USER rootHIGHContainer runs as root
COPY secretsCRITICALSecrets copied into image
Latest tagMEDIUMUnpinned base image
Exposed portsLOWWide port exposure
No healthcheckLOWMissing health monitoring

Detection patterns:

# Running as root (no USER directive)
FROM.*\n(?!.*USER)

# Copying secrets
COPY.*\.(pem|key|crt|env)
COPY.*secret
COPY.*password

# Unpinned images
FROM\s+\w+:latest
FROM\s+\w+\s*$

# Dangerous capabilities
--privileged
--cap-add

docker-compose.yml issues:

# Privileged mode
privileged: true

# All capabilities
cap_add:
  - ALL

# Host network
network_mode: host

# Sensitive mounts
volumes:
  - /:/host
  - /var/run/docker.sock

Kubernetes Security

Files scanned: *.yaml, *.yml (k8s manifests)

IssueSeverityDescription
privileged: trueCRITICALFull host access
runAsRootHIGHContainer runs as root
No resource limitsMEDIUMDoS risk
hostNetworkHIGHPod uses host network
No securityContextMEDIUMMissing security settings

Detection patterns:

# Privileged containers
securityContext:
  privileged: true

# Running as root
securityContext:
  runAsUser: 0
runAsNonRoot: false

# Host access
hostNetwork: true
hostPID: true
hostIPC: true

# Dangerous volume mounts
volumes:
  - hostPath:
      path: /

# Missing limits
# (absence of resources.limits)

# Wildcard RBAC
rules:
  - apiGroups: ["*"]
    resources: ["*"]
    verbs: ["*"]

Terraform/IaC

Files scanned: *.tf, *.tfvars

IssueSeverityDescription
Public S3 bucketCRITICALData exposure
* in IAM policyHIGHOverly permissive
No encryptionHIGHData at rest unencrypted
0.0.0.0/0 ingressHIGHOpen to internet
Hardcoded secretsCRITICALCredentials in TF

Detection patterns:

# Public S3
acl = "public-read"
acl = "public-read-write"

# Overly permissive IAM
"Action": "*"
"Resource": "*"
"Principal": "*"

# Open security groups
cidr_blocks = ["0.0.0.0/0"]
ingress {
  from_port = 0
  to_port   = 65535

# Missing encryption
encrypted = false
# (or absence of encryption settings)

# Hardcoded secrets
password = "..."
secret_key = "..."

Application Config

Files scanned: config/*.json, *.config.js, application.yml

IssueSeverityDescription
DEBUG=trueHIGHDebug in production
Verbose errorsMEDIUMStack traces exposed
CORS *HIGHAll origins allowed
No HTTPSMEDIUMUnencrypted transport

Detection patterns:

// Debug mode
debug: true,
DEBUG: true,
NODE_ENV: 'development'

// Verbose errors
showStackTrace: true
detailedErrors: true

// CORS
origin: '*'
origin: true
Access-Control-Allow-Origin: *

// Session security
secure: false  // cookies
httpOnly: false
sameSite: 'none'

Output Format

CONFIG SCAN RESULTS
===================

Files scanned: 23
Issues found: 15

CRITICAL (2)
------------
[!] Dockerfile:1 - Running as root
    No USER directive found
    Fix: Add "USER node" or similar non-root user

[!] terraform/s3.tf:12 - Public S3 bucket
    acl = "public-read"
    Fix: Remove public ACL, use bucket policies

HIGH (5)
--------
[H] docker-compose.yml:15 - Privileged container
    privileged: true
    Fix: Remove privileged flag, use specific capabilities

[H] k8s/deployment.yaml:34 - Missing resource limits
    No CPU/memory limits defined
    Fix: Add resources.limits section

...

MEDIUM (8)
----------
...

Configuration

Ignore Rules

Create .config-scan-ignore:

# Ignore specific files
files:
  - "docker-compose.dev.yml"
  - "terraform/modules/test/**"

# Ignore specific rules
rules:
  - id: "docker-root-user"
    files: ["Dockerfile.dev"]
    reason: "Development only"

  - id: "k8s-no-limits"
    reason: "Handled by LimitRange"

Scan Profiles

# .config-scan.yaml
profile: production  # or: development, strict

# Custom thresholds
thresholds:
  fail_on: high
  warn_on: medium

# Specific scanners
scanners:
  docker: true
  kubernetes: true
  terraform: true
  env_files: true
  app_config: true

Best Practices Checked

Docker

  • [ ] Non-root user specified
  • [ ] Base image pinned to digest
  • [ ] No secrets in build
  • [ ] Multi-stage build used
  • [ ] Health check defined
  • [ ] Read-only root filesystem

Kubernetes

  • [ ] Non-root security context
  • [ ] Resource limits defined
  • [ ] Network policies in place
  • [ ] No privileged containers
  • [ ] Service accounts scoped
  • [ ] Secrets encrypted at rest

Terraform

  • [ ] State file encrypted
  • [ ] No hardcoded secrets
  • [ ] Least privilege IAM
  • [ ] Encryption enabled
  • [ ] Logging enabled
  • [ ] No public access by default

Remediation Examples

Docker: Run as Non-Root

# Before
FROM node:18

# After
FROM node:18
RUN groupadd -r app && useradd -r -g app app
USER app

Kubernetes: Security Context

# Before
containers:
  - name: app
    image: myapp

# After
containers:
  - name: app
    image: myapp
    securityContext:
      runAsNonRoot: true
      runAsUser: 1000
      readOnlyRootFilesystem: true
      allowPrivilegeEscalation: false

Terraform: Private S3

# Before
resource "aws_s3_bucket" "data" {
  acl = "public-read"
}

# After
resource "aws_s3_bucket" "data" {
  # No ACL (private by default)
}

resource "aws_s3_bucket_public_access_block" "data" {
  bucket = aws_s3_bucket.data.id
  block_public_acls       = true
  block_public_policy     = true
  ignore_public_acls      = true
  restrict_public_buckets = true
}

CI/CD Integration

# GitHub Actions
- name: Config Security Scan
  run: |
    /config-scan --fail-on high

- name: Docker Scan
  run: |
    /config-scan --docker --fail-on critical

Related Skills

  • /security-scan - Full security analysis
  • /secrets-scan - Credential detection
  • /dependency-scan - Package vulnerabilities

Related skills

How it compares

Use config-scan for static config and IaC misconfiguration review; use a DAST or dependency-scanning skill for runtime exploits or vulnerable package versions.

FAQ

Which config types does config-scan support?

config-scan reviews configuration security for containers, Kubernetes, Terraform, and application environment settings. Use /config-scan alone for a full pass or --docker, --k8s, --terraform, and --env to limit scope.

Does config-scan fix misconfigurations automatically?

config-scan is an evaluative review skill at version 1.0. config-scan flags misconfigurations, secrets exposure, and insecure defaults for human or follow-up agent fixes rather than silently rewriting production configs.

Securityauditappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.