AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Rotate Secrets

skill-onlyterp-hermes-optimization-guide-rotate-secrets · by OnlyTerp

Rotate webhook HMACs, API keys, OAuth tokens, and update gateway configs atomically

No reviews yet
0 installs
36 views
0.0% view→install

Install

$ agentstack add skill-onlyterp-hermes-optimization-guide-rotate-secrets

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-onlyterp-hermes-optimization-guide-rotate-secrets)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Rotate Secrets? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

rotate-secrets — Atomic Secret Rotation

Rotate secrets in ~/.hermes/.env, propagate the new values to every service that consumes them, and restart only the affected gateways.

Procedure

  1. Parse the pattern. Match against every key in ~/.hermes/.env. Support glob syntax (*, ?, [abc]) and the literal all.
  1. For each matched key:

a. Determine the secret kind from the key name:

  • *_HMAC_* or *_WEBHOOK_SECRET → generate openssl rand -hex 32
  • *_API_KEY → prompt the user to provide the new value (can't auto-rotate external APIs)
  • GITHUB_*_TOKEN → open https://github.com/settings/tokens and prompt for new PAT
  • TWILIO_AUTH_TOKEN → direct user to rotate in Twilio console and prompt for new value
  • Unknown pattern → prompt user for the kind

b. Back up the current .env as ~/.hermes/.env.bak.YYYYMMDDHHMMSS before any write.

c. Update the .env atomically: ``bash sed -i "s/^$KEY=.*/$KEY=$NEW_VALUE/" ~/.hermes/.env `` If the key is missing, append it.

  1. Propagate to external services. For HMAC / webhook secrets, update the remote side:
  • GitHub webhooks: use github MCP to PATCH /repos/{owner}/{repo}/hooks/{hook_id} with config.secret
  • Twilio: user-guided — we don't touch Twilio SMS webhook config automatically
  • Slack: user-guided — rotate signing secret in App Manifest
  • Discord: user-guided — rotate public key in Developer Portal
  • Generic webhook: ask the user where the producer-side config lives
  1. Restart only affected gateways.
  • TELEGRAM_BOT_TOKENhermes gateway restart telegram
  • DISCORD_*hermes gateway restart discord
  • Slack signing → hermes gateway restart slack
  • GitHub webhook secret → no restart needed (validated per-request)
  • SMS / Twilio → hermes gateway restart twilio
  1. Verify. Run hermes doctor and fail loud if any gateway is unhealthy post-rotation. If unhealthy, restore from the .env.bak.* backup and report.
  1. Emit a rotation log entry. Append to ~/.hermes/logs/rotations.log:

`` 2026-04-17T14:22:00Z rotated webhook_hmac_github by=user result=ok prev_sha=abc123 new_sha=def456 `` Store SHA-256 of the secret, never the plaintext.

Security notes

  • Never log the plaintext new or old value.
  • Never echo a secret into the Telegram/Discord channel where the rotation was requested — use DM channels only (Hermes' approval_channels default).
  • For critical rotations (Anthropic, OpenAI, etc.), pause all gateways during rotation to prevent mid-flight requests hitting rejected keys.
  • Back up .env before every run; retain 30 days of backups.

Example invocation

/rotate-secrets webhook_hmac_*
/rotate-secrets TWILIO_AUTH_TOKEN
/rotate-secrets all                  # With interactive confirmation per key

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.