gcp-iam-patterns

gcp-iam-patterns is a skill for Claude Code, Codex from HermeticOrmus/LibreSecOps-Claude-Code. It costs 0 tokens per session (2,112 once invoked), scanned A, original, MIT.

A guide to managing access in Google Cloud Platform (GCP), Google's cloud service. It explains how users, groups, and service accounts receive roles on cloud resources, with optional conditions and inherited access.

In plain words
What is it for?
Use it when designing custom roles, reviewing IAM bindings, adding access conditions, or setting up Workload Identity Federation, which lets outside workloads access GCP without storing long-lived keys.
Why use it?
It helps avoid overly broad permissions and makes it easier to understand how access flows through an organisation, folders, projects, and individual resources.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing custom roles, reviewing IAM bindings, adding access conditions…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hermeticormus/libresecops-claude-code/gcp-iam-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HermeticOrmus/LibreSecOps-Claude-Code --skill gcp-iam-patterns
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gcp-iam-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/hermeticormus/libresecops-claude-code/gcp-iam-patterns.svg)](https://agentmods.dev/skills/hermeticormus/libresecops-claude-code/gcp-iam-patterns)
Your own site
<a href="https://agentmods.dev/skills/hermeticormus/libresecops-claude-code/gcp-iam-patterns"><img src="https://agentmods.dev/badge/skills/hermeticormus/libresecops-claude-code/gcp-iam-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,112 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02112
Opus 5 $0.00000 $0.01056
Sonnet 5 $0.00000 $0.00422
Haiku 4.5 $0.00000 $0.00211

Measured 6d ago against content hash e78e21d24ba4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

gcp-iam-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cloud-security-gcp/skills/gcp-iam-patterns/SKILL.md · 186 lines

How it starts

The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GCP IAM Patterns

Secure GCP IAM patterns, custom role design, IAM conditions, Workload Identity Federation, and the GCP permission model.

Knowledge Base

GCP IAM Model Fundamentals

GCP IAM works through bindings that connect principals to roles on resources. The key concepts:

  • Principal: Who (user, group, service account, domain, allUsers, allAuthenticatedUsers)
  • Role: A collection of permissions (e.g., roles/storage.objectViewer includes storage.objects.get and storage.objects.list)
  • Resource: Where the binding applies (organization, folder, project, or individual resource)
  • Binding: The association of principal + role + resource, optionally with conditions

Inheritance flows downward. A binding at the organization level applies to every folder, project, and resource beneath it. A binding at the project level applies to every resource in that project. Bindings are additive -- you cannot remove an inherited permission at a lower level (but you can use deny policies).

Role Types

Type Examples When to Use
Basic roles/owner, roles/editor, roles/viewer Almost never. Overly broad. Legacy.
Predefined roles/storage.objectViewer, roles/compute.networkAdmin Default choice. Google-maintained, least-privilege per service.
Custom projects/my-proj/roles/customRole When predefined roles include permissions you do not want to grant.

Critical rule: Never assign basic roles to service accounts. roles/editor on a service account grants write access to nearly every service in the project.

IAM Deny Policies

Introduced to address the "additive-only" limitation. Deny policies are evaluated before allow policies and cannot be overridden:

# Deny policy: prevent any principal from disabling audit logs
deniedPermissions:
  - "cloudaudit.googleapis.com/activityLogs.disable"
  - "logging.googleapis.com/logEntries.delete"
deniedPrincipals:
  - "principalSet://goog/public:all"
exceptionPrincipals:
  - "principal://iam.googleapis.com/projects/-/serviceAccounts/[email protected]"

Read the full file on GitHub · 186 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 186 lines · 0 tokens per session scan A e78e21d24ba4

Subscribe to this mod's changes

gcp-iam-patterns is a skill published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,112 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cloud-iam-deep

Cloud IAM red-team attack chain across AWS, Azure, GCP — focused on EXTERNAL exploitation paths and post-credential-discovery privilege analysis. Covers IAM enumeration (aws iam, az role, gcloud iam), STS/AssumeRole chaining, Azure Managed Identity abuse (via SSRF/leak), GCP service account JSON abuse, IMDSv1/v2…

elementalsouls/Claude-BugHunter · 238 tokens

detecting-compromised-cloud-credentials

Detecting compromised cloud credentials across AWS, Azure, and GCP by analyzing anomalous API activity, impossible travel patterns, unauthorized resource provisioning, and credential abuse indicators using GuardDuty, Defender for Identity, and SCC Event Threat Detection.

xalgorix/xalgorix · 55 tokens

implementing-devsecops-security-scanning

Integrates Static Application Security Testing (SAST), Dynamic Application Security Testing (DAST), and Software Composition Analysis (SCA) into CI/CD pipelines using open-source tools. Covers Semgrep for SAST, Trivy for SCA and container scanning, OWASP ZAP for DAST, and Gitleaks for secrets detection. Activates for…

xalgorix/xalgorix · 109 tokens

detecting-aws-guardduty-findings-automation

Automate AWS GuardDuty threat detection findings processing using EventBridge and Lambda to enable real-time incident response, automatic quarantine of compromised resources, and security notification workflows.

xalgorix/xalgorix · 45 tokens

scanning-kubernetes-manifests-with-kubesec

Perform security risk analysis on Kubernetes resource manifests using Kubesec to identify misconfigurations, privilege escalation risks, and deviations from security best practices.

xalgorix/xalgorix · 41 tokens

building-devsecops-pipeline-with-gitlab-ci

Design and implement a comprehensive DevSecOps pipeline in GitLab CI/CD integrating SAST, DAST, container scanning, dependency scanning, and secret detection.

xalgorix/xalgorix · 43 tokens