feat(secrets): one expiry classifier and a manifest-only expiry report (P8, 1/3) #98
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/feat/secrets-expiry-report"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
P8 needs a monthly report of expired / approaching / unknown secrets.
manage secret list-expiringalready bucketed overdue and due-soon inline; this extracts it into one shared definition and adds the report.scripts/lib/secret_expiry.py: pure classification over the manifest (never reads a value): expired (ISOexpiryin the past), overdue (rotation interval passed), approaching (expiry within 30d or rotation due within 14d), unknown, documented (free-text expiry), ok.scripts/secrets-expiry-report.py: text / json / markdown output; exit 2 only for expired or overdue, so approaching and unknown never fail a run.manage secret list-expiringnow calls the report (output reorganised into the same buckets plus UNKNOWN; counts and audit log kept).rotated_at: nullwith a schedule is now UNKNOWN, not OVERDUE (the P3 rule: null means unknown, not overdue). Before, 19 secrets with a schedule but no recorded date showed as 'never rotated' alarms. They are still listed, under UNKNOWN.manage secret list-expiringlive on the real manifest: expired=0 overdue=0 approaching=0 unknown=49 documented=1 ok=12; shellcheck -S error clean.49 UNKNOWN is the honest state of the manifest: most entries carry no real expiry or rotation date. PR 3 records what the repo actually knows (and does not invent the rest). PR 2 is the rotation lock; PR 3 the monthly workflow.
🤖 Generated with Claude Code