cloud-armor-crs-rule-upgrader
できること
Google Cloud Armorのウェブのセキュリティルールを、新しいバージョンに更新する手伝いをします。古いOWASPルールセットを使っていて、安全にアップグレードしたいセキュリティチーム向けです。
使う場面
- ✓Cloud ArmorのセキュリティポリシーをOWASP CRS 3.0または3.3から4.22に移すとき。
- ✓Cloud Armorのルールを変更する前に、そのリスクを確認したいとき。
- ✓古い事前設定のWAFの設定や除外が、更新を必要としているとき。
スキルのリンク
https://github.com/google/skills/blob/main/skills/cloud/cloud-armor-crs-rule-upgrader/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Cloud ArmorのポリシーをOWASPルールの3.3から4.22にアップグレードして、何が壊れるかを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、現在のポリシーを監査し、オプトインとオプトアウトの一覧を保ったまま、ルールを新しいバージョン向けに書き直します。また、変更ごとの運用上のリスクを評価します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Cloud Armor OWASP Rule Upgrader (CRS 3.0/3.3 -> 4.22)
<!-- disableFinding(LINE_OVER_80) -->This skill guides Network Security Agents and Google Cloud practitioners through auditing, assessing, and upgrading Google Cloud Armor security policies from legacy OWASP Core Rule Set (CRS) 3.0 or 3.3 to OWASP CRS 4.22.
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Prerequisites and Environment Setup
Before auditing or modifying Google Cloud Armor security policies, ensure the following prerequisites are met:
Google Cloud SDK: Install or update the Google Cloud CLI (
gcloud).Project Selection and Active Billing: Select your target Google Cloud project and verify that an active billing account is attached:
gcloud config set project PROJECT_ID gcloud billing projects describe PROJECT_ID --format="value(billingEnabled)"API Enablement: Enable the Compute Engine API (for Cloud Armor security policies) and Cloud Logging API (for preview mode telemetry):
gcloud services enable compute.googleapis.com logging.googleapis.comAuthentication:
- Interactive CLI:
gcloud auth login - Application Default Credentials (ADC):
gcloud auth application-default login - Service Accounts: Set
GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json".
- Interactive CLI:
Required IAM Roles:
roles/compute.securityAdmin: Required to create, update, delete, or import Cloud Armor security policies and rules (useroles/compute.securityViewerfor read-only policy audits).roles/logging.viewer: Required to inspect HTTP load balancer preview telemetry in Cloud Logging.
Scope and Regional Availability:
- Cloud Armor security policies can be Global (default for global
external Application Load Balancers) or Regional (for regional
external Application Load Balancers, for example,
--region=us-central1; set a default region viagcloud config set compute/region us-central1). See Google Cloud Locations for regional availability.
- Cloud Armor security policies can be Global (default for global
external Application Load Balancers) or Regional (for regional
external Application Load Balancers, for example,
Pricing and Resource Cleanup:
- Cloud Armor incurs charges per security policy, per rule, and per million requests depending on your tier (Standard vs. Enterprise); check Google Cloud Armor Pricing for current rates.
- Teardown / Cleanup: Always delete temporary
--previewrules (gcloud compute security-policies rules delete PREVIEW_PRIORITY --security-policy="POLICY_NAME") or standalone test policies (gcloud compute security-policies delete TEST_POLICY_NAME) after cutover to avoid leaving orphan rules that consume policy quota or incur recurring rule charges.
Quick Start and CLI Helper
For automated, deterministic parsing, signature remapping, and preview-mode priority allocation, invoke the bundled standalone Python CLI:
# In-Place Upgrade (Report Summary)
python3 scripts/upgrade_policy.py /path/to/policy.json --mode=in-place --format=report
# In-Place Upgrade (Output gcloud commands)
python3 scripts/upgrade_policy.py /path/to/policy.json --mode=in-place --format=gcloud
# Preview Mode Upgrade (Generates preview rules at priority - 5)
python3 scripts/upgrade_policy.py /path/to/policy.json --mode=preview --format=gcloud
# Direct stdin piping from gcloud describe
gcloud compute security-policies describe POLICY_NAME --format=json | \
python3 scripts/upgrade_policy.py - --mode=preview --format=json
See gcloud_recipes.md for full command workflows.
Core Upgrade Workflow for Network Security Agent
[!IMPORTANT] Mandatory Agent Response Behaviors: 1. Explain Both Upgrade Modes: Whenever discussing an upgrade (even if the user asks specifically about Preview Mode or In-Place), ALWAYS explain BOTH In-Place Upgrade (direct in-situ rule replacement, immediate enforcement, ze
よくある質問
独自の除外は保たれますか?
はい。シグネチャのオプトインとオプトアウトの一覧を保ち、新しいバージョン向けに除外を更新します。
強制する前にルールを確認できますか?
はい。プレビューモードのテレメトリを確認するので、強制する前に影響を見られます。
どのバージョンからアップグレードできますか?
OWASP CRS 3.0と3.3から、OWASP CRS 4.22へアップグレードできます。
詳細
作者による元の説明
Upgrades Google Cloud Armor security policies from OWASP CRS 3.0 and 3.3 to OWASP CRS 4.22. Preserves signature opt-in and opt-out lists, translates evaluatePreconfiguredExpr to native evaluatePreconfiguredWaf dictionary parameters, remaps signature IDs to v042200, drops retired signature IDs, and updates structured preconfiguredWafConfig fine-tuning exclusions. Evaluates operational risk (High Breaking Change, Medium Attention Required, Low Clean Upgrade) including Method Enforcement breaking changes (PUT/PATCH/DELETE blocking) and sensitivity coverage expansions. Supports both in-place rule
repo: google/skills
人気
- GitHubのスター
- 22k
- ランキング
- #10233
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
finding-google-skills
22kセットアップ作業に合うGoogleの公式ガイドを探すようエージェントを支援します。ホスティング、データベース、ストレージ、サインイン、AIモデルの提供などが対象です。
gcloud
22kエージェントが、Google CloudのgcloudコマンドについてWeb検索に頼らず、正確な構文を確かめてから書いたり確認したりできるよう支援します。
google-cloud-recipe-auth
22kエージェントが、Google Cloudのアイデンティティとアクセス(人やサービスがどうサインインし、どの権限を得るか)について、手順を案内できるよう支援します。
google-cloud-recipe-onboarding
22k新しい開発者が、プロジェクトの選択、請求の設定、最初のリソースのデプロイなど、Google Cloudの最初の手順を進められるよう案内します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。