Local CLI and desktop planner for prioritizing API key and secret rotations
Project description
key-rotation-planner
key-rotation-planner turns messy API key and secret inventory notes into a local rotation plan. It reads .env-style comments, CSV, or JSON records, redacts long values, scores stale keys, and produces Markdown, JSON, or HTML reports.
It is designed for teams that track provider keys, webhooks, deploy tokens, and shared credentials across notes or issue comments and need a quick rotation checklist before integrations age out.
Install
pip install key-rotation-planner
Usage
key-rotation-planner examples/secrets-inventory.txt
key-rotation-planner examples/secrets-inventory.txt --format html --output rotation-plan.html
key-rotation-planner examples/secrets-inventory.txt --fail-on-overdue
key-rotation-planner-gui
Inventory lines can be informal:
OPENAI_API_KEY=sk-redacted # service=openai env=prod owner=ai-platform last_rotated=2026-02-12 cadence=60d
STRIPE_WEBHOOK_SECRET=whsec-redacted # service=stripe env=prod owner=billing last_rotated=2026-05-18 cadence=45d
LEGACY_ADMIN_TOKEN=redacted # env=prod last_rotated=2025-12-01
CSV and JSON inputs are also supported with fields such as name, service, owner, environment, last_rotated, and cadence_days.
Output
The planner reports:
- Overdue, due-soon, healthy, and unknown-age keys.
- Due dates calculated from
last_rotatedplus cadence. - Owner and production-scope gaps.
- Risk scores weighted by age, missing owner, production usage, and sensitive service names.
- Copy-ready next steps for the highest-priority rotations.
Development
python3 -m unittest discover -s tests
python3 -m build --no-isolation
python3 -m twine check dist/*
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file key_rotation_planner-0.1.0.tar.gz.
File metadata
- Download URL: key_rotation_planner-0.1.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
242c630d4c6fc11bb2a641828c904abc6a1b73d3ff8ed2e4274bbe7e23462625
|
|
| MD5 |
bab3b23c17b9ebf9239773b9a6121c2d
|
|
| BLAKE2b-256 |
b4e7ffabcc0e98d828acc0189361fcb985bd7349c46ed2e72b0d982d397d3b9f
|
File details
Details for the file key_rotation_planner-0.1.0-py3-none-any.whl.
File metadata
- Download URL: key_rotation_planner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
678097221fef3e37e7af861ccf84a7f79f7ca096e0d3720c54400aa5b6aa9f6e
|
|
| MD5 |
6f5ded8de65fc39e007819ab1f76f3b7
|
|
| BLAKE2b-256 |
e2bd623f27eaccd94247407961620d8d8a96b7be89f9d1ac5167e6c87caeaf70
|