Free Caddyfile & Traefik Security Linter — 16 Automated Hardening Checks, 0 Upload
Catch exposed Caddy admin 0.0.0.0:2019 APIs, auto_https off, file_server browse, Traefik api.insecure: true, exposedByDefault: true, writable docker.sock mounts, weak TLS, and missing HSTS or rate limits before exposing your VPS edge. Runs 100% locally in your browser with 0 bytes uploaded.
Interactive Caddyfile & Traefik Security Linter (16 Rules)
100% in-browser · 0 bytes sent · < 10 msPaste any Caddyfile, traefik.yml, or traefik.toml below—or load either vulnerable reverse-proxy sample in 1 click—to inspect line-accurate findings, CWE/SOC 2/ISO/DORA mappings, and 1-click IDE Quick Fixes.
.vsix locally—or unlock Pro once (no subscription) for full workspace audits, stackguard-cli, SARIF 2.1.0, and SHA-256 sealed SOC 2 / ISO 27001 / DORA reports.
All 16 Real Caddyfile & Traefik Hardening Rules (PRX001–PRX016)
Every check below runs on the exact deterministic engine powering this zero-upload browser linter, the .vsix IDE extension, and stackguard-cli—8 rules for Caddyfile (PRX001–PRX008) and 8 rules for traefik.yml / traefik.toml (PRX009–PRX016).
| Rule ID | Severity | Risk & Compliance Mapping | Quick Fix & Remediation |
|---|---|---|---|
PRX001Free |
CRITICAL |
Caddy admin API exposed outside localhost
Caddyfile binds the unauthenticated admin API to 0.0.0.0, :2019, or a non-loopback address, allowing remote attackers to rewrite routes and hijack traffic.
|
1-Click IDE Quick Fix
Bind the Caddy admin API strictly to localhost:2019 (or 127.0.0.1:2019) or disable it with 'admin off'.
|
PRX002Free |
CRITICAL |
Automatic HTTPS disabled in Caddyfile (auto_https off)
Disabling auto_https (or certificate provisioning) prevents Caddy from enforcing TLS and automatic HTTP-to-HTTPS upgrades.
|
1-Click IDE Quick Fix
Remove 'auto_https off' to keep automatic TLS certificate provisioning and HTTPS redirection enabled.
|
PRX003Pro |
HIGH |
Cleartext HTTP Caddy site block without HTTPS redirect
A public Caddy site block explicitly listens on http:// or :80 without redirecting traffic to https://, exposing sessions and credentials in transit.
|
1-Click IDE Quick Fix
Use an HTTPS domain label (or https://) or add 'redir https://{host}{uri} permanent' inside the HTTP block.
|
PRX004Free |
CRITICAL |
Upstream TLS verification disabled in Caddy (tls_insecure_skip_verify)
Caddy reverse_proxy transport sets tls_insecure_skip_verify, disabling certificate validation and enabling MITM attacks against upstream services.
|
1-Click IDE Quick Fix
Remove tls_insecure_skip_verify and trust the internal CA via tls_trusted_ca_certs.
|
PRX005Pro |
MEDIUM |
Missing Strict-Transport-Security (HSTS) header in Caddy
Caddy site block does not emit a Strict-Transport-Security header, leaving clients vulnerable to SSL stripping and protocol downgrade attacks.
|
1-Click IDE Quick Fix
Add 'header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"' to the site block or shared security snippet.
|
PRX006Pro |
MEDIUM |
Missing X-Content-Type-Options or X-Frame-Options headers in Caddy
Caddy site block omits X-Content-Type-Options (nosniff) and/or clickjacking protection (X-Frame-Options or CSP frame-ancestors).
|
1-Click IDE Quick Fix
Set 'X-Content-Type-Options "nosniff"' and 'X-Frame-Options "DENY"' (or CSP frame-ancestors) via the header directive.
|
PRX007Pro |
HIGH |
Directory browsing enabled on Caddy file_server (file_server browse)
Enabling 'file_server browse' exposes live directory indexes to anonymous visitors, leaking backups, dotfiles, and internal assets.
|
1-Click IDE Quick Fix
Remove the 'browse' option from file_server unless a public file mirror is explicitly intended.
|
PRX008Pro |
MEDIUM |
Debug mode or sensitive credential logging enabled in Caddy
Caddyfile enables global 'debug', 'level DEBUG', or 'log_credentials', which can log Authorization headers, cookies, and internal routing details in plaintext.
|
1-Click IDE Quick Fix
Remove 'debug' and 'log_credentials' and set production log level to INFO or WARN.
|
PRX009Free |
CRITICAL |
Traefik API/dashboard exposed insecurely (api.insecure: true)
Traefik enables api.insecure (--api.insecure=true), publishing the unauthenticated dashboard and full internal service topology on port 8080.
|
1-Click IDE Quick Fix
Set api.insecure to false and expose api@internal strictly behind HTTPS with authentication and IP allowlisting.
|
PRX010Free |
CRITICAL |
Traefik Docker provider auto-exposes containers (exposedByDefault: true)
Traefik Docker provider has exposedByDefault enabled (or omitted, which defaults to true), automatically publishing internal containers to the internet.
|
1-Click IDE Quick Fix
Set providers.docker.exposedByDefault to false and opt in only intended services via traefik.enable=true.
|
PRX011Free |
CRITICAL |
Traefik Docker socket mounted writable or exposed without proxy
Traefik mounts /var/run/docker.sock without :ro or connects directly to the raw daemon socket, granting host root escalation if the proxy is compromised.
|
1-Click IDE Quick Fix
Mount /var/run/docker.sock with :ro and route Traefik through a read-only Docker socket proxy (e.g. tecnativa/docker-socket-proxy).
|
PRX012Pro |
CRITICAL |
Upstream TLS verification disabled in Traefik (insecureSkipVerify: true)
Traefik sets serversTransport.insecureSkipVerify: true, accepting forged or self-signed backend certificates without validation.
|
1-Click IDE Quick Fix
Set insecureSkipVerify to false and configure serversTransport.rootCAs with your internal CA certificate.
|
PRX013Pro |
MEDIUM |
Traefik HTTP entrypoint (:80) missing HTTPS redirection
An HTTP entrypoint listening on port :80 does not configure http.redirections.entryPoint to upgrade requests to HTTPS.
|
1-Click IDE Quick Fix
Configure entryPoints.web.http.redirections.entryPoint with to: websecure, scheme: https, and permanent: true.
|
PRX014Pro |
HIGH |
Weak TLS minimum version (< VersionTLS12) in Traefik
Traefik TLS options allow deprecated protocols (TLS 1.0, TLS 1.1, or SSLv3), failing PCI-DSS, SOC 2, and DORA cryptographic standards.
|
1-Click IDE Quick Fix
Set tls.options.<name>.minVersion to VersionTLS12 or VersionTLS13.
|
PRX015Pro |
CRITICAL |
Plaintext or weak password hash in Traefik basicAuth middleware
Traefik basicAuth.users contains a cleartext password or weak MD5/SHA1/apr1 hash instead of a strong bcrypt ($2y$/$2b$) digest.
|
Guided Remediation
Generate bcrypt credentials with 'htpasswd -nbB admin <password>' and load them via secret files (usersFile) rather than inline configs.
|
PRX016Pro |
MEDIUM |
Missing rate-limit middleware on Traefik sensitive routes
Traefik HTTP routers expose API, admin, auth, or public endpoints without a rateLimit middleware, increasing brute-force and DoS exposure.
|
Guided Remediation
Define an http.middlewares.<name>.rateLimit policy (average/burst) and attach it to sensitive HTTP routers.
|
Frequently Asked Questions
Does this Caddyfile and Traefik security linter upload my reverse-proxy config?
No. StackGuard bundles its TypeScript parser into scanner-bundle.js and evaluates all 16 Caddy and Traefik rules (PRX001–PRX016) locally inside your browser. Zero bytes of your Caddyfile, traefik.yml, traefik.toml, or internal hostnames ever leave your device.
Why are Caddy admin 0.0.0.0:2019 (PRX001) and Traefik api.insecure: true (PRX009) critical?
Caddy's admin API has no built-in authentication—exposing it outside localhost allows remote attackers to reload arbitrary routes and hijack TLS traffic. Similarly, Traefik's api.insecure: true publishes the dashboard and complete internal container topology on port 8080 without authentication.
What Traefik Docker provider and TLS risks does StackGuard detect?
StackGuard flags providers.docker.exposedByDefault: true or omitted (PRX010), writable /var/run/docker.sock mounts without :ro or raw socket endpoints (PRX011), serversTransport.insecureSkipVerify: true (PRX012), port :80 entryPoints without HTTPS redirects (PRX013), TLS versions below VersionTLS12 (PRX014), plaintext or weak basicAuth hashes (PRX015), and missing rateLimit middlewares on sensitive routes (PRX016).
How do I run all 72 rules in VS Code, Cursor, Windsurf, or CI pipelines?
Install the free stackguard-0.2.0.vsix extension for 25 critical IDE rules and 1-click Quick Fixes, or unlock StackGuard Pro ($29 Solo / $49 Team one-time via Polar.sh) for all 72 rules across MCP, n8n, Docker Compose, and Caddy/Traefik plus SARIF 2.1.0 and SHA-256 sealed SOC 2 / ISO 27001 / DORA reports.