T09 · Insecure Skill Coding Practices
- Location
SKILL.md:48- Finding
Misleading HSTS Security Guidance
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 48
Vulnerability Type: Insecure security configuration guidance
Risk Level: MediumComplete Snippet:
markdown ## Security Headers - Caddy doesn't add security headers by default — add X-Frame-Options, X-Content-Type-Options explicitly - HSTS is automatic when serving HTTPS — no manual configuration neededTechnical Analysis
The Skill claims that HSTS is enabled automatically whenever Caddy serves HTTPS. Caddy's automatic HTTPS functionality manages TLS certificates and HTTP-to-HTTPS redirects, but it does not guarantee that responses include the
Strict-Transport-Securityheader.An agent or administrator relying on this instruction may omit explicit HSTS configuration and verification. HTTPS redirects do not provide the same protection as HSTS because a browser's initial HTTP request can occur before it learns that the domain must only be accessed over HTTPS.
Attack Path
- An agent or administrator follows the guidance in
SKILL.md. - Based on the assertion that HSTS is automatic, they do not configure a
Strict-Transport-Securityresponse header. - The service is deployed with HTTPS and HTTP-to-HTTPS redirects but without HSTS.
- A user makes an initial HTTP request from a network controlled or observed by an on-path attacker.
- Before the browser reaches the HTTPS redirect, the attacker may intercept or manipulate the HTTP connection and attempt an SSL-stripping or downgrade attack.
Impact Assessment
This issue does not directly grant local system privileges or compromise the Caddy host. Its scope is limited to services configured according to the inaccurate guidance. In affected deployments, an on-path attacker may target users who have not previously established an HSTS policy for the domain, potentially exposing or manipulating traffic sent during a downgraded initial connection. Existing browser HSTS state, HS ...[truncated 96 chars]
- An agent or administrator follows the guidance in
- Remediation
View remediation
Remediation Suggestions
Replace the inaccurate statement with guidance requiring administrators to configure and verify HSTS explicitly. For example:
caddyfile example.com { header Strict-Transport-Security "max-age=31536000" reverse_proxy localhost:3000 }Begin with a conservative
max-ageduring testing and increase it after confirming that HTTPS works reliably. AddincludeSubDomainsonly when every relevant subdomain supports HTTPS. Enablepreloadand request browser preload registration only after validating the long-term operational consequences.Verify the deployed response rather than relying only on configuration:
sh curl -I https://example.comConfirm that the response contains the intended
Strict-Transport-Securityheader. Validate the Caddy configuration withcaddy validatebefore applying it.
