secret-rotator
Audit and rotate API keys, tokens, and secrets with expiry tracking and safe handling.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- description
- Audit and rotate API keys, tokens, and secrets with expiry tracking and safe handling.
02 资源文件 2
- 参考文档_meta.json280 B
- 参考文档README.md530 B
03 SKILL.md 正文
Secret Rotator
Audit, track, and rotate API keys, tokens, and secrets safely.
Requirements
- File system access to scan
.envand config files - No API keys needed (this tool manages other tools' keys)
Instructions
Step 1: Inventory secrets (with user consent)
⚠️ Always ask the user which directories to scan before running.
# Find .env files in specified directories
find ~/projects -maxdepth 3 -name ".env*" -type f 2>/dev/null
# Common config locations
ls -la ~/.config/*/config* ~/.ssh/config 2>/dev/null
Report for each secret found:
- File path
- Key name (e.g.,
OPENAI_API_KEY) - Last modified date and age in days
- NEVER print actual secret values
Step 2: Age analysis
## ? Secret Inventory — <timestamp>
| File | Key | Age | Status |
|------|-----|-----|--------|
| ~/project/.env | OPENAI_API_KEY | 45d | ? OK |
| ~/app/.env | DB_PASSWORD | 120d | ? Rotate Soon |
| ~/.config/app/config | API_TOKEN | 200d | ? Overdue |
**Policy**: ? < 90 days | ? 90–180 days | ? > 180 days
Step 3: Rotation guidance
For each key needing rotation:
- Identify the service (OpenAI, AWS, Stripe, etc.)
- Provide the dashboard URL for key regeneration
- List all files that reference this key (need updating after rotation)
Step 4: Post-rotation verification
- Test the new key works (e.g.,
curla health endpoint with the new key) - Confirm old key is invalidated
- Update file timestamps
- Verify
.gitignoreincludes all secret files
Security Rules
- ❌ NEVER display full secret values — mask as
sk-...XXXX(last 4 only) - ❌ NEVER send secrets via chat, logs, or messaging
- ❌ NEVER commit secrets to git
- ✅ Always
chmod 600on secret files - ✅ Verify
.gitignoreentries exist for.env*files - ✅ Show only key names and metadata, never values
Edge Cases
- Symlinked .env files: Follow symlinks but report the real path.
- Docker secrets: Check
docker secret lsif Docker is available. - Env vars only (no file): Some keys exist only in environment — note these can't be age-tracked.
- Shared secrets: Warn if the same key appears in multiple files (update all on rotation).
- No secrets found: Report clean scan — still suggest setting up a rotation policy.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.