-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎉 Advance DrHeader to evalute HSTS max-age #250:bug #251
base: develop
Are you sure you want to change the base?
🎉 Advance DrHeader to evalute HSTS max-age #250:bug #251
Conversation
@javixeneize could you review this PR? |
@javixeneize and @amias-channer could you please review this PR? |
I'm not sure I see the value in this. 1 year is a well established benchmark that's pretty ubiquitous, and it's unlikely that anyone would want to set a I'd support increasing the expected value in the default rules to |
Hi @emilejq Example (Current implementation): Example (PR): |
My take on it is that your suggestion could be confusing and/or leading to not wanted behaviours. I definitely don't think it is a bug. If you set the rule to have a one year max-age for HSTS header, then a scenario where a 10 years max-age is returned would be expected to fail. The fact it is more than one year doesn't make it always good. The same is expected to happen for anything different to the value set in the rule really. This is the reason why it is not a bug, as it is the way the tool has been implemented to work. Now if you wanted a behaviour like that, then I believe it would be more appropriate to extend DrHeader with a new directive 'value-greater-than' or 'value-between', but if I am honest, there's not a lot of value I can see with that at the moment. Also note that the logic in your PR changes would likely create conflicts with max-age in Cache-Control header. |
e1f3e50
to
1f0e182
Compare
@pealtrufo Sorry, it took a while, but I implemented now a greaterequal-age and it works very solid, I tested it. Hopefully we can merge this now. |
Please review again @pealtrufo :-) |
Reminder |
Hi @manuel-sommer, I just don't see what the use case of this is. 1 year is a de facto standard for HSTS As I said in my first message, we can open a discussion about increasing the default value to 2 years, which is the recommendation from Google when using the preload list and therefore increasingly common, but to my eyes, supporting any arbitrary value in between is solving a problem that does not need solving. |
Hi @emilejq, if you use a default setting and if you use this default setting to scan various services (e.g. through an automation), I don't want to have a finding returned if one service implements HSTS with 1 year and one service implements it for 1.5 years and one service implements it for 2 years as I simply don't care about that. So this feature helps to suppress false positive findings. This feature brings the benefit to use DrHeader more broadly. |
Hi @emilejq , this is a friendly reminder. :-) |
Friendly reminder @emilejq |
This adds an evaluation for the value "max-age".
As long as the evaluated max-age of HSTS is greater or equal to the yml max-age of HSTS, then, everything is fine. Otherwise, it triggers a finding.
Link to the github issue
#250