T09 · Insecure Skill Coding Practices
- Location
SKILL.md:310- Finding
Unsafe Default HSTS Policy Conflicts with Explicit-Consent Requirement
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 310; related safety rule at line 467
Vulnerability Type: Unsafe security configuration
Risk Level: MediumVulnerable configuration:
nginx add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;Conflicting safety rule:
text NEVER set HSTS preload without explicit user consent. Preload is irreversible -- once submitted to the HSTS preload list, the domain must serve HTTPS forever.Technical Analysis
The supplied production configuration unconditionally enables a two-year HSTS policy with
includeSubDomainsand thepreloaddirective. However, the Skill's own safety rules require explicit user consent before setting HSTS preload.Once a browser receives this header over HTTPS, it can cache the requirement to use HTTPS for the parent domain and every subdomain for up to 63,072,000 seconds. The
preloadtoken also makes the domain eligible for submission to browser preload lists. Merely sending this token does not itself submit the domain, but it creates a dangerous default and facilitates a longer-lived, difficult-to-reverse policy.This is an insecure configuration practice rather than malicious persistence. The separate instructions to enable Nginx and configure certificate renewal are proportionate to the declared reverse-proxy and automated-TLS functionality.
Attack Path
- An agent follows Phase 6 and copies the provided hardened Nginx configuration without modification.
- Nginx begins returning the HSTS header containing
includeSubDomains, a two-yearmax-age, andpreload. - Browsers cache the policy for the parent domain and apply it to all subdomains.
- Any subdomain that lacks valid HTTPS becomes inaccessible to affected clients because browsers automatically upgrade HTTP requests to HTTPS.
- If the domain is subsequently submitted to an HSTS preload list, the be ...[truncated 738 chars]
- Remediation
View remediation
Remediation Suggestions
Use a conservative HSTS policy by default:
nginx add_header Strict-Transport-Security "max-age=31536000" always;Apply the following hardening plan:
- Do not enable
includeSubDomainsuntil every current subdomain supports HTTPS with a valid certificate. - Do not add
preloaduntil the user gives explicit informed consent and understands the preload-list removal process. - Begin with a short
max-age, such as 300 seconds, during validation and increase it gradually after confirming that HTTPS works reliably. - Inventory current and anticipated subdomains before enabling
includeSubDomains. - Confirm that certificate renewal and monitoring are operational before deploying a long-lived policy.
- Make consent an explicit prerequisite in Phase 6 rather than relying only on the later safety rule.
- Clearly state that the
preloaddirective alone does not submit a domain; submission to the browser preload service is a separate action that must also require explicit approval.
- Do not enable
