Skip to content

Report additional modern security headers (INFO)#3050

Merged
drwetter merged 1 commit into
testssl:3.3devfrom
potato-20:add-modern-security-headers
Jun 9, 2026
Merged

Report additional modern security headers (INFO)#3050
drwetter merged 1 commit into
testssl:3.3devfrom
potato-20:add-modern-security-headers

Conversation

@potato-20

Copy link
Copy Markdown
Contributor

testssl.sh already highlights X-Permitted-Cross-Domain-Policies in emphasize_stuff_in_headers() (testssl.sh:3285 / 3335) but never actually reports it in run_security_headers() — this PR closes that inconsistency, and while there adds a few other modern security headers testssl currently misses.

Headers added (all INFO, presence-only — no correctness logic), appended to the existing header_and_svrty array:

  • X-Permitted-Cross-Domain-Policies (already emphasized but not reported)
  • Origin-Agent-Cluster
  • Document-Policy
  • Clear-Site-Data
  • Reporting-Endpoints
  • Report-To
  • NEL

This follows the same approach as #2619 (COOP/COEP/CORP added as INFO) and slots into the generic loop — the existing INFO) case handles output, so there are no other code changes, and no help()/man-page change is needed (individual headers aren't documented).

The last three (Reporting-Endpoints/Report-To/NEL) are reporting-oriented rather than hardening controls — happy to drop them if you consider them out of scope; the rest stand on their own.

Tested against hosts that send these headers (e.g. Cloudflare-fronted sites send Report-To/NEL) and hosts that don't — reported once each, no side effects. 5-space indent, no tabs; shellcheck --severity=error clean.

Adds X-Permitted-Cross-Domain-Policies (already highlighted in emphasize_stuff_in_headers() but never reported), Origin-Agent-Cluster, Document-Policy, Clear-Site-Data, Reporting-Endpoints, Report-To and NEL to run_security_headers(), all presence-only/INFO, matching how COOP/COEP/CORP were added in testssl#2619.
@drwetter drwetter merged commit cfde1df into testssl:3.3dev Jun 9, 2026
4 checks passed
@drwetter

drwetter commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants