-
Notifications
You must be signed in to change notification settings - Fork 110
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
lints: lint for upcoming Apple max cert lifetime policy. #417
Conversation
A new `e_tls_server_cert_valid_time_longer_than_398_days` lint is added for the Apple source category (presently named "AppleCTPolicy", see TODO in code). This lint returns an error lint result if a certificate issued after Sept 1st, 2020 has a lifetime > 398 days. A notice result is returned if a certificate issued after Sept 1st, 2020 has a lifetime > 397 days and < 398 days. This matches Apple's recommendation to use a validity period <= 397 days in length. See https://support.apple.com/en-us/HT211025 for more information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but with a few nits
A comment is included to justify the rationale. This also better matches the name of the `warnEndDate` variable.
Thanks for the review @sleevi! I think it's ready for a second 🔍 when you have a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good, I wasn't sure if @zakird wanted to look but I think you've got it all.
No need to block on me
…On Tue, Mar 17, 2020 at 8:51 AM sleevi ***@***.***> wrote:
***@***.**** approved this pull request.
Thanks! Looks good, I wasn't sure if @zakird <https://github.com/zakird>
wanted to look but I think you've got it all.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#417 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABREUDM2MTWKUXGLUA4UF3RH6L67ANCNFSM4LF3FMMQ>
.
|
Thanks all. I'll update the PR description and squash merge it momentarily. |
A new
e_tls_server_cert_valid_time_longer_than_398_days
lint is added for the Apple source category (presently namedlint.AppleCTPolicy
, see #418).This lint returns an error lint result if a server-auth certificate issued after Sept 1st, 2020 has a lifetime > 398 days. The lifetime is calculated as Apple specifies, e.g. "398 days is measured with a day being equal to 86,400 seconds.".
A warning result is returned if a certificate issued after Sept 1st, 2020 has a lifetime > 397 days and < 398 days. This matches Apple's SHOULD-equivalent recommendation to use a validity period <= 397 days in length.
See https://support.apple.com/en-us/HT211025 for more information.
Resolves #407