Bring script headers onto the template and close safeguard gaps
Headers claimed protections the code never had, and several destructive paths had no guard against a collapsed config value.
This commit is contained in:
@@ -15,6 +15,23 @@
|
||||
# separate message lists all CRITICAL domains. Not one notification per domain.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL MODEL
|
||||
# ==============================================================================================
|
||||
#
|
||||
# 1. Validate openssl is present (platform_require_cmd) — without it nothing can be checked
|
||||
# 2. Per domain in CERT_MONITOR_DOMAINS:
|
||||
# a. Open a real TLS connection with openssl s_client
|
||||
# b. Parse notAfter from the served certificate
|
||||
# c. Compute days remaining
|
||||
# d. Classify: HEALTHY (silent) | WARNING (≤ CERT_WARN_DAYS)
|
||||
# | CRITICAL (≤ CERT_CRIT_DAYS) | FAILED (no connect / no parse)
|
||||
# 3. Batch by severity — one notification listing all WARNING domains, a separate
|
||||
# one listing all CRITICAL domains
|
||||
#
|
||||
# A domain that fails to connect is reported as FAILED rather than assumed healthy or
|
||||
# assumed expired — an unreachable host and an expiring cert are different problems.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# DESIGN PRINCIPLES
|
||||
# ==============================================================================================
|
||||
#
|
||||
@@ -44,8 +61,10 @@
|
||||
# CERT_TIMEOUT caps each openssl connection attempt. One unreachable domain
|
||||
# does not block the remaining domains.
|
||||
#
|
||||
# Notification Validated
|
||||
# platform_require_cmd confirms openssl and notify script are present before use.
|
||||
# openssl Validated
|
||||
# platform_require_cmd confirms openssl is present before any domain is checked — every
|
||||
# check depends on it, so a missing binary is reported as itself rather than as every
|
||||
# domain failing. The notify script is validated separately by the platform adapter.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# CONFIGURATION
|
||||
|
||||
Reference in New Issue
Block a user