Gcp live iam policy change guard

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

Gcp live iam policy change guard is an AI agent skill from the GitHub repository VincentChuWaiChow/vanguard-frontier-agentic. Gate IAM binding mutations, org policy changes, and Service Account key creation against the GCP resource hierarchy. IAM bindings at org level propagate to all folders and projects — this guard enforces blast-radius assessment, audit-trail confirmation, and explicit authority approval before any pol

How to use this skill

Skill file

GCP Live IAM Policy Change Guard

Purpose

Act as the guarded live GCP operator for gcp-live-iam-policy-change-guard work. Gate every IAM binding mutation, org policy change, and Service Account key creation with explicit blast-radius assessment and authority approval. Treat org-level changes as the highest-risk category — they propagate to every resource in the hierarchy.

When to Use

Use this skill when:

When NOT to Use

Do not use this skill when:

Pre-Flight Checklist

Before executing any IAM mutation, verify all of the following:

  1. Resource hierarchy level confirmed — explicitly state whether the target is organization, folder, or project level. Run gcloud organizations list, gcloud resource-manager folders list, or gcloud projects describe <PROJECT> as appropriate.
  2. Active principal confirmed — run gcloud auth list and gcloud config get-value account to confirm the identity executing the change.
  3. Current IAM policy captured — run gcloud [projects|resource-manager folders|organizations] get-iam-policy <TARGET> and document the current bindings before any change.
  4. Blast-radius assessed — for org-level changes, enumerate all child folders and projects that will inherit the binding.
  5. Change justification documented — the operator must state the business reason, the specific principal(s) affected, and the role being added or removed.
  6. Service Account key inventory — if a key is being created, run gcloud iam service-accounts keys list --iam-account <SA> and confirm no unexpired keys already exist for this purpose.
  7. Rollback plan documented — identify which existing binding will be restored if the change must be reverted. For removals, confirm the operator has a path to restore access if needed.

Required Confirmation

The operator must explicitly state all of the following before any mutation is executed:

Execution Steps

  1. Capture pre-change IAM policy snapshot.
  2. Confirm active principal has roles/resourcemanager.organizationAdmin (for org changes) or roles/resourcemanager.projectIamAdmin (for project changes).
  3. Present the planned change, blast-radius assessment, and key inventory to the operator for explicit approval.
  4. Execute the mutation:
  1. Capture post-change policy snapshot and diff against pre-change snapshot.

Rollback Procedure

Post-Change Verification

  1. Run gcloud [projects|resource-manager folders|organizations] get-iam-policy <TARGET> — confirm the policy reflects the intended change and no unintended bindings were added.
  2. Test access for the affected principal using gcloud auth application-default login or gcloud projects test-iam-permissions to verify the change has the expected effect.
  3. Check Cloud Audit Logs for the change: gcloud logging read 'resource.type="project" AND protoPayload.methodName="SetIamPolicy"' --limit=10 --project=<PROJECT>.
  4. For org policy changes, confirm constraint enforcement is active using gcloud resource-manager org-policies describe <CONSTRAINT> --organization=<ORG_ID>.

Response Shape

  1. Resource hierarchy level and target confirmed
  2. Current IAM policy inventory
  3. Proposed binding change and blast-radius assessment
  4. Service Account key inventory if applicable
  5. Approval status
  6. Applied IAM change
  7. Post-change access verification
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.