Dev.to Security 🔐 Cybersecurity 👁 2 📖 4 min read

certcadence: reading renewal history to see which domains break when certificate lifetimes shrink

If you renew a TLS certificate by hand once a year, the CA/Browser Forum's schedule for shorter certificate lifetimes (ballot SC-081v3) will break that habit, and the question is which of your domains it breaks first. ce

If you renew a TLS certificate by hand once a year, the CA/Browser Forum's schedule for shorter
certificate lifetimes (ballot SC-081v3) will break that habit, and the question is which of your
domains it breaks first. certcadence takes a list of
domains, looks at how each was actually renewed, and names the cap date that breaks it. It is
standard-library Python. I built it as one person directing AI coding agents, with tests and a
review by a separate AI agent as the checks.

The problem

The maximum lifetime of a public TLS certificate drops in steps: 200 days from 2026-03-15, 100 days from
2027-03-15 and 47 days from 2029-03-15 (Let's Encrypt's own defaults move to 64 days in February 2027
and 45 days in February 2028). The rule text and quotes are in docs/sources.md. Expiry monitors check
one live certificate. Nothing free I found infers a renewal rhythm from history, though that search was
about half an hour and docs/sources.md says so: it was not exhaustive.

What it does

For each domain it asks Certificate Transparency (crt.sh, with Cert Spotter as a fallback), reads the
live certificate over TLS, and applies a short list of rules in order:

lifetime >= 180 days                          -> manual (no ACME default is that long)
median interval > 85% of lifetime             -> manual (renewed at or after expiry)
3+ intervals, median abs. deviation > 25%     -> manual (irregular)
lifetime <= 100 days, at least one renewal    -> ACME-like
otherwise                                     -> unknown

The verdict is READY, AT RISK on <date> or UNKNOWN, printed with the exact rule that produced it.

The design decision I would defend is that a certificate series is defined by issuer organisation, not
by the exact set of names. My first version required the same SAN set. Running it on kit.edu gave
"only one certificate in the series", although CT held six. The cause: crt.sh lists only the names that
match the query (4 names on one certificate), while Cert Spotter returned all 18 for the same kind of
certificate, and the dedupe kept whichever source came first. The live certificate had no partner.
The fix, with a regression test on real rows, was to stop comparing SAN sets, which also change
legitimately between renewals. The trade-off is in docs/qa/kit-edu-series.md: several independent
certificate lines from one CA now merge into one series, and I handled that by grouping issuances that
land close together into one renewal event.

How it is tested

The unit tests are offline and use fixtures. On Python 3.9 and 3.13, 72 tests pass, and the tool uses
only the standard library.

git clone https://github.com/basartuncay/certcadence && cd certcadence
python3 -m unittest -v
python3 -m certcadence example.com python.org        # needs network

What 72 passing tests do not show: whether the verdicts are right for your domains. A verdict is a
heuristic read from public CT data. CT shows issuance, not deployment, so a certificate can be issued
automatically and still be copied to a load balancer by hand. Some CAs automate long-lived
certificates, and certcadence calls those manual because their cadence still breaks under the caps. I
checked four domains by hand after the kit.edu fix; that is a sanity check, not a measured accuracy.

What the security audit found

An audit before publication found three issues, all fixed:

  • IPv4 shorthand passed as a domain. 127.1 (and 0x7f.1) looked like a hostname with a numeric label. The live check would still have refused it, because it checks the resolved address, but the input check now rejects these as IP addresses, exit code 2, and tests cover 127.1, 0x7f.1 and 1.0x7f.
  • A pre-existing cache directory kept wider permissions. os.makedirs(mode=0o700) only applies the mode when it creates the directory. The code now calls os.chmod(..., 0o700) as well.
  • The README was wrong about what is sent to the CT services. The public-address rule covers the live TLS check only. Every name you pass, an internal hostname included, goes to crt.sh or Cert Spotter, along with the wildcard of its parent. The Privacy section now says this plainly.

The third finding is a documentation bug, and for a privacy tool that is a real bug.

Limits and what is not done

  • It is not an expiry monitor and sends no alerts. Run it on a schedule, for example with the included GitHub Action and --fail-within.
  • There is no offline mode. The tool needs crt.sh or Cert Spotter and a TLS connection to the domain.
  • crt.sh is a free community service; it goes down and truncates very large result sets. Then the verdict rests on less data and is often UNKNOWN.
  • Only port 443 of the first reachable address is checked, and DNS plus TLS share a 30-second budget per domain.
  • An AT RISK date can lie in the past when a renewal is overdue. In my own run on 2026-11-19, python.org showed 2026-11-16 for that reason.

Code: https://github.com/basartuncay/certcadence

Originally published at https://basartuncay.github.io/notes/certcadence-47-day-cap/.

This article was written with AI assistance. I directed the work, and the numbers and findings in it were checked against the repository before publishing.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.