본문으로 건너뛰기
Skillpedia
보안22k · #10233

cloud-armor-crs-rule-upgrader

하는 일

이 스킬은 Google Cloud Armor의 웹 보안 규칙을 최신 버전으로 업데이트하도록 돕습니다. 오래된 OWASP 규칙 세트를 쓰고 안전하게 올리려는 보안 팀을 위한 스킬입니다.

사용하는 경우

  • ✓Cloud Armor 보안 정책을 OWASP CRS 3.0 또는 3.3에서 4.22 버전으로 옮겨야 할 때.
  • ✓업그레이드 전에 Cloud Armor 규칙 변경의 위험을 검토하고 싶을 때.
  • ✓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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/cloud-armor-crs-rule-upgrader/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Cloud Armor 정책을 OWASP 규칙 3.3에서 4.22로 업그레이드하고, 무엇이 깨질 수 있는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

현재 정책을 점검하고, opt-in과 opt-out 목록을 유지한 다음 새 버전에 맞게 규칙을 다시 씁니다. 각 변경의 운영상 위험도 평가합니다.

기술 내용 (원본 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:

  1. Google Cloud SDK: Install or update the Google Cloud CLI (gcloud).

  2. 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)"
    
  3. 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.com
    
  4. Authentication:

    • 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".
  5. Required IAM Roles:

    • roles/compute.securityAdmin: Required to create, update, delete, or import Cloud Armor security policies and rules (use roles/compute.securityViewer for read-only policy audits).
    • roles/logging.viewer: Required to inspect HTTP load balancer preview telemetry in Cloud Logging.
  6. 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 via gcloud config set compute/region us-central1). See Google Cloud Locations for regional availability.
  7. 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 --preview rules (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

자주 묻는 질문

직접 만든 예외 설정은 유지되나요?

네. 서명 opt-in 및 opt-out 목록을 유지하고, 새 버전에 맞게 예외를 업데이트합니다.

규칙을 적용하기 전에 확인할 수 있나요?

네. 미리 보기 모드의 원격 측정 데이터를 검토하므로, 규칙을 적용하기 전에 효과를 볼 수 있습니다.

어떤 버전에서 업그레이드할 수 있나요?

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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬