Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

Grading Security Headers Isn't the Full Picture

A few days ago someone left a comment on my last post about grading security headers automatically: "Security-header grading is most useful when it explains tradeoffs, not only pass/fail. CSP especially needs context because a stricter policy can be correct technically and still break the product if rollout is blind." Fair hit. My original grader read Content-Security-Policy and…

Grading security headers is not the complete picture when evaluating website security. While security-header grading can be useful in highlighting tradeoffs, it is not sufficient on its own. Content Security Policy (CSP), for example, requires context because a stricter policy may be technically correct but still break the product if implemented blindly.

A report-only CSP scores the same as a fully enforced one, which is a significant oversight. This mistake can lead to a false sense of security when a team has a report-only CSP in place, just as a team that has shipped a broken policy and never noticed. The grading process misses a crucial aspect: the TLS layer underneath the headers.

Headers provide insight into the intent, but TLS reveals the reality. A perfect header score does not guarantee a secure HTTPS connection. Strict-Transport-Security (HSTS) instructs browsers to only load the site over HTTPS, but it does not address the validity of the certificate serving that HTTPS connection, the time remaining until its expiration, the TLS version negotiated, or the issuing authority.

A site's security audit can score well on headers but still operate on an expiring certificate. To gain a more accurate understanding of a site's security, it is necessary to perform a live handshake using tools like ssl and socket, and check the certificate information. This process involves blocking I/O, so it should be implemented in an asynchronous service.

It must also fail softly, handling self-signed certificates, non-TLS ports, and slow/unreachable hosts gracefully. Additionally, the TLS inspection should be an optional feature, not a default, to prevent unnecessary latency for users who do not require it. The author implemented both fixes - Report-Only-aware header context and opt-in TLS inspection - separately in their API to address these issues.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

TGS selects Speedcast to power fleet’s digital operations with high-speed, all-LEO satellite connectivity

Speedcast, a global communications and IT services provider and the world’s largest Starlink Authorized Reseller, today announced the implementation of an all-LEO solution across the fleet of TGS, a…

  • TGS partners with Speedcast for all-LEO satellite connectivity
  • Starlink's Dedicated Service enables 1Gbit/s upload speeds
  • Partnership aims to simplify operations and accelerate insights

Imagine Having a Heroku Mobile App

I built a native mobile app for the entire Heroku platform. Towards the end of 2023, I transitioned from a job in banking into a full-fledged software development role.

  • Developer completed Heroku mobile app in 6 months
  • App includes dashboard features and enterprise license monitoring
  • Live notifications powered by SignalR

More from Wednesday 19 August →