360 Secure SkillHub
360 安全技能中心

SSL Certificate Monitor

用于检查一个或多个域名的 SSL/TLS 证书健康状态,包括剩余天数、签发者、协议版本和 SAN,支持自定义端口、告警阈值、超时与 JSON 输出,并通过退出码反馈告警或失败。依赖 Python 标准库,可通过命令行执行。

johnnywang2001
johnnywang2001
热度 81.02
最近更新 2026-05-11 17:30:07
分类:安全依赖:代码执行应用场景:DevOps / 自动化脚本 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add jrv-ssl-monitor
Metadata
name
jrv-ssl-monitor
description
Check SSL/TLS certificate expiry, issuer, protocol, and SANs for one or more domains. Use when asked to check SSL certificates, monitor cert expiry, verify HTTPS is working, audit domain security, or check if a certificate is about to expire. Supports custom ports and warning thresholds. No external dependencies — uses Python stdlib ssl module.

SSL Certificate Monitor

Check SSL certificate health for any domain — expiry, issuer, protocol version, and Subject Alternative Names.

Quick Start

python3 scripts/check_ssl.py example.com
python3 scripts/check_ssl.py example.com google.com github.com --warn-days 30
python3 scripts/check_ssl.py internal.host --port 8443 --json

Features

  • Expiry check — days remaining with configurable warning threshold
  • Multi-domain — check multiple domains in one command
  • Certificate details — subject, issuer, protocol, serial number, SANs
  • Error handling — detects DNS failures, timeouts, verification errors, refused connections
  • Exit codes — 0 = all ok, 1 = warnings, 2 = expired or failed (useful for cron/CI)
  • No dependencies — Python stdlib only

Options

Flag Description
--warn-days N Warning threshold in days (default: 14)
--port PORT Port to check (default: 443)
--json Output structured JSON
--timeout N Connection timeout in seconds (default: 10)

Use Cases

  • Daily cron job to monitor production domains
  • Pre-deployment cert validation
  • Audit all company domains in one pass
  • CI/CD pipeline gate for cert health