Secrets Rotation Audit
Phase 1: Secrets Inventory
Catalog all secrets and credentials in scope.
| Secret ID |
Type |
Service/Owner |
Created |
Last Rotated |
Age (days) |
Rotation Policy |
Compliant |
|
|
|
|
|
|
|
|
Secret Types: API Key, Database Credential, TLS Certificate, SSH Key, OAuth Token, Service Account Key, Encryption Key, Webhook Secret
Phase 2: Compliance Assessment
Evaluate each secret against the rotation policy.
Compliance by Type:
| Secret Type |
Total |
Compliant |
Non-Compliant |
Compliance Rate |
| API Keys |
|
|
|
|
| DB Credentials |
|
|
|
|
| TLS Certificates |
|
|
|
|
| SSH Keys |
|
|
|
|
| Service Account Keys |
|
|
|
|
| Other |
|
|
|
|
Phase 3: Risk Assessment
For each non-compliant secret, assess risk.
Decision Matrix:
| Risk |
Criteria |
Action |
| Critical |
Secret >2x policy age, has broad permissions, no MFA protection |
Rotate immediately, investigate for compromise |
| High |
Secret >policy age, used in production, shared across services |
Rotate within 48 hours |
| Medium |
Secret >policy age, limited scope, single-service use |
Rotate within 7 days |
| Low |
Secret approaching policy age, rotation scheduled |
Ensure scheduled rotation proceeds |
Phase 4: Automation Assessment
Phase 5: Remediation Plan
For each non-compliant secret:
-
-
-
-
-
Counter-Rationalizations
| Shortcut |
Counter |
Why |
| "We can skip some steps for this case" |
Adapt the workflow steps, don't skip them |
Skipped steps are where incidents and oversights originate |
| "The user seems to already know what to do" |
Complete all workflow phases with the user |
The workflow catches blind spots that experience alone misses |
| "This is a minor case, full process is overkill" |
Scale the process down, don't turn it off |
Minor cases become major when unstructured; the process scales, not disappears |
| "I'll fill in the details later" |
Complete each section before moving on |
Deferred details are forgotten; real-time capture is more accurate |
| "The template output isn't necessary" |
Always produce the structured output format |
Structured output enables comparison, audit trails, and handoff to other teams |
Output Format
Summary
- Total secrets audited: ___
- Overall compliance rate: ___%
- Critical/High risk secrets requiring immediate rotation: ___
- Automated rotation coverage: ___%
Action Items
1---2name: secrets-rotation-audit3enabled: true4description: |5 Use when performing secrets rotation audit — audits the rotation status of all6 secrets, credentials, API keys, and certificates across services and7 environments. This template identifies stale secrets, missing rotation8 policies, and non-compliant credential management practices, producing a9 remediation plan to strengthen secrets hygiene.10required_connections:11 - prefix: vault12 label: "Secrets Manager"13 - prefix: cloud14 label: "Cloud Provider"15config_fields:16 - key: environment17 label: "Environment"18 required: true19 placeholder: "e.g., production"20 - key: rotation_policy_days21 label: "Max Secret Age (days)"22 required: true23 placeholder: "e.g., 90"24features:25 - SECRETS_MANAGEMENT26 - SECURITY_AUDIT27 - SRE_OPS28metadata:29 source: https://skillmd.com/skills/cloudthinker-ai/secrets-rotation-audit30---3132# Secrets Rotation Audit3334## Phase 1: Secrets Inventory3536Catalog all secrets and credentials in scope.3738| Secret ID | Type | Service/Owner | Created | Last Rotated | Age (days) | Rotation Policy | Compliant |39|-----------|------|---------------|---------|-------------|------------|-----------------|-----------|40| | | | | | | | |4142**Secret Types:** API Key, Database Credential, TLS Certificate, SSH Key, OAuth Token, Service Account Key, Encryption Key, Webhook Secret4344## Phase 2: Compliance Assessment4546Evaluate each secret against the rotation policy.4748- [ ] Total secrets inventoried: ___49- [ ] Secrets within rotation policy: ___50- [ ] Secrets overdue for rotation: ___51- [ ] Secrets with no rotation policy: ___52- [ ] Secrets with unknown last rotation date: ___5354**Compliance by Type:**5556| Secret Type | Total | Compliant | Non-Compliant | Compliance Rate |57|-------------|-------|-----------|---------------|-----------------|58| API Keys | | | | |59| DB Credentials | | | | |60| TLS Certificates | | | | |61| SSH Keys | | | | |62| Service Account Keys | | | | |63| Other | | | | |6465## Phase 3: Risk Assessment6667For each non-compliant secret, assess risk.6869**Decision Matrix:**7071| Risk | Criteria | Action |72|------|----------|--------|73| Critical | Secret >2x policy age, has broad permissions, no MFA protection | Rotate immediately, investigate for compromise |74| High | Secret >policy age, used in production, shared across services | Rotate within 48 hours |75| Medium | Secret >policy age, limited scope, single-service use | Rotate within 7 days |76| Low | Secret approaching policy age, rotation scheduled | Ensure scheduled rotation proceeds |7778- [ ] Check for secrets stored in plaintext (code repos, config files, wikis)79- [ ] Identify secrets shared across multiple services or teams80- [ ] Verify secrets are accessed only by authorized principals81- [ ] Check for leaked secrets in public repositories or logs8283## Phase 4: Automation Assessment8485- [ ] Percentage of secrets with automated rotation: ___%86- [ ] Secrets manager integration coverage: ___%87- [ ] Rotation automation tool: ___88- [ ] Gaps in automation (manual rotation still required): list8990## Phase 5: Remediation Plan9192For each non-compliant secret:93941. - [ ] Rotate the secret952. - [ ] Update all consumers of the secret963. - [ ] Verify service continuity after rotation974. - [ ] Enable automated rotation if not already configured985. - [ ] Document rotation procedure99100## Counter-Rationalizations101102| Shortcut | Counter | Why |103|----------|---------|-----|104| "We can skip some steps for this case" | Adapt the workflow steps, don't skip them | Skipped steps are where incidents and oversights originate |105| "The user seems to already know what to do" | Complete all workflow phases with the user | The workflow catches blind spots that experience alone misses |106| "This is a minor case, full process is overkill" | Scale the process down, don't turn it off | Minor cases become major when unstructured; the process scales, not disappears |107| "I'll fill in the details later" | Complete each section before moving on | Deferred details are forgotten; real-time capture is more accurate |108| "The template output isn't necessary" | Always produce the structured output format | Structured output enables comparison, audit trails, and handoff to other teams |109110## Output Format111112### Summary113114- **Total secrets audited:** ___115- **Overall compliance rate:** ___%116- **Critical/High risk secrets requiring immediate rotation:** ___117- **Automated rotation coverage:** ___%118119### Action Items120121- [ ] Rotate all Critical risk secrets immediately122- [ ] Rotate all High risk secrets within 48 hours123- [ ] Enable automated rotation for all eligible secrets124- [ ] Remove any plaintext secrets from code or config125- [ ] Establish quarterly secrets rotation audit cadence126- [ ] Report compliance status to security team