Sentinel · security scanner
tls-sentinel
Check TLS endpoints for expiring or untrusted certificates, hostname mismatches, missing intermediates, weak keys and signatures, TLS 1.0/1.1, weak ciphers and missing TLS 1.3.
npm i -D @mrlouiswright/tls-sentinelPublished to GitHub Packages: add @mrlouiswright:registry=https://npm.pkg.github.com to .npmrc first (installing needs a token with read:packages).
What it checks
cert-expiredCertificate has expiredcert-not-yet-validCertificate is not valid yethostname-mismatchCertificate does not cover the host nameuntrusted-chainChain does not lead to a trusted rootself-signedSelf-signed certificateincomplete-chainServer does not send the intermediate certificatescert-expiringCertificate expires within the critical window (default 14 days)cert-expiring-soonCertificate expires within the warning window (default 30 days)
Quick usage
CLI
npx tls-sentinel example.com www.example.com:443 api.example.com:8443
npx tls-sentinel internal.corp:636 --ca corp-root.pem --quick --warn-days 45
npx tls-sentinel https://example.com --format sarif > tls.sarif
API
import { check, exitCode } from 'tls-sentinel';
const report = await check(['example.com'], { quick: true, warnDays: 21 });
console.log(report.targets[0].summary.daysLeft);
process.exitCode = exitCode(report, 'high');
Every option is documented in the tls-sentinel docs.
CI / GitHub Action
permissions:
contents: read
security-events: write # only for the SARIF upload
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with: { persist-credentials: false }
- uses: MrLouisWright/tls-sentinel@v1
with:
targets: 'example.com'
fail-on: high
sarif: tls-sentinel.sarif
- uses: github/codeql-action/upload-sarif@v3
if: always()
with: { sarif_file: tls-sentinel.sarif }