cisagov / cisagov/pshtt

Need more exhaustive check to determine if an HSTS header will be ignored

Open
#205 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
693
Forks
91
PR merge metrics
No merged PRs in 30d

Description

# 🐛 Bug Report

Consider the function `hsts_check()` in `pshtt/pshtt.py`. It's not just a bad hostname that should cause the HSTS header to be ignored. It is also ignored if the certificate is untrusted, for example. (See item 2 in [the RFC](https://tools.ietf.org/html/rfc6797#section-2.2).) Therefore I think that this `if` clause should be fleshed out a little more.

We should be a little careful when making this change, since [as @echudow pointed out](https://github.com/cisagov/pshtt/pull/193/files/0ec75ba3fcabffa43b5c265d92c3404fc77e0a56#r315338012) in a separate pull request:

> Currently we don't check that the certificate is trusted even on the initial response, so that change could have more negative effects on the results.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.