Skip to main content
Video tutorial · 1:12

Risk scoring

Every time you open a certificate's detail page, CertAutoPilot computes a risk score from its current state — how close to expiry, renewal health, distribution coverage, issuer health, chain integrity. The score is computed on-read (no background job), aggregates weighted factors, and maps to a level: critical, high, medium, low — or healthy when no factor applies.

Why on-read​

Risk is a view over current state. Caching it in the database means we'd need to invalidate on every renewal, every distribution, every OCSP check — fragile. Computing it at read time from already-fresh state is both cheaper in code and guaranteed correct. The UI renders lazily so the operator doesn't wait for risk on list views unless they expand.

Levels​

LevelScoreSemantic
Critical≥ 50Act now. Revoked, expired, or expiring within 3 days.
High30–49Intervene this week. Near-term expiry or failing renewals.
Medium15–29Watch. Inside the renewal window, a rolled-back distribution, an unhealthy issuer.
Low1–14Minor signals only (for example a missing intermediate chain).
Healthy0No risk factor applies.

Risk factors​

Each factor that applies contributes its weight to the score. The active factors are shown sorted by weight so you see the biggest contributors first.

FactorWeightWhen it fires
Revoked60Certificate status is revoked.
Expired60Certificate status is expired.
Expiry ≤ 3 days50Three days or less remain (see windows).
Renewal failed45Certificate status is renewal_failed (the safety net keeps retrying until expiry).
Expiry ≤ 7 days35Between 3 and 7 days remain (see windows).
Renewal attempts nearly exhausted30The renewal attempt counter has reached one below the certificate's maximum.
Distribution failed25At least one enabled distribution's latest run ended failed.
Auto-renew disabled20Auto-renew is off and the certificate expires within 60 days (see windows).
Issuer unhealthy20The ACME account / MSCA connection / CA connection is in an error state.
Expiry ≤ 30 days15Between 7 and 30 days remain — normal renewal window, surfaced so operators see it (see windows).
Distribution rolled back15At least one enabled distribution was rolled back, so its targets serve the previous certificate.
Distribution stalled10Distribution has been pending for over an hour and the wait is not explained by a maintenance window. A certificate whose only outstanding distributions are waiting for their next window is not counted — that wait appears as the Scheduled distribution signal below. Anything else still pending after an hour is counted, including a pending flag left behind with nothing due.
Missing chain10The current version has no intermediate chain stored.

The score is capped at 100; numbers above simply saturate.

Short-lived certificates​

Each expiry window (3, 7, 30 and 60 days) is capped at a third of the certificate's lifetime, rounded up to whole days. A 30-day certificate is therefore counted as expiring in its last 10 days, not from the day it is issued; a one-year certificate keeps the full windows. The factor's text names the window that applied ("expires within 10 days"). The dashboard's Expiring counts use the same rule.

Attention signals​

Additional signals surface as warnings on the detail page without contributing to the score — informational rather than risk-driving:

  • Scheduled distribution — the latest version is waiting for a distribution schedule window; the signal names when the window opens. The certificate detail shows the same wait as a Scheduled badge instead of Pending.
  • Wildcard — the certificate contains a wildcard SAN — compliance teams may require explicit tracking.
  • High SAN count — the certificate covers more than 10 domains.
  • Manual DNS — the certificate uses manual DNS validation, so renewal is not automated.
  • Next renewal makes a new key — the key-rotation policy rotates the key at the next renewal (every N renewals). Not shown when every renewal makes a new key.

Mutual exclusion​

Some factors would double-count if both applied:

  • Revoked and Expired come from the certificate status, so at most one of them fires; while either applies, the expiry buckets are skipped.
  • Among expiry buckets, only the worst applicable one fires — a cert 2 days out doesn't also trigger the ≤ 7 and ≤ 30 buckets.

Where you see risk​

  • Certificate list: per-row icon (hover for factors).
  • Certificate detail: full factor list with weights, sorted DESC.
  • Dashboard: aggregate counts per level.

Tuning​

Weights are currently fixed in the backend (internal/service/cert_risk_service.go) — they are product defaults chosen from operational experience with CA/B Forum shortening trends. If you need different weights for internal compliance reporting, export the factor data via API and recompute in your own dashboards. Runtime-configurable weights are on the roadmap.

Troubleshooting​

"Cert shows as critical but looks fine"​

Click to expand the factor list — the specific reason is shown. Most common surprise: OCSP showed revoked during a discovery probe (another team revoked it independently).

"Risk level didn't update after I fixed the issue"​

Risk is on-read — the next page load recomputes. If you see a stale value, the page you're looking at is cached client-side; refresh.

See also​

Video tutorial

Short, hands-on videos showing this feature working for real. English audio, English and Turkish subtitles. All video tutorials →

Certificate Detail — Chain of Trust, Timeline and Dependency GraphYouTube ↗