Overview
A successful same-host HTTPS response at the configured runtime URL emits one unambiguous Strict-Transport-Security header with an exact integer max-age directive of at least 31536000 seconds. Repository web-server declarations are not runtime proof.
Why it Matters
After a browser receives an HSTS policy over trusted HTTPS, the policy can prevent later HTTP use for its covered host. A longer valid lifetime reduces dependence on repeatedly receiving that header.
HSTS without an established or preloaded policy does not protect a first-ever HTTP visit, and this rule does not imply preload or subdomain coverage.
Verification Steps
Manual Verification
- Make an HTTPS request to the configured runtime URL with normal certificate validation.
- Inspect all Strict-Transport-Security occurrences and parse max-age as an integer.
- Confirm the response is successful and same-host; a config fragment alone is insufficient.
Command / Review Sample
curl --max-time 10 -sS -D - -o /dev/null https://store.example/
Use the assessed Magento project and the appropriate application or read-only review account. Replace example hosts, paths and identifiers with the assessment scope; configuration and source fragments are illustrative.
Remediation / Fix Guidance
- Investigate and change: Configure exactly one Strict-Transport-Security header on the successful canonical HTTPS response. Increase max-age to the approved policy after validating HTTPS coverage; Magebean uses 31536000 seconds.
- Validate the change: Verify the observed response emits the exact policy. Review all subdomains before adding includeSubDomains and follow a separate deliberate process before enabling preload.
- Recheck MB-0027: Repeat the same read-only request from the scanner after deployment and compare the effective response, including redirects and edge caches. Test the affected storefront, Admin or checkout behavior in staging before rollout.
Examples
Illustrative examples only. Interpret them within the current revision criterion above; missing collection evidence is unresolved, never PASS.
Fail Example
Strict-Transport-Security: max-age=300
Pass Example
Strict-Transport-Security: max-age=31536000
# One unambiguous observed header on a successful same-host HTTPS response.
Scope and Evidence Limits
Rule revision: 4. Target modes: LOCAL, REMOTE.
A successful same-host HTTPS response at the configured runtime URL emits one unambiguous Strict-Transport-Security header with an exact integer max-age directive of at least 31536000 seconds. Repository web-server declarations are not runtime proof.
This check covers only the collected observation. Missing collection scope, external controls and runtime behavior require separate evidence.
Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.