CoolFace
Datasetpublic

Cheeisepy/preflight-gcp-iam-guardrails

๐Ÿ›ก๏ธ GCP IAM Guardrails for Claude Code โ€” free sample Stop your AI coding agent from running destructive gcloud, gsutil, and bq commands against your GCP project. This repo is a free sample from the Preflight studio โ€” catch it before it ships. Letting Claude Code (or any agent) touch a real cloud project is great until the day it runs gcloud projects delete or gsutil rm -r on the wrong bucket. These deny rules make Claude Code refuse those commands outright โ€” no confirmation, noโ€ฆ See the full description on the dataset page: https://huggingface.co/datasets/Cheeisepy/preflight-gcp-iam-guardrails.

sourceHugging Facemitupdated 3mo agoView on Hugging Face
0likes17downloads
Dataset Card

[image]

๐Ÿ›ก๏ธ GCP IAM Guardrails for Claude Code โ€” free sample

Stop your AI coding agent from running destructive `gcloud`, `gsutil`, and `bq` commands against your GCP project. This repo is a free sample from the **Preflight** studio โ€” catch it before it ships.

Letting Claude Code (or any agent) touch a real cloud project is great until the day it runs gcloud projects delete or gsutil rm -r on the wrong bucket. These deny rules make Claude Code refuse those commands outright โ€” no confirmation, no "oops."

What's in this free sample

sample-deny-rules.json โ€” 10 of the highest-impact deny rules from the full pack, as a ready-to-merge settings.json fragment. Drop the permissions.deny array into your project's .claude/settings.json and Claude Code will block:

Blocked commandWhy it matters
gcloud projects deletenukes an entire project
gcloud * set-iam-policyoverwrites your whole IAM policy (lockout / privilege escalation)
gcloud * remove-iam-policy-bindingsilently strips access
gcloud iam service-accounts deletekills a service account other things depend on
gcloud iam service-accounts keys deletebreaks live auth
gcloud compute instances deletedeletes a VM
gcloud storage buckets deletedeletes a bucket
gcloud storage rm / gsutil rm -rdeletes objects, recursively
gsutil iam ch *allUsers*makes private data public
bq rmdrops BigQuery datasets/tables

Install (30 seconds)

  1. 1.Open sample-deny-rules.json.
  2. 2.Merge the permissions.deny array into your project's .claude/settings.json (create the file if it doesn't exist).
  3. 3.Done. Try asking Claude to delete a bucket โ€” it refuses.

What the full product adds

The free sample is the "obvious catastrophes" layer. The paid product is the defense-in-depth version:

  • โ€”27 deny rules (17 more than here), covering snapshots, disks, networks, firewall rules, logging sinks, service-account keys, and more.
  • โ€”An `ask` tier for risky-but-recoverable operations (add-iam-policy-binding, stop instance, create SA key) so they pause for human approval instead of being blocked.
  • โ€”A curated `allow` list so safe read-only commands (list, describe, get-iam-policy) never prompt โ€” no guardrail fatigue.
  • โ€”A PreToolUse hook (block-destructive-gcloud.sh) that catches obfuscated and chained commands the static rules can miss.
  • โ€”A 31-assertion test suite proving every block/allow decision, so you can trust it.
  • โ€”INSTALL.md, SKILL.md, and worked examples/ (allowed vs blocked).

โ†’ Get the full pack on Gumroad

[GCP IAM Guardrails for Claude Code โ€” $24](https://lindenberg17.gumroad.com/l/hmtcxf?ref=hf)


From Preflight โ€” guardrails for agentic coding & cloud. See also: [Terraform Plan Reviewer](https://lindenberg17.gumroad.com/l/qodem?ref=hf) ยท [webOS QA Checklist Runner](https://lindenberg17.gumroad.com/l/fhrioj?ref=hf).