Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

gcp-waf-security

БесплатноБез исполняемых скриптовНе проверен

Apply the Google Cloud Well-Architected Framework's Security pillar — security by design, zero trust with IAP and BeyondCorp, shift-left scanning in CI/CD…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

GCP Well-Architected Framework — Security

Overview

Security is layered: identity, network, data, supply chain, runtime, and ops. The Google Cloud Well-Architected Framework's Security pillar gives you the principles and the product map. This skill applies it to evaluate workloads and recommend concrete controls — not generic advice.

Instructions

Core Principles

Principle What it means
Security by design Threat-model in the design phase, not after launch
Zero trust Authenticate every request; trust nothing by network position
Shift-left security Scan, sign, and verify in CI; not in production
Preemptive cyber defense Threat intelligence, centralized logs, automated response; includes using AI securely (SAIF) and AI for security operations (Gemini in Security, Google SecOps)
Compliance & privacy Assured Workloads, Org Policy, regional residency

Identity & Access (Zero Trust Foundation)

Org policies are set with gcloud org-policies set-policy and a policy file (the older gcloud resource-manager org-policies group still exists but is the legacy v1 API and uses a different file format).

# no-default-network.yaml — boolean constraint, enforced across the organization
name: organizations/412398765012/policies/compute.skipDefaultNetworkCreation
spec:
  rules:
    - enforce: true
# no-sa-keys.yaml — block creation of service account keys
name: organizations/412398765012/policies/iam.disableServiceAccountKeyCreation
spec:
  rules:
    - enforce: true
# eu-only.yaml — only allow EU locations
name: organizations/412398765012/policies/gcp.resourceLocations
spec:
  rules:
    - values:
        allowedValues:
          - in:eu-locations
# 412398765012 is the numeric organization ID (gcloud organizations list)
gcloud org-policies set-policy no-default-network.yaml
gcloud org-policies set-policy no-sa-keys.yaml
gcloud org-policies set-policy eu-only.yaml
# Identity-Aware Proxy for internal apps (no VPN needed)
gcloud iap web add-iam-policy-binding \
  --resource-type=backend-services --service=internal-app \
  --member="group:[email protected]" \
  --role="roles/iap.httpsResourceAccessor"

Network Security

# Hierarchical firewall policies — applied at org/folder level; project rules cannot override a deny, though a rule with action `goto_next` defers to lower levels
gcloud compute firewall-policies create \
  --organization=412398765012 --short-name=org-baseline

# Deny SSH from the internet in every project under the organization
gcloud compute firewall-policies rules create 1000 \
  --firewall-policy=org-baseline --organization=412398765012 \
  --action=deny --direction=INGRESS \
  --layer4-configs=tcp:22 \
  --src-ip-ranges=0.0.0.0/0

# A policy only takes effect once associated with the org or a folder
gcloud compute firewall-policies associations create \
  --firewall-policy=org-baseline --organization=412398765012
# Cloud Armor — DDoS + WAF for HTTPS load balancers
gcloud compute security-policies create web-policy \
  --description="OWASP rules + rate limiting"

gcloud compute security-policies rules create 1000 \
  --security-policy=web-policy \
  --expression="evaluatePreconfiguredExpr('sqli-v33-stable')" \
  --action=deny-403

gcloud compute security-policies rules create 2000 \
  --security-policy=web-policy \
  --expression="true" \
  --action=rate-based-ban \
  --rate-limit-threshold-count=100 \
  --rate-limit-threshold-interval-sec=60 \
  --ban-duration-sec=600 \
  --conform-action=allow \
  --exceed-action=deny-429 \
  --enforce-on-key=ip

# Attach the policy to the backend service behind your load balancer
gcloud compute backend-services update storefront-backend --global \
  --security-policy=web-policy
# VPC Service Controls — perimeter around sensitive APIs (BigQuery, GCS, etc.)
gcloud access-context-manager perimeters create prod-perimeter \
  --title="Prod data perimeter" \
  --resources=projects/PROJECT_NUMBER \
  --restricted-services=bigquery.googleapis.com,storage.googleapis.com \
  --policy=POLICY_NUMBER

VPC Service Controls is the right answer when you need data-exfiltration protection — it prevents service accounts inside the perimeter from sending data to projects outside it, even with valid credentials.

Shift-Left: Supply Chain Security

On-Demand Scanning needs the ondemandscanning.googleapis.com API. images scan --remote scans an image already in the registry, so push first; the scan command prints a scan resource name that list-vulnerabilities takes (not the image URL). Signing uses a Binary Authorization attestation (there is no gcloud artifacts docker images sign); the command is currently in the beta group.

# cloudbuild.yaml — build, push, scan, then attest
substitutions:
  _IMAGE: us-central1-docker.pkg.dev/acme-prod/shop/storefront
steps:
  - name: gcr.io
Полный SKILL.md на GitHub

Установить gcp-waf-security в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл gcp-waf-security?

Apply the Google Cloud Well-Architected Framework's Security pillar — security by design, zero trust with IAP and BeyondCorp, shift-left scanning in CI/CD, Binary Authorization, VPC Service Controls, Cloud Armor, Sensitive Data Protection, and Security Command Center. Use for security architecture reviews, hardening checklists, and compliance evaluations.

Как установить скилл gcp-waf-security?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл gcp-waf-security запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить gcp-waf-security с