@hmcrum/tls-cert-expiryv2026.09.17.1· 3d ago//MODELS
01README
Standalone TLS certificate expiry checker. Give it hostnames, get back days-until-expiry — no external service dependency.
@lint/cert-health already has a TLS-probe method that does the same handshake, but it lives behind globalArguments that require Nginx Proxy Manager credentials even if you never touch NPM. This model has none of that: just the probe, with its own configurable warn/critical thresholds.
One method, check. TLS-handshakes every listed host (via openssl s_client/openssl x509), classifies each by days remaining, and writes one resource per host plus a fleet-wide summary. A probe failure degrades that one host to an error status instead of aborting the whole batch.
Requires openssl on the machine running swamp. No vault, no credentials, no third-party account.
Quick Start
--global-arg warnThresholdDays=30 --global-arg criticalThresholdDays=7
swamp model method run certs check \
--input hosts='["example.com","gateway.example.net:8443"]'
Days-remaining at or below which a cert is classified `warn`
criticalThresholdDays
number
yes
Days-remaining at or below which a cert is classified `critical`
timeoutSec
number
yes
Per-host TLS connect + handshake timeout
fncheck(hosts: array, defaultPort: number)
TLS-handshake every listed host, classify each by days-until-expiry against warnThresholdDays/criticalThresholdDays, and write a per-host result plus a fleet-wide summary. Probe failures degrade to a per-host `error` status instead of aborting the batch.
Argument
Type
Required
Description
hosts
array
yes
Hostnames to check. Use host:port to override defaultPort per entry.
defaultPort
number
yes
Port used for any host entry that doesn't specify its own
Resources
cert(infinite)— Per-host TLS certificate result: expiry, days remaining, and classification
summary(infinite)— Fleet-wide rollup: counts per status plus the hosts closest to expiry
03Stats
A
100 / 100
Downloads
0
Archive size
8.1 KB
✓Has README or module doc2/2earned
✓README has a code example1/1earned
✓README is substantive1/1earned
✓Most symbols documented1/1earned
✓No slow types (deprecated)1/1earned
✓Dependencies pass trust audit2/2earned
✓Has description1/1earned
✓Platform support declared (or universal)2/2earned