Skip to content

security/tls-certificate: 30-day expiry warning fires on healthy auto-renewing certs (73% of warnings at 25-30 days left) #1279

Closed

Description

@nc9

security/tls-certificate (#716) warns when a certificate has warn_days (default 30) or fewer days left. Automated CAs renew 90-day certificates at about 30 days remaining: Let's Encrypt and certbot's default, and the managed certificates on Cloudflare, Google and Vercel. So a healthy, auto-renewing certificate warns for a day or so before every routine renewal.

In a ~38k-site batch on v0.0.141, the rule fired on about 2.7% of sites. In an 8,000-report sample, 216 expiry findings were spread like this:

days left findings
25–30 157
20–24 21
15–19 12
10–14 9
5–9 8
0–4 9

About 73% sit right at the renewal point, where nothing is wrong. Certificate lifetimes are also shrinking (CA/B Forum ballot SC-081: 200 days from 2026-03, then 100, then 47 by 2029), so a fixed 30-day window will flag a growing share of valid certificates.

Acceptance Criteria

  • The default warning no longer fires on a certificate inside its CA's normal renewal window. The threshold is relative to the certificate's lifetime (notAfter - notBefore, e.g. warn below 1/3 of the lifetime minus a margin, or a fixed 14 days for 90-day certs), or the default warn_days is lowered to 14 with the reasoning documented.
  • A test pins a 90-day certificate with 28 days left (no warning by default), one with 10 days left (warning), and one with 5 days left (error at the default error_days = 7).
  • warn_days / error_days overrides keep working, and the rule docs page explains the default and the renewal-window reasoning.

Activity

  1. added
    bug
    on Oct 29, 2026
  2. added theissue type on Oct 29, 2026
  3. added
    size: S
    rules
    security
    on Oct 29, 2026
  4. nc9 commented on Oct 29, 2026

    @nc9
    ContributorAuthor

    Decision (Nik, 2026-10-29): the expiry warning threshold becomes relative to the certificate's lifetime (notAfter minus notBefore), for example warning in the last third of the validity period, so healthy auto-renewing certificates (90-day, and the coming 47-day lifetimes) stop warning at their normal renewal point. warn_days stays as an explicit override. Queued with the tls-certificate group (#1259).

  5. nc9 commented on Oct 30, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.143 (commits 7cfcc02, bf192ce). Checked every acceptance criterion against current main: lifetime-relative TLS expiry warning and the re-scoped criteria.

    nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessecuritysize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions