Back to skill

Security audit

Caddy

Security checks for vulnerabilities and agentic risk

Overview

This is a small Caddy configuration guidance skill with no code execution, but one HSTS note is inaccurate and should be checked before use.

The skill is reasonable to install for Caddy help, but do not rely on its HSTS sentence. Configure and verify Strict-Transport-Security explicitly when you need HSTS, and validate generated Caddy configs before applying them.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:48
Finding
Misleading HSTS Security Guidance## Vulnerability Details **File Location**: `SKILL.md`, line 48 **Vulnerability Type**: Insecure security configuration guidance **Risk Level**: Medium **Complete 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 needed ``` ### Technical 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-Security` header. 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 1. An agent or administrator follows the guidance in `SKILL.md`. 2. Based on the assertion that HSTS is automatic, they do not configure a `Strict-Transport-Security` response header. 3. The service is deployed with HTTPS and HTTP-to-HTTPS redirects but without HSTS. 4. A user makes an initial HTTP request from a network controlled or observed by an on-path attacker. 5. 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]
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-age` during testing and increase it after confirming that HTTPS works reliably. Add `includeSubDomains` only when every relevant subdomain supports HTTPS. Enable `preload` and 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.com ``` Confirm that the response contains the intended `Strict-Transport-Security` header. Validate the Caddy configuration with `caddy validate` before applying it.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.