Skip to main content

security.cert-inventory

Type: commands | Track: Enterprise | Version: 1.0.0

Inventory ACM certificates across a multi-account Landing Zone using Config Aggregator P1 path (176 certs, 31 accounts, 1.19s). Includes 4-way cross-validation and risk-ranked expiry triage.


Quick Start

pip install runbooks

# Org-wide inventory (Config Aggregator P1 path)
runbooks cert inventory --ops-profile $AWS_OPERATIONS_PROFILE --all-accounts

# Filter certificates expiring within 90 days
runbooks cert expiring --days 90 --ops-profile $AWS_OPERATIONS_PROFILE --all-accounts

# Risk-ranked triage output
runbooks cert triage --ops-profile $AWS_OPERATIONS_PROFILE --all-accounts

# Full report with CSV + JSON export
runbooks cert report --ops-profile $AWS_OPERATIONS_PROFILE --all-accounts \
--export-csv certs.csv --export-json certs.json

For the full 7-phase ADLC pipeline (coordination enforcement, evidence collection), invoke /security:cert-inventory from the ADLC command interface.


Parameter Reference

ParameterCLI FlagEnvironment VariableRequiredDescription
Modesubcommand (inventory, expiring, report, triage)YesOperation to execute
Days window--daysNo (default 90)Expiry threshold in days for expiring subcommand
Ops profile--ops-profileAWS_OPERATIONS_PROFILERecommendedSSO profile with Config Aggregator access
All accounts--all-accountsFor org-wide scanOrg-wide discovery via Config Aggregator
Management profile--management-profileAWS_MANAGEMENT_PROFILEP3 fallbackProfile for AssumeRole per-account fallback
Count only--count-onlyNoPrint total count and exit
Status filter--status TEXTNoFilter by ACM status (e.g. ISSUED, EXPIRED)
CSV export--export-csv PATHNoWrite results to CSV file
JSON export--export-json PATHNoWrite results to JSON file
Azure--azureNoInclude Azure Key Vault certificates

Subcommands

inventory

Enumerate all ACM certificates in scope. Uses Config Aggregator SQL (SELECT from aws_acm_certificate) when --all-accounts is passed. Returns domain, expiry date, status, and account ID per certificate.

runbooks cert inventory --ops-profile $AWS_OPERATIONS_PROFILE --all-accounts --export-csv certs.csv

expiring

Filter to certificates expiring within --days (default 90). Sorted by expiry date ascending. Suitable for renewal queue generation.

runbooks cert expiring --days 30 --ops-profile $AWS_OPERATIONS_PROFILE --all-accounts

triage

Risk-rank all certificates into four buckets: CRITICAL (expired + in-use), removal candidates (expired + unused), MEDIUM (expiring within 90d), OK (valid beyond 90d). Outputs a summary table and per-bucket detail.

runbooks cert triage --ops-profile $AWS_OPERATIONS_PROFILE --all-accounts

report

Generate a combined Markdown report with inventory summary, expiry breakdown, triage buckets, and optional CSV/JSON exports. Intended as the primary deliverable for HITL review.

runbooks cert report --ops-profile $AWS_OPERATIONS_PROFILE --all-accounts \
--export-csv tmp/certs.csv --export-json tmp/certs.json

Phase Overview

PhaseNameDescription
0A-COORDCoordination gateproduct-owner and cloud-architect logs required (BLOCKING)
0BSSO pre-flightaws sts get-caller-identity plus Config Aggregator permission check
0CDiscovery strategyP1 Config Aggregator, P2 Resource Explorer, P3 direct API fallback
1InventoryConfig Aggregator SQL — 176 certs, 31 accounts, 1.19s
2Expiry filterApply --days window, extract renewal candidates
3Report generationCSV + Markdown deliverables
4Cross-validationL1 Config Aggregator vs L3 runbooks CLI, 0% variance confirmed
5TriageCRITICAL / HIGH / MEDIUM / OK / removal candidate buckets
6Evidence consolidationJSON session log, screenshots, tmp/PROJECT/certs/

Skills Dependencies

SkillPurposePhase
cert-preflightSSO validation, Config Aggregator access check0B
org-wide-cross-validationL1 vs L3 variance check, root-cause template4
cert-expiry-filterDays window application, renewal queue sort2
cert-triageCRITICAL/HIGH/MEDIUM/OK bucket logic5

Deliverables

ArtifactFormatPath
Certificate inventoryCSVtmp/PROJECT/certs/cert-inventory-YYYY-MM-DD.csv
Triage summaryMarkdowntmp/PROJECT/certs/cert-triage-YYYY-MM-DD.md
Cross-validation resultJSONtmp/PROJECT/certs/cross-validation-YYYY-MM-DD.json
Visual evidencePNGtmp/PROJECT/screenshots/cert-triage-YYYY-MM-DD.png
Session logJSONtmp/PROJECT/coordination-logs/cert-inventory-YYYY-MM-DD.json

See the Certificate Inventory Architecture page for full Mermaid diagrams, the Config Aggregator decision tree, and live-validated results.