Skip to main content
prompt GP ChatGPT

API Key and Credential Rotation Runbook (JSON) — ChatGPT, Claude.ai

The API Key and Credential Rotation Runbook (JSON) is a prompt for ChatGPT, Claude.ai, and Claude Code that builds a secure secret rotation plan. It outputs a structured JSON object with steps.

CC0-1.0 ★ 178,201 updated 2026-10-24

Open on GitHub

What API Key and Credential Rotation Runbook (JSON) does

This prompt functions as a security engineering assistant that converts rotation logic into a standardized JSON format. It requests specific inputs such as the secret type, its storage location, all dependent services, the reason for rotation, and provider capabilities regarding key overlap.

The generated runbook includes a blast radius assessment, preparation tasks, rotation steps, verification procedures, and a rollback strategy. If an incident is flagged, the prompt adds sections for audit log reviews and evidence tracking.

Before running the prompt, identify every system using the secret, including CI/CD variables, local .env files, and external partner integrations. The output relies on placeholders like <NEW_SECRET_REF> instead of actual credential values to maintain security protocols during the planning phase.

What it helps with

  • generate a structured secret rotation runbook
  • assess operational risks during credential updates
  • create specific rollback instructions
  • document security verification steps

Example prompts for the agent

  • Generate a rotation runbook for an AWS Secret Manager key used by five internal services.
  • Create a JSON rotation plan for a database password after a confirmed leak, including a short maintenance window.

How to install API Key and Credential Rotation Runbook (JSON)

How to use

Paste the text at the start of a chat or into project instructions

Questions about API Key and Credential Rotation Runbook (JSON)

How to install the API Key and Credential Rotation Runbook (JSON) prompt?

Simply copy the provided prompt text and paste it directly into your chat interface in ChatGPT, Claude.ai, or Claude Code when starting a security task.

What does this prompt do?

It processes your security inputs to produce a single JSON object containing a comprehensive rotation strategy, health checks, and communication plans.

What is required to use this prompt?

You need the secret type, storage location (e.g., vault, Kubernetes secrets), a list of consumers, the reason for rotation, and details on whether the provider supports dual-credential overlap.

Source text

prompts.csv · CC0-1.0
You are a senior platform security engineer. Using the schema below, produce a complete credential rotation runbook as one valid JSON object for the secret I describe (an API key, database password, OAuth client secret, signing key, webhook secret, cloud access key, SSH key or TLS certificate). Ask me up to 5 short questions first if the inputs are missing, then output ONLY the JSON, with no comments and no trailing commas.

My inputs:
- Secret type and provider:
- Where it is stored (vault, cloud secret manager, CI variables, .env files, Kubernetes secrets):
- Every service, job, device or partner that uses it:
- Reason for rotation (scheduled, employee offboarding, suspected leak, confirmed leak, compliance):
- Can the provider keep two valid credentials at once (yes / no / unknown):
- Allowed downtime and team size:

Schema:

```json
{
  "rotation_runbook": {
    "summary": {
      "secret_name": "",
      "secret_type": "",
      "provider": "",
      "reason": "",
      "severity": "routine | elevated | incident",
      "owner": "",
      "approver": "",
      "target_completion": "",
      "rotation_strategy": "dual_credential_overlap | blue_green_secret | hard_cutover"
    },
    "blast_radius": {
      "consumers": [
        { "name": "", "type": "service | job | ci | device | partner | human", "how_it_loads_secret": "", "reload_method": "restart | hot_reload | redeploy | manual", "owner": "", "risk_if_broken": "" }
      ],
      "unknown_consumers_check": ["provider access logs for the old key", "secret scanning in repos and CI logs", "search config and IaC for the secret name"]
    },
    "preparation": [
      { "step": "", "command_or_location": "", "verify": "" }
    ],
    "rotation_steps": [
      { "order": 1, "action": "", "who": "", "command_or_location": "", "expected_result": "", "verify": "", "rollback": "" }
    ],
    "verification": {
      "health_checks": [],
      "old_credential_usage_must_be_zero_for": "",
      "metrics_and_logs_to_watch": []
    },
    "revocation": {
      "revoke_old_after": "",
      "steps": [],
      "confirm_revoked_by": ""
    },
    "rollback_plan": {
      "trigger_conditions": [],
      "steps": [],
      "point_of_no_return": ""
    },
    "incident_extras": {
      "applies": false,
      "scope_review": "",
      "audit_log_queries": [],
      "notify": [],
      "evidence_to_keep": []
    },
    "communication": [
      { "audience": "", "when": "", "channel": "", "message": "" }
    ],
    "prevention": {
      "next_rotation_date": "",
      "automation_opportunities": [],
      "secret_hygiene_fixes": []
    },
    "open_questions": []
  }
}
```

Rules:
1. Prefer a dual-credential overlap: create the new secret, roll it out to every consumer, verify, and only then revoke the old one. If the provider allows only one valid credential, use hard_cutover and plan a short maintenance window.
2. Order rotation_steps so nothing breaks: store the new secret, update consumers from least to most critical, reload each one, verify, then revoke.
3. Every step must have a concrete verify and, before the point of no return, a rollback.
4. Never print, invent or echo real secret values; use placeholders like <NEW_SECRET_REF>.
5. For a suspected or confirmed leak, set severity to incident, fill incident_extras, revoke as fast as safely possible, and review audit logs for misuse since the exposure window began.
6. Include CI/CD variables, local .env files, cached build artifacts, mobile or desktop apps and partner integrations in the consumer search, because they are the usual misses.
7. In prevention, suggest moving to short-lived or workload identity credentials where the provider supports them, and a realistic rotation interval.
8. Put anything you had to assume into open_questions instead of guessing silently.

© f · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Security →

From the same set218

The whole set →
Jupyter Notebook taste Jupyter Notebook taste is a ChatGPT prompt for clean, repeatable notebooks. It applies when an analysis is prepared for review or a commit. GP ChatGPT ★ 178,201repo stars Gradle Build taste Gradle Build taste is a ChatGPT prompt that enforces fast JVM builds using Kotlin DSL and the wrapper. GP ChatGPT ★ 178,201repo stars MongoDB taste MongoDB taste is a ChatGPT prompt for MongoDB document design around query patterns, indexes, and schema checks. Claude Code loads it from a command file. GP ChatGPT ★ 178,201repo stars Storybook taste The Storybook taste prompt for ChatGPT sets conventions for writing component stories in Storybook. It covers story structure, component states, interaction checks and sharing changes for review. GP ChatGPT ★ 178,201repo stars RAG Pipeline taste RAG Pipeline taste — a prompt for ChatGPT defines engineering standards for building retrieval systems and evaluating generation accuracy. GP ChatGPT ★ 178,201repo stars Makefile taste The Makefile taste ChatGPT prompt sets conventions for project Makefiles. It guides target structure, recipes, and dependencies so make can act as the project’s front door. GP ChatGPT ★ 178,201repo stars API Deprecation and Sunset Plan Builder (YAML) API Deprecation and Sunset Plan Builder (YAML) is a prompt that turns API deprecation details into a structured YAML sunset plan with timelines, communication strategies, and migration steps. GP ChatGPT ★ 178,201repo stars Nginx Config taste The Nginx Config taste ChatGPT prompt sets conventions for Nginx configuration and operations. Use it while configuring virtual hosts, HTTPS, or proxy routes. GP ChatGPT ★ 178,201repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open