freedomofpress / securethenews

An automated scanner and web dashboard for tracking TLS deployment across news organizations
https://securethe.news
GNU Affero General Public License v3.0
102 stars 25 forks source link

Increase pshtt timeout to 5 seconds #56

Closed garrettr closed 7 years ago

garrettr commented 7 years ago

Conor noticed that when he tried to scan securethe.news, it got an F. This was highly surprising because securethe.news has valid HTTPS, defaults to HTTPS, uses HSTS, and is preload-ready -- it should've gotten an A. We debugged the issue together and found that pshtt uses a default timeout of 1 second for its scanning requests. Combined with the poor performance on the unoptimized securethe.news homepage (it takes ~1.5 seconds to render on average), pshtt was timing out before the homepage finished loading, which caused the incorrect results that we observed.

This PR increases pshtt's timeout to 5 seconds, which makes the ultimate scan results more robust in the context of slow sites or transient network issues.

We re-scanned the current site list with the new settings and compared the scores to make sure none of the existing sites had been incorrectly assessed for the same reason, and determined that none had been.

conorsch commented 7 years ago

We re-scanned the current site list with the new settings and compared the scores to make sure none of the existing sites had been incorrectly assessed for the same reason, and determined that none had been.

Which means securethe.news is verifiably slower than every single news site we're scanning. Great candidate for Wagtail optimization!