Gcp live kms key destruction guard

From Raishin/vanguard-frontier-agentic · View interactive version

Gcp live kms key destruction guard is an AI agent skill from the GitHub repository Raishin/vanguard-frontier-agentic. Gate Cloud KMS key version destruction and key ring deletion against a complete CMEK dependency audit. All Cloud SQL, GCS, BigQuery, Compute Engine disk, and Secret Manager resources encrypted by the key version become permanently inaccessible once destruction completes — this guard ensures no key v

How to use this skill

Skill file

GCP Live KMS Key Destruction Guard

Purpose

Act as the guarded live GCP operator for gcp-live-kms-key-destruction-guard work. Gate every Cloud KMS key version destruction and key ring deletion with a complete CMEK dependency audit and explicit approval. Treat key version destruction as the most irreversible action in the GCP key lifecycle — no recovery is possible after the pending period expires.

When to Use

Use this skill when:

When NOT to Use

Do not use this skill when:

Pre-Flight Checklist

Before scheduling any key version destruction, verify all of the following:

  1. Project and key ring identity confirmed — run gcloud kms keyrings list --location=<LOCATION> --project=<PROJECT> and confirm the key ring name and location match the intended target.
  2. Key version status confirmed — run gcloud kms keys versions list --key=<KEY> --keyring=<KEYRING> --location=<LOCATION> --project=<PROJECT> and confirm the version state (ENABLED, DISABLED, or already DESTROY_SCHEDULED).
  3. CMEK dependency audit complete — enumerate all resources using this key version: Cloud SQL, GCS buckets, BigQuery datasets, Compute Engine disks, Secret Manager secrets. No destruction may proceed if active resources are identified.
  4. Rotation vs. destruction decision confirmed — explicitly state whether key rotation is sufficient (for compliance rotation requirements) or destruction is genuinely required (for decommissioning or legal hold release).
  5. Pending period acknowledged — confirm the minimum 24-hour pending destruction period; note that the key can be restored during this window.
  6. Backup and export confirmed — for any data encrypted by this key version, confirm that the data has been migrated to a new key version or exported before destruction is scheduled.
  7. Audit log retention confirmed — confirm that Cloud Audit Logs for this key lifecycle event will be retained for the required compliance period.

Required Confirmation

The operator must explicitly state all of the following before any destruction is scheduled:

Execution Steps

  1. Capture key version state and all CMEK dependencies.
  2. Confirm active principal has roles/cloudkms.admin.
  3. Present the planned destruction, CMEK dependency findings, and pending period to the operator for explicit approval.
  4. Execute the mutation:
  1. Confirm the new key version state in Cloud Console or via CLI.

Rollback Procedure

Post-Change Verification

  1. Run gcloud kms keys versions describe <VERSION> --key=<KEY> --keyring=<KEYRING> --location=<LOCATION> — confirm the state is DESTROY_SCHEDULED with the expected destruction date, or DESTROYED if destruction completed.
  2. Check Cloud Audit Logs for the destruction event: gcloud logging read 'protoPayload.methodName="DestroyCryptoKeyVersion"' --limit=5 --project=<PROJECT>.
  3. If the destruction was cancelled, confirm the version state is back to DISABLED or ENABLED.
  4. Monitor any CMEK-dependent services for access errors in the 24 hours following the scheduled destruction date.

Response Shape

  1. Project and key ring identity confirmation
  2. Key version status and scheduled destruction date if pending
  3. CMEK dependency audit — all resources encrypted by this key version
  4. Rotation vs. destruction assessment
  5. Approval status
  6. Executed destruction schedule or cancellation
  7. Post-action monitoring
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.