Most web application hardening failures found in penetration tests and external scans are deployment settings, not code flaws: a missing header, a session cookie without HttpOnly, a stack trace on a 500 page, TLS 1.0 still enabled on one load balancer. This checklist is the go-live and periodic review run sheet for those settings. Every check has an explicit pass criterion that can be verified from an HTTP response, a configuration file or a scanner report, and most are traced to an OWASP ASVS 5.0 requirement so the result doubles as verification evidence. It covers transport and TLS, response headers, cookies, session management, error handling and information leakage. It is written for application security engineers, platform teams and release managers. The reasoning behind each header and its values is in the Security Headers Guide; this page is the list you test against.
How to use this template
- Replace every [placeholder]. Run the checklist per application and per hostname: headers and TLS settings often differ between the main site, the API host, the login host and static content domains.
- Test the deployed response, not the code or the intended configuration. A CDN, reverse proxy or framework default can add, remove or override a header after your application sets it.
- Check at least three response types per host: an authenticated HTML page, an unauthenticated page and an error response (a 404 and a forced 500 in a test environment). Many headers are set only on success responses.
- Mark each line Pass, Fail, Partial or Not applicable, with evidence (a saved response header dump, scanner output, configuration excerpt or ticket reference). "Not applicable" needs a one-line reason.
- Run the full list before first go-live, after any change of web server, CDN, framework or identity provider, and at least [annually]; run sections 2 and 3 on every release through an automated header check in the pipeline.
1. Review record
| Field | Entry |
|---|---|
| Application name and inventory ID | [name]; [ID from your application or API Inventory Template register] |
| Hostnames in scope | [www.example.com, login.example.com, static.example.com] |
| Front door components | [CDN, WAF, load balancer, reverse proxy, application server] |
| Target ASVS level | [L1 / L2 / L3]; see the OWASP ASVS Guide |
| Session mechanism | [Server-side session cookie / self-contained token / identity provider session plus application session] |
| Reviewer, date, overall result | [Name], [date], [Pass / Pass with findings / Fail] |
2. Transport and TLS
| # | Check | Pass criterion | ASVS 5.0 | Result and evidence |
|---|---|---|---|---|
| 2.1 | Only current TLS versions are enabled | TLS 1.2 and TLS 1.3 only, TLS 1.3 preferred; SSL 3.0, TLS 1.0 and TLS 1.1 refused on every listener | V12.1.1 | [ ] |
| 2.2 | Only recommended cipher suites are offered | Strongest suites preferred; no NULL, export, RC4 or 3DES suites; forward secrecy only for L3 | V12.1.2 | [ ] |
| 2.3 | No plaintext fallback | HTTP on port 80 only redirects to HTTPS and serves no content or cookies | V12.2.1 | [ ] |
| 2.4 | Publicly trusted certificate | Certificate chains to a public CA, covers every hostname in scope, expiry monitored with an owner | V12.2.2 | [ ] |
| 2.5 | HSTS on every response | Strict-Transport-Security present on all HTTPS responses with max-age of at least 31536000 (one year); includeSubDomains for L2 and above | V3.4.1 | [ ] |
| 2.6 | HSTS preload (L3 or by decision) | Top-level domain is on the browser preload list, after confirming every subdomain serves HTTPS | V3.7.4 | [ ] |
Server-side protocol and cipher detail sits in the TLS Server Configuration Baseline Guide. Preload is hard to undo, so read HSTS and HSTS Preload before submitting a domain.
3. Response headers
| # | Header | Pass criterion | ASVS 5.0 | Result and evidence |
|---|---|---|---|---|
| 3.1 | Content-Security-Policy | Present on HTML responses; includes object-src 'none' and base-uri 'none'; scripts controlled by an allowlist, nonces or hashes; no 'unsafe-inline' for scripts without a nonce or hash. L3: per-response nonces or hashes | V3.4.3 | [ ] |
| 3.2 | CSP frame-ancestors | Set on every response; 'none' or 'self' unless embedding is a documented requirement. X-Frame-Options: DENY may be added for older clients but is not relied on | V3.4.6 | [ ] |
| 3.3 | CSP reporting (L3 or by decision) | A report-to or report-uri endpoint is defined and its reports are reviewed | V3.4.7 | [ ] |
| 3.4 | X-Content-Type-Options | nosniff on all responses, and every response with a body has a correct Content-Type including charset | V3.4.4, V4.1.1 | [ ] |
| 3.5 | Referrer-Policy | Set explicitly, for example strict-origin-when-cross-origin or stricter; no-referrer for internal applications whose hostnames or URLs are sensitive | V3.4.5 | [ ] |
| 3.6 | Cross-Origin-Opener-Policy | same-origin (or same-origin-allow-popups where login pop-ups need it) on document responses | V3.4.8 | [ ] |
| 3.7 | Access-Control-Allow-Origin | Fixed value or validated against an allowlist; never reflects arbitrary Origin; * only on responses with no sensitive data and never with credentials | V3.4.2 | [ ] |
| 3.8 | Permissions-Policy | Features the application does not use are disabled, for example camera=(), microphone=(), geolocation=() | Not an ASVS requirement | [ ] |
| 3.9 | Cache-Control on sensitive responses | no-store on authenticated pages and API responses carrying personal or secret data (no-cache alone still allows storage) | V14.3.2 | [ ] |
| 3.10 | Legacy and fingerprinting headers | X-XSS-Protection absent or set to 0; X-Powered-By removed; Server removed or generic; no backend version strings (L3) | V13.4.6 | [ ] |
The recommended values for 3.5, 3.6, 3.8, 3.9 and 3.10 follow the OWASP HTTP Headers Cheat Sheet. Policy design for 3.1 is covered in the Content Security Policy Guide, and 3.7 in the CORS Misconfiguration Guide.
4. Cookies
Inspect every Set-Cookie header the application, its framework and its front door emit, including those set by load balancers for stickiness and by the identity provider on the login host. A target baseline for a session cookie, as given in the OWASP Session Management Cheat Sheet, is Set-Cookie: __Host-id=<value>; Secure; HttpOnly; SameSite=Strict; Path=/ (or SameSite=Lax where top-level cross-site navigation must carry the session).
| # | Check | Pass criterion | ASVS 5.0 | Result and evidence |
|---|---|---|---|---|
| 4.1 | Secure attribute and prefix | Every cookie has Secure and is named with __Host- or, where sharing across hosts is needed, __Secure- | V3.3.1 | [ ] |
| 4.2 | Host-only by default | __Host- used unless the cookie is explicitly designed to be shared; no Domain attribute on session cookies | V3.3.3 | [ ] |
| 4.3 | HttpOnly on tokens | Session and other script-inaccessible cookies carry HttpOnly, and the session value is sent only in Set-Cookie (never in a response body or URL) | V3.3.4 | [ ] |
| 4.4 | SameSite set explicitly | Strict or Lax chosen per cookie purpose and set explicitly, not left to browser defaults; None only with Secure and a documented cross-site need | V3.3.2 | [ ] |
| 4.5 | Non-persistent session cookie | No Expires or Max-Age beyond the session lifetime; timeouts enforced on the server, not by cookie expiry | V7.3.1, V7.3.2 | [ ] |
| 4.6 | Generic name and opaque value | Session cookie name does not reveal the framework (not PHPSESSID or JSESSIONID); value is opaque and contains no personal data | Not an ASVS requirement | [ ] |
Attribute behaviour, prefixes and partitioned cookies are explained in the Cookie Security Guide. SameSite supplements, and does not replace, CSRF protection: see the CSRF Prevention Guide.
5. Session management
| # | Check | Pass criterion | ASVS 5.0 | Result and evidence |
|---|---|---|---|---|
| 5.1 | Timeouts documented and justified | Inactivity timeout and absolute lifetime written down per application, with justification for any deviation from NIST SP 800-63B reauthentication guidance | V7.1.1 | [ ] |
| 5.2 | Inactivity timeout enforced server side | Idle session rejected after [ ] minutes; tested by replaying a captured request after the period | V7.3.1 | [ ] |
| 5.3 | Absolute lifetime enforced | Session rejected after [ ] hours regardless of activity | V7.3.2 | [ ] |
| 5.4 | New session on login | Session identifier changes on authentication and reauthentication; the old identifier no longer works | V7.2.4 | [ ] |
| 5.5 | Logout really ends the session | After logout or expiry, a replayed request with the old cookie or token is rejected; for self-contained tokens, a revocation list, per-user cut-off time or key rotation is in place | V7.4.1 | [ ] |
| 5.6 | Disabled accounts lose sessions | Disabling or deleting a user terminates all of that user's active sessions | V7.4.2 | [ ] |
| 5.7 | Administrators can terminate sessions | An administrator can end all sessions for an individual user or for all users | V7.4.5 | [ ] |
| 5.8 | Sensitive changes need reauthentication | Changing email address, phone number, MFA settings or account recovery details requires full reauthentication | V7.5.1 | [ ] |
| 5.9 | Session identifier strength | Reference tokens are unique, generated by a CSPRNG and carry at least 128 bits of entropy (the OWASP cheat sheet sets 64 bits as the absolute floor) | V7.2.3 | [ ] |
For timeout values, OWASP's cheat sheet gives common idle timeouts of 2 to 5 minutes for high-value applications and 15 to 30 minutes for low-risk ones; set yours from risk and record it in 5.1. NIST SP 800-63B-4 requires session cookies to be Secure and recommends HttpOnly, __Host-, Path=/ and SameSite Lax or Strict, consistent with section 4. Fixation and token handling are covered in the Session Fixation Guide and Token and Session Security Guide.
6. Error handling and information leakage
| # | Check | Pass criterion | ASVS 5.0 | Result and evidence |
|---|---|---|---|---|
| 6.1 | Generic error responses | A forced 500 and a malformed request return a generic message with a correlation ID; no stack trace, SQL, file path, secret, token or framework version | V16.5.1 | [ ] |
| 6.2 | Last resort handler | A global exception handler catches all unhandled exceptions, logs the detail server side and keeps the process running | V16.5.4 | [ ] |
| 6.3 | Fail closed | An exception in validation or authorisation logic stops the transaction rather than letting it proceed | V16.5.3 | [ ] |
| 6.4 | Correct status codes | 4xx for client errors, 5xx only for server faults; API errors use a consistent structured format such as application/problem+json (RFC 9457) without internal detail | Not an ASVS requirement | [ ] |
| 6.5 | Debug modes off | Framework debug pages, developer exception pages, verbose logging to the client and debug toolbars disabled in production for every component | V13.4.2 | [ ] |
| 6.6 | No source control metadata | Requests for /.git/, /.svn/ and similar return 404 or 403 | V13.4.1 | [ ] |
| 6.7 | Internal documentation and monitoring not exposed | API documentation consoles, health, metrics and actuator endpoints unreachable from the internet unless intended and authenticated | V13.4.5 | [ ] |
| 6.8 | Default and sample content removed | Web server and framework welcome pages, sample applications and directory listings disabled | Not an ASVS requirement | [ ] |
The OWASP Error Handling Cheat Sheet names the framework hooks for 6.2, for example @RestControllerAdvice in Spring and UseExceptionHandler in ASP.NET Core. Logging the detail you no longer show the user is covered in the Secure Error Handling and Logging Guide.
7. Findings and sign-off
| Check # | Finding | Severity | Owner | Fix or exception (with expiry) | Retest date |
|---|---|---|---|---|---|
| [3.1] | [CSP missing on error pages] | [Medium] | [ ] | [ ] | [ ] |
| [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
Go-live decision: [Approved / Approved with exceptions / Not approved]. Signed: [application owner], [security reviewer], [date].
Implementation guidance
Rolling out fixes without breaking production
- Baseline first: capture the current response headers and cookies for every hostname and the three response types, and store them as evidence. This is your rollback reference.
- Decide where each control lives: set transport, HSTS, generic headers and fingerprint removal once at the CDN or reverse proxy; set CSP, cookies, session and error behaviour in the application, where they can vary per route. Record the choice so a later change of CDN does not silently drop headers.
- Use report-only modes: deploy CSP as
Content-Security-Policy-Report-Onlyand review violations for [two weeks] before enforcing. Start HSTS with a shortmax-age(for example one day), raise it after a clean week, then to one year. - Change cookies and timeouts in a pilot ring: renaming a session cookie or adding a
__Host-prefix logs everyone out; tightening SameSite can break single sign-on returns and payment redirects. Test identity provider and payment flows explicitly. - Automate regression checks: add a pipeline step that requests key URLs and fails the build if a required header, cookie attribute or generic error page is missing.
- Roll back by setting, not by release: keep each header and cookie change behind its own configuration value so one breaking setting can be reverted without undoing the rest. HSTS and preload are the exception: they persist in browsers, which is why they ramp slowly.
Decision guidance
- Which ASVS level: L1 checks (2.1, 2.3 to 2.5, 3.7, 4.1, 5.4 to 5.6) are the floor for anything internet-facing. Use L2 for applications handling personal or financial data; L3 adds per-response CSP nonces, CSP reporting, COOP, preload and version hiding.
- Strict or Lax: choose
SameSite=Strictfor session cookies on applications that users reach directly;Laxwhere users arrive from links in email or other sites and must stay logged in. - Small teams: a managed CDN or platform that injects headers and terminates TLS covers most of sections 2 and 3; spend the effort on sections 4 to 6, which only the application can get right.
Metrics
- Header pass rate: percentage of in-scope hostnames passing every section 3 check on the latest automated scan.
- Cookie compliance: percentage of observed cookies with Secure, an approved prefix and explicit SameSite.
- Legacy TLS exposure: count of listeners accepting TLS 1.1 or below (target zero).
- Error leakage: count of responses in scanner or log samples containing stack traces or framework versions.
- Exception age: number of open hardening exceptions past their expiry date.
Common failure patterns
- Headers only on 200 responses: error pages served by the proxy or framework miss CSP and HSTS.
- The CDN strips or overrides: the application sets a header that the edge replaces, so code review passes and the live test fails.
- Logout that only deletes the cookie: the server-side session or token remains valid and replay works.
- CSP with
'unsafe-inline'and wide wildcards: the header is present, the scanner is satisfied and script injection still runs. - Staging hosts left on debug: internet-reachable pre-production systems leak stack traces and configuration.
Framework mapping
| Framework | Reference | Checklist sections |
|---|---|---|
| OWASP ASVS 5.0 | V3 Web Frontend Security; V7 Session Management; V12 Secure Communication; V13.4 Unintended Information Leakage; V16.5 Error Handling | 2 to 6 |
| NIST SP 800-53 Rev. 5 | SC-8 Transmission Confidentiality and Integrity; SC-23 Session Authenticity; AC-12 Session Termination; SI-11 Error Handling; CM-6 Configuration Settings; CM-7 Least Functionality | 2; 4 and 5; 5; 6; 3; 6 |
| NIST CSF 2.0 | PR.PS-01 Configuration management; PR.DS-02 Data in transit | All; 2 |
| MITRE ATT&CK | T1190 Exploit Public-Facing Application | Reduces exposed weakness and reconnaissance detail on public-facing applications |
Standards and references
- OWASP: Application Security Verification Standard 5.0
- OWASP: HTTP Headers Cheat Sheet
- OWASP: Session Management Cheat Sheet
- OWASP: Error Handling Cheat Sheet
- NIST: SP 800-63B-4 Session Management
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
- MITRE ATT&CK: T1190 Exploit Public-Facing Application
Related NHI Mgmt Group resources: Security Headers Guide, Web Application Security Guide, OWASP ASVS Guide, Web Application Firewall Guide.