[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D666XTDM2CM250F1MJ3203":3,"skill-same:01M7D666XTDM2CM250F1MJ3203":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D666XTDM2CM250F1MJ3203","cloud-armor-crs-rule-upgrader",null,"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\u002FPATCH\u002FDELETE blocking) and sensitivity coverage expansions. Supports both in-place rule upgrades and smooth preview mode deployments with priority spacing and a 200-rule quota guardrail. Use when a user or agent needs to audit, upgrade, or transition Cloud Armor WAF rules to CRS 4.22. Don't use for non-WAF Cloud Armor rules (IP rate-limiting, geo-blocking, reCAPTCHA) or AWS\u002FAzure WAF migrations.","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cloud-armor-crs-rule-upgrader\nmetadata:\n  category: Security\n  version: 1.0.1\ndescription: Upgrades Google Cloud Armor security policies from OWASP CRS 3.0 and\n  3.3 to OWASP CRS 4.22. Preserves signature opt-in and opt-out lists, translates\n  evaluatePreconfiguredExpr to native evaluatePreconfiguredWaf dictionary parameters,\n  remaps signature IDs to v042200, drops retired signature IDs, and updates structured\n  preconfiguredWafConfig fine-tuning exclusions. Evaluates operational risk (High\n  Breaking Change, Medium Attention Required, Low Clean Upgrade) including Method\n  Enforcement breaking changes (PUT\u002FPATCH\u002FDELETE blocking) and sensitivity coverage\n  expansions. Supports both in-place rule upgrades and smooth preview mode deployments\n  with priority spacing and a 200-rule quota guardrail. Use when a user or agent needs\n  to audit, upgrade, or transition Cloud Armor WAF rules to CRS 4.22. Don't use for\n  non-WAF Cloud Armor rules (IP rate-limiting, geo-blocking, reCAPTCHA) or AWS\u002FAzure\n  WAF migrations.\n---\n\n# Cloud Armor OWASP Rule Upgrader (CRS 3.0\u002F3.3 -> 4.22)\n\n\u003C!-- disableFinding(LINE_OVER_80) -->\n\nThis skill guides Network Security Agents and Google Cloud practitioners through\nauditing, assessing, and upgrading Google Cloud Armor security policies from\nlegacy OWASP Core Rule Set (CRS) 3.0 or 3.3 to OWASP CRS 4.22.\n\n## Usage Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read and follow the instructions in\n[Usage Attribution](references\u002Fattribution.md).\n\n--------------------------------------------------------------------------------\n\n## Prerequisites and Environment Setup\n\nBefore auditing or modifying Google Cloud Armor security policies, ensure the\nfollowing prerequisites are met:\n\n1.  **Google Cloud SDK**: Install or update the\n    [Google Cloud CLI (`gcloud`)](https:\u002F\u002Fdocs.cloud.google.com\u002Fsdk\u002Fdocs\u002Finstall-sdk).\n2.  **Project Selection and Active Billing**: Select your target Google Cloud\n    project and verify that an active billing account is attached:\n\n    ```bash\n    gcloud config set project PROJECT_ID\n    gcloud billing projects describe PROJECT_ID --format=\"value(billingEnabled)\"\n    ```\n\n3.  **API Enablement**: Enable the Compute Engine API (for Cloud Armor security\n    policies) and Cloud Logging API (for preview mode telemetry):\n\n    ```bash\n    gcloud services enable compute.googleapis.com logging.googleapis.com\n    ```\n\n4.  **Authentication**:\n    -   **Interactive CLI**: `gcloud auth login`\n    -   **Application Default Credentials (ADC)**: `gcloud auth\n        application-default login`\n    -   **Service Accounts**: Set\n        `GOOGLE_APPLICATION_CREDENTIALS=\"\u002Fpath\u002Fto\u002Fservice-account-key.json\"`.\n5.  **Required IAM Roles**:\n    -   `roles\u002Fcompute.securityAdmin`: Required to create, update, delete, or\n        import Cloud Armor security policies and rules (use\n        `roles\u002Fcompute.securityViewer` for read-only policy audits).\n    -   `roles\u002Flogging.viewer`: Required to inspect HTTP load balancer preview\n        telemetry in Cloud Logging.\n6.  **Scope and Regional Availability**:\n    -   Cloud Armor security policies can be **Global** (default for global\n        external Application Load Balancers) or **Regional** (for regional\n        external Application Load Balancers, for example, `--region=us-central1`;\n        set a default region via `gcloud config set compute\u002Fregion us-central1`).\n        See [Google Cloud Locations](https:\u002F\u002Fcloud.google.com\u002Fabout\u002Flocations)\n        for regional availability.\n7.  **Pricing and Resource Cleanup**:\n    -   Cloud Armor incurs charges per security policy, per rule, and per\n        million requests depending on your tier (Standard vs. Enterprise); check\n        [Google Cloud Armor Pricing](https:\u002F\u002Fcloud.google.com\u002Farmor\u002Fpricing)\n        for current rates.\n    -   **Teardown \u002F Cleanup**: Always delete temporary `--preview` rules\n        (`gcloud compute security-policies rules delete PREVIEW_PRIORITY\n        --security-policy=\"POLICY_NAME\"`) or standalone test policies (`gcloud\n        compute security-policies delete TEST_POLICY_NAME`) after cutover to\n        avoid leaving orphan rules that consume policy quota or incur recurring\n        rule charges.\n\n--------------------------------------------------------------------------------\n\n## Quick Start and CLI Helper\n\nFor automated, deterministic parsing, signature remapping, and preview-mode\npriority allocation, invoke the bundled standalone Python CLI:\n\n```bash\n# In-Place Upgrade (Report Summary)\npython3 scripts\u002Fupgrade_policy.py \u002Fpath\u002Fto\u002Fpolicy.json --mode=in-place --format=report\n\n# In-Place Upgrade (Output gcloud commands)\npython3 scripts\u002Fupgrade_policy.py \u002Fpath\u002Fto\u002Fpolicy.json --mode=in-place --format=gcloud\n\n# Preview Mode Upgrade (Generates preview rules at priority - 5)\npython3 scripts\u002Fupgrade_policy.py \u002Fpath\u002Fto\u002Fpolicy.json --mode=preview --format=gcloud\n\n# Direct stdin piping from gcloud describe\ngcloud compute security-policies describe POLICY_NAME --format=json | \\\n  python3 scripts\u002Fupgrade_policy.py - --mode=preview --format=json\n```\n\nSee [gcloud_recipes.md](references\u002Fgcloud_recipes.md) for full command\nworkflows.\n\n## Core Upgrade Workflow for Network Security Agent\n\n> [!IMPORTANT] **Mandatory Agent Response Behaviors**: 1. **Explain Both Upgrade\n> Modes**: Whenever discussing an upgrade (even if the user asks specifically\n> about Preview Mode or In-Place), ALWAYS explain BOTH **In-Place Upgrade**\n> (direct in-situ rule replacement, immediate enforcement, zero extra quota) and\n> **Preview Mode** (preview rules deployed at lower numeric priority numbers\n> with `preview = true`, zero risk of blocking traffic, allows telemetry\n> inspection in Cloud Logging before cutover). 2. **Handling Policy Audit\n> Inquiries**: When asked to audit or inspect a policy (such as\n> `'ecommerce-waf'`), if policy JSON is not provided or `gcloud describe` cannot\n> reach Google Cloud resources, immediately provide the `gcloud compute\n> security-policies describe POLICY_NAME --format=json` command and guide the\n> user through the audit checks: - Check for legacy OWASP 3.0 \u002F 3.3 rulesets\n> (`sqli-stable`, `xss-stable`, `rce-stable`, `methodenforcement-stable`, or\n> `evaluatePreconfiguredExpr`). - Report in-scope WAF rules versus pass-through\n> custom rules (such as IP allowlists `SRC_IPS_V1`, rate limiting, or default\n> rules `priority: 2147483647`). - Highlight signature count expansions under\n> CRS 4.22 (for example, RCE expanding from 11\u002F15 to 44 signatures; SQLi\n> expanding to 60 signatures).\n\nWhen interacting with a customer to upgrade a Cloud Armor security policy,\nexecute this 5-step workflow:\n\n1.  **Discover and Fetch**: Identify the target security policy and fetch its\n    JSON definition.\n2.  **Audit and Classify Risk**: Inspect rules, signature count expansions, and\n    operational risk levels.\n3.  **Confirm Mode and Method Risk**: Align with the customer on Preview Mode\n    versus In-Place Upgrade, method enforcement risk, and quota or priority\n    constraints.\n4.  **Transform Rules**: Translate ruleset names, CEL expressions, signature\n    IDs, and `preconfiguredWafConfig` exclusions to CRS 4.22.\n5.  **Execute and Verify**: Apply the upgrade via `gcloud` and verify telemetry\n    in Cloud Logging.\n\n### Step 1: Policy Discovery and Ingestion\n\n1.  Identify the target security policy name and Google Cloud project.\n2.  Fetch the current policy definition via `gcloud`:\n\n    ```bash\n    gcloud compute security-policies describe POLICY_NAME --project=PROJECT_ID --format=\"json\"\n    ```\n\n    *If policy JSON is not provided or executing in conversational mode, provide\n    the `gcloud describe` command and outline the audit criteria below.*\n\n3.  Inspect the `rules` list:\n\n    -   Identify in-scope WAF rules: calls to `evaluatePreconfiguredWaf` or\n        `evaluatePreconfiguredExpr` using legacy 3.0 \u002F 3.3 rulesets\n        (`sqli-stable`, `xss-stable`, `rce-stable`, `methodenforcement-stable`,\n        etc.).\n    -   Identify out-of-scope rules: pass-through custom rules (such as pure IP\n        allowlists `SRC_IPS_V1`, rate limiting, header matches without WAF\n        calls, or default rules `priority: 2147483647`). Pass these through\n        unchanged.\n    -   Highlight signature coverage expansions (for example, RCE expanding from\n        11\u002F15 to 44 signatures; SQLi expanding to 60 signatures in CRS 4.22).\n\n### Step 2: Audit and Risk Classification\n\nEvaluate each in-scope rule against standard operational risk categories:\n\n\u003C!-- mdformat off -->\n\n| Risk Level | Impact Category | Criteria and Recommended Action |\n| :--- | :--- | :--- |\n| 🔴 **High Risk** | **Breaking Change** | Immediate risk of blocking legitimate production traffic upon cutover. Example: `methodenforcement-v422-stable` only permits `GET`, `HEAD`, `POST`, `OPTIONS`, and **blocks `PUT`, `PATCH`, `DELETE`** requests. Requires customer confirmation and API path\u002Fsignature exemptions. |\n| 🟡 **Medium Risk** | **Attention Required** | Behavioral shifts that should be validated in Preview Mode before enforcement:\u003Cbr>• **Coverage Expansion**: Sensitivity level 4 activates significantly more signatures (for example, RCE expands from 11\u002F15 to 44 signatures; SQLi expands to 60 signatures).\u003Cbr>• **Deprecated Exemption Lost**: Legacy rule opted out of any of the 15 retired CRS 3.0\u002F3.3 IDs (`981172`, `981173`, `980130`, `949110`; SQLi: `942110`; RCE: `932100`, `932105`, `932106`, `932110`, `932115`, `932150`; Scanner Detection: `913101`, `913102`, `913110`, `913120`), which are omitted in 4.22.\u003Cbr>• **Custom Filter Continuity**: Preserved custom header\u002Fcookie\u002Fquery\u002FIP conditions combined with WAF calls. |\n| 🟢 **Low Risk** | **Clean Upgrade** | Direct 1:1 ruleset translation with preserved active opt-outs and no expected behavioral divergence (for example, standard SQLi or XSS rules). |\n| ⚪ **No Action** | **Pass-Through** | Non-OWASP rules (pure IP allowlist\u002Fdenylist, rate limiting, default rule). Carried over unchanged. |\n\n\u003C!-- mdformat on -->\n\n### Step 3: Upgrade Mode Selection and User Alignment\n\nEngage the customer with findings before applying changes:\n\n1.  **Report Findings**: State how many WAF rules will be upgraded, signature\n    coverage expansions, and any deprecated signatures being retired.\n2.  **Method Enforcement Warning**: If `methodenforcement` is present, warn: >\n    *\"Notice: Method Enforcement in CRS 4.22 permits only GET, HEAD, POST, and\n    OPTIONS. If your application handles REST API updates (PUT, PATCH, DELETE),\n    these methods will be blocked with HTTP 403. Would you like to add an\n    exemption for API paths or opt out of rule id911100?\"*\n3.  **Explain Differences Between Modes**:\n    -   **Preview Mode (Recommended)**: Keeps existing legacy rules actively\n        enforcing while deploying corresponding upgraded CRS 4.22 preview rules\n        with `preview = true` at a lower numeric priority number (higher\n        evaluation priority, for example, `PRIORITY - 5`). Traffic is evaluated\n        first by preview rules and logged to Cloud Logging without blocking,\n        ensuring zero risk of downtime or false positives prior to cutover.\n        Requires sufficient quota under the 200-rule limit.\n    -   **In-Place Upgrade**: Directly modifies the CEL expressions and\n        `preconfiguredWafConfig` on existing rule priority numbers in-situ.\n        Immediate enforcement with zero additional rule overhead, but carries\n        cutover risk if new signatures or method enforcement block valid\n        traffic.\n4.  **Quota Guardrail (200 Rules)**:\n    -   Calculate projected rule count: `current_total_rules +\n        in_scope_waf_rules`.\n    -   If projected count > 200, alert the customer: > *\"Cloud Armor enforces a\n        maximum limit of 200 rules per security policy. Deploying in Preview\n        Mode would require PROJECTED_COUNT rules. The upgrade cannot proceed\n        in Preview Mode. We must either perform an In-Place Upgrade or\n        consolidate rules.\"*\n5.  **Priority Spacing Guardrail (Preview Mode)**:\n    -   If an in-scope WAF rule at `PRIORITY` immediately follows another rule\n        at `PREV_PRIORITY` with no free integer priority slot between them\n        (for example, `999` and `1000`, or a WAF rule at priority `0`), alert\n        the customer: > *\"Rule PRIORITY cannot be deployed in Preview Mode\n        because the preceding rule at priority PREV_PRIORITY leaves no open\n        priority number between PREV_PRIORITY and PRIORITY (and placing the\n        preview rule above PREV_PRIORITY would change evaluation order). To use\n        Preview Mode, please readjust your rule priorities to leave at least one\n        open priority slot before PRIORITY, or choose an In-Place Upgrade.\"*\n    -   **Do NOT automatically re-number existing customer rules**: Because rule\n        priorities act as primary identifiers in Cloud Armor and are often tied\n        to Terraform\u002FIaC resources and SIEM alerting filters, never silently\n        shift existing customer rule priorities to make room. If the customer\n        explicitly asks you to readjust their rule priorities for them, first\n        warn them about potential Terraform\u002FIaC state drift and confirm the\n        exact new priority numbers before executing any priority changes.\n\n### Step 4: Rule Transformation Logic\n\n#### A. Ruleset Name Translation\n\nTranslate legacy ruleset names according to the mapping table in\n[ruleset_mappings.md](references\u002Fruleset_mappings.md):\n\n-   Stable: `sqli-stable` to `sqli-v422-stable`, `rce-stable` to\n    `rce-v422-stable`\n-   Canary: `sqli-canary` to `sqli-v422-canary`\n-   3.3 Stable: `sqli-v33-stable` to `sqli-v422-stable`, `nodejs-v33-stable`\n    to `generic-v422-stable`\n\n#### B. CEL Opt-Out and Opt-In Translation\n\n-   Legacy `evaluatePreconfiguredExpr(ruleset, ['id1', 'id2'])` is strictly an\n    **opt-out (disabled)** list.\n-   Convert to native 4.22 syntax:\n\n    ```cel\n    evaluatePreconfiguredWaf('sqli-v422-stable', {'opt_out_rule_ids': ['owasp-crs-v042200-id942120-sqli']})\n    ```\n-   Remap signature IDs: `owasp-crs-v030001-idSIGNATURE_ID-GROUP` to\n    `owasp-crs-v042200-idSIGNATURE_ID-GROUP`. *(Exception: Standalone CVE\n    signatures such as `cve-canary` signatures `owasp-crs-v030001-id*-cve` and\n    `google-mrs-*` retain their original IDs and must not be remapped to\n    `v042200` or dropped).*\n-   Drop all 15 deprecated CRS 3.0\u002F3.3 signature numbers (`981172`, `981173`,\n    `980130`, `949110`; SQLi: `942110`; RCE: `932100`, `932105`, `932106`,\n    `932110`, `932115`, `932150`; Scanner Detection: `913101`, `913102`,\n    `913110`, `913120`).\n\n#### C. Fine-Tuning (`preconfiguredWafConfig`)\n\nFor rules with structured `preconfiguredWafConfig.exclusions[]`:\n\n-   Update `targetRuleSet` to the CRS 4.22 equivalent.\n-   Remap `targetRuleIds` to `v042200` and drop deprecated IDs. **Warning**: If\n    an exclusion's `targetRuleIds` list becomes empty (`[]`) after dropping\n    retired IDs, remove the entire exclusion entry rather than leaving\n    `targetRuleIds: []` (otherwise an empty `targetRuleIds` list exempts the\n    entire ruleset).\n-   Carry over all field exclusions (`requestHeadersToExclude`,\n    `requestCookiesToExclude`, `requestQueryParamsToExclude`,\n    `requestUrisToExclude`, `requestBodiesToExclude`) and match operators\n    without modification.\n-   Details in [fine_tuning_and_cel.md](references\u002Ffine_tuning_and_cel.md).\n\n### Step 5: Execution Delivery and Verification\n\n#### Delivering In-Place Upgrade\n\nExecute `gcloud compute security-policies rules update`:\n\n```bash\ngcloud compute security-policies rules update PRIORITY \\\n  --security-policy=\"POLICY_NAME\" \\\n  --project=PROJECT_ID \\\n  --expression=\"UPGRADED_EXPRESSION\"\n```\n\n#### Delivering Preview Mode Upgrade\n\nDeploy preview rules at a numeric priority strictly between the immediately\npreceding rule and `ENFORCED_PRIORITY` (`PREV_PRIORITY \u003C PREVIEW_PRIORITY \u003C\nENFORCED_PRIORITY`) using `rules create`:\n\n```bash\ngcloud compute security-policies rules create PREVIEW_PRIORITY \\\n  --security-policy=\"POLICY_NAME\" \\\n  --project=PROJECT_ID \\\n  --expression=\"UPGRADED_EXPRESSION\" \\\n  --action=\"ACTION\" \\\n  --preview \\\n  --description=\"PREVIEW: Upgraded CRS 4.22 Rule for Priority ENFORCED_PRIORITY\"\n```\n\n#### Telemetry Verification in Cloud Logging\n\nInstruct the customer to inspect preview logs before cutover:\n\n```bash\ngcloud logging read '\n  resource.type=\"http_load_balancer\" AND\n  jsonPayload.enforcedSecurityPolicy.name=\"POLICY_NAME\" AND\n  jsonPayload.previewSecurityPolicy.matchedRulePriority:*\n' --project=PROJECT_ID --limit=20\n```\n\n--------------------------------------------------------------------------------\n\n## Critical Gotchas and Domain Rules\n\n1.  **`evaluatePreconfiguredExpr` is NEVER Opt-In**: The array in legacy\n    `evaluatePreconfiguredExpr` was strictly an exclusion (opt-out) list.\n    Treating it as opt-in would inadvertently disable all other signatures in\n    that ruleset!\n2.  **Never Re-introduce Deprecated Signatures**: All 15 retired CRS 3.0\u002F3.3\n    signature numbers (`981172`, `981173`, `980130`, `949110`; SQLi: `942110`;\n    RCE: `932100`, `932105`, `932106`, `932110`, `932115`, `932150`; Scanner\n    Detection: `913101`, `913102`, `913110`, `913120`) were removed in CRS 4.22.\n    Keeping them in `opt_out_rule_ids` or `targetRuleIds` causes Cloud Armor API\n    schema rejections.\n3.  **Method Enforcement Defaults**: CRS 4.22 Method Enforcement blocks `PUT`,\n    `PATCH`, and `DELETE`. Never perform a silent in-place upgrade of method\n    enforcement without user confirmation.\n4.  **Preview Rule Priorities and Cutover Safety**: Cloud Armor evaluates rules\n    in ascending priority order (`0` to `2147483647`). A preview rule must\n    evaluate *before* the enforcing rule it previews, but *after* any preceding\n    rule (`PREV_PRIORITY \u003C PREVIEW_PRIORITY \u003C ENFORCED_PRIORITY`) so it never\n    crosses intervening `allow` or custom rules. During cutover to full\n    enforcement, update the original `ENFORCED_PRIORITY` rule in-place to CRS\n    4.22 and delete `PREVIEW_PRIORITY` rather than promoting `PREVIEW_PRIORITY`\n    in place.\n5.  **Atomic Import for Structured Exclusions**: When a policy contains complex\n    `preconfiguredWafConfig` blocks, prefer exporting the policy JSON,\n    transforming it, and applying it via `gcloud compute security-policies\n    import` to ensure atomic updates.\n6.  **Preserve Standalone CVE Signatures (`cve-canary`)**: `cve-canary` is an\n    out-of-band rule for specific vulnerabilities (for example, Log4j\n    CVE-2021-44228 \u002F CVE-2021-45046, React RCE CVE-2025-55182). Its signature\n    IDs (`owasp-crs-v030001-id044228-cve`, `id144228-cve`, `id244228-cve`,\n    `id344228-cve`) are valid and retain the `v030001` prefix. Only upgrade the\n    syntax to `evaluatePreconfiguredWaf('cve-canary', ...)`; never rewrite them\n    to `v042200` or drop them as deprecated.\n\n--------------------------------------------------------------------------------\n\n## References and Resources\n\n-   [ruleset_mappings.md](references\u002Fruleset_mappings.md): Full CRS 3.0 \u002F 3.3 to\n    4.22 ruleset mapping, sensitivity levels, and signature counts.\n-   [fine_tuning_and_cel.md](references\u002Ffine_tuning_and_cel.md): CEL syntax\n    options, structured `preconfiguredWafConfig` exclusions, and method\n    enforcement mitigations.\n-   [gcloud_recipes.md](references\u002Fgcloud_recipes.md): Copy-pasteable `gcloud`\n    recipes for audit, preview mode, and Cloud Logging queries.\n-   [upgrade_policy.py](scripts\u002Fupgrade_policy.py): Deterministic CLI helper\n    script.\n-   [contributing.md](references\u002Fcontributing.md): Domain and code invariants\n    for maintaining this skill.\n","# Cloud Armor OWASP Rule Upgrader (CRS 3.0\u002F3.3 -> 4.22)\n\n\u003C!-- disableFinding(LINE_OVER_80) -->\n\nThis skill guides Network Security Agents and Google Cloud practitioners through\nauditing, assessing, and upgrading Google Cloud Armor security policies from\nlegacy OWASP Core Rule Set (CRS) 3.0 or 3.3 to OWASP CRS 4.22.\n\n## Usage Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read and follow the instructions in\n[Usage Attribution](references\u002Fattribution.md).\n\n--------------------------------------------------------------------------------\n\n## Prerequisites and Environment Setup\n\nBefore auditing or modifying Google Cloud Armor security policies, ensure the\nfollowing prerequisites are met:\n\n1.  **Google Cloud SDK**: Install or update the\n    [Google Cloud CLI (`gcloud`)](https:\u002F\u002Fdocs.cloud.google.com\u002Fsdk\u002Fdocs\u002Finstall-sdk).\n2.  **Project Selection and Active Billing**: Select your target Google Cloud\n    project and verify that an active billing account is attached:\n\n    ```bash\n    gcloud config set project PROJECT_ID\n    gcloud billing projects describe PROJECT_ID --format=\"value(billingEnabled)\"\n    ```\n\n3.  **API Enablement**: Enable the Compute Engine API (for Cloud Armor security\n    policies) and Cloud Logging API (for preview mode telemetry):\n\n    ```bash\n    gcloud services enable compute.googleapis.com logging.googleapis.com\n    ```\n\n4.  **Authentication**:\n    -   **Interactive CLI**: `gcloud auth login`\n    -   **Application Default Credentials (ADC)**: `gcloud auth\n        application-default login`\n    -   **Service Accounts**: Set\n        `GOOGLE_APPLICATION_CREDENTIALS=\"\u002Fpath\u002Fto\u002Fservice-account-key.json\"`.\n5.  **Required IAM Roles**:\n    -   `roles\u002Fcompute.securityAdmin`: Required to create, update, delete, or\n        import Cloud Armor security policies and rules (use\n        `roles\u002Fcompute.securityViewer` for read-only policy audits).\n    -   `roles\u002Flogging.viewer`: Required to inspect HTTP load balancer preview\n        telemetry in Cloud Logging.\n6.  **Scope and Regional Availability**:\n    -   Cloud Armor security policies can be **Global** (default for global\n        external Application Load Balancers) or **Regional** (for regional\n        external Application Load Balancers, for example, `--region=us-central1`;\n        set a default region via `gcloud config set compute\u002Fregion us-central1`).\n        See [Google Cloud Locations](https:\u002F\u002Fcloud.google.com\u002Fabout\u002Flocations)\n        for regional availability.\n7.  **Pricing and Resource Cleanup**:\n    -   Cloud Armor incurs charges per security policy, per rule, and per\n        million requests depending on your tier (Standard vs. Enterprise); check\n        [Google Cloud Armor Pricing](https:\u002F\u002Fcloud.google.com\u002Farmor\u002Fpricing)\n        for current rates.\n    -   **Teardown \u002F Cleanup**: Always delete temporary `--preview` rules\n        (`gcloud compute security-policies rules delete PREVIEW_PRIORITY\n        --security-policy=\"POLICY_NAME\"`) or standalone test policies (`gcloud\n        compute security-policies delete TEST_POLICY_NAME`) after cutover to\n        avoid leaving orphan rules that consume policy quota or incur recurring\n        rule charges.\n\n--------------------------------------------------------------------------------\n\n## Quick Start and CLI Helper\n\nFor automated, deterministic parsing, signature remapping, and preview-mode\npriority allocation, invoke the bundled standalone Python CLI:\n\n```bash\n# In-Place Upgrade (Report Summary)\npython3 scripts\u002Fupgrade_policy.py \u002Fpath\u002Fto\u002Fpolicy.json --mode=in-place --format=report\n\n# In-Place Upgrade (Output gcloud commands)\npython3 scripts\u002Fupgrade_policy.py \u002Fpath\u002Fto\u002Fpolicy.json --mode=in-place --format=gcloud\n\n# Preview Mode Upgrade (Generates preview rules at priority - 5)\npython3 scripts\u002Fupgrade_policy.py \u002Fpath\u002Fto\u002Fpolicy.json --mode=preview --format=gcloud\n\n# Direct stdin piping from gcloud describe\ngcloud compute security-policies describe POLICY_NAME --format=json | \\\n  python3 scripts\u002Fupgrade_policy.py - --mode=preview --format=json\n```\n\nSee [gcloud_recipes.md](references\u002Fgcloud_recipes.md) for full command\nworkflows.\n\n## Core Upgrade Workflow for Network Security Agent\n\n> [!IMPORTANT] **Mandatory Agent Response Behaviors**: 1. **Explain Both Upgrade\n> Modes**: Whenever discussing an upgrade (even if the user asks specifically\n> about Preview Mode or In-Place), ALWAYS explain BOTH **In-Place Upgrade**\n> (direct in-situ rule replacement, immediate enforcement, zero extra quota) and\n> **Preview Mode** (preview rules deployed at lower numeric priority numbers\n> with `preview = true`, zero risk of blocking traffic, allows telemetry\n> inspection in Cloud Logging before cutover). 2. **Handling Policy Audit\n> Inquiries**: When asked to audit or inspect a policy (such as\n> `'ecommerce-waf'`), if policy JSON is not provided or `gcloud describe` cannot\n> reach Google Cloud resources, immediately provide the `gcloud compute\n> security-policies describe POLICY_NAME --format=json` command and guide the\n> user through the audit checks: - Check for legacy OWASP 3.0 \u002F 3.3 rulesets\n> (`sqli-stable`, `xss-stable`, `rce-stable`, `methodenforcement-stable`, or\n> `evaluatePreconfiguredExpr`). - Report in-scope WAF rules versus pass-through\n> custom rules (such as IP allowlists `SRC_IPS_V1`, rate limiting, or default\n> rules `priority: 2147483647`). - Highlight signature count expansions under\n> CRS 4.22 (for example, RCE expanding from 11\u002F15 to 44 signatures; SQLi\n> expanding to 60 signatures).\n\nWhen interacting with a customer to upgrade a Cloud Armor security policy,\nexecute this 5-step workflow:\n\n1.  **Discover and Fetch**: Identify the target security policy and fetch its\n    JSON definition.\n2.  **Audit and Classify Risk**: Inspect rules, signature count expansions, and\n    operational risk levels.\n3.  **Confirm Mode and Method Risk**: Align with the customer on Preview Mode\n    versus In-Place Upgrade, method enforcement risk, and quota or priority\n    constraints.\n4.  **Transform Rules**: Translate ruleset names, CEL expressions, signature\n    IDs, and `preconfiguredWafConfig` exclusions to CRS 4.22.\n5.  **Execute and Verify**: Apply the upgrade via `gcloud` and verify telemetry\n    in Cloud Logging.\n\n### Step 1: Policy Discovery and Ingestion\n\n1.  Identify the target security policy name and Google Cloud project.\n2.  Fetch the current policy definition via `gcloud`:\n\n    ```bash\n    gcloud compute security-policies describe POLICY_NAME --project=PROJECT_ID --format=\"json\"\n    ```\n\n    *If policy JSON is not provided or executing in conversational mode, provide\n    the `gcloud describe` command and outline the audit criteria below.*\n\n3.  Inspect the `rules` list:\n\n    -   Identify in-scope WAF rules: calls to `evaluatePreconfiguredWaf` or\n        `evaluatePreconfiguredExpr` using legacy 3.0 \u002F 3.3 rulesets\n        (`sqli-stable`, `xss-stable`, `rce-stable`, `methodenforcement-stable`,\n        etc.).\n    -   Identify out-of-scope rules: pass-through custom rules (such as pure IP\n        allowlists `SRC_IPS_V1`, rate limiting, header matches without WAF\n        calls, or default rules `priority: 2147483647`). Pass these through\n        unchanged.\n    -   Highlight signature coverage expansions (for example, RCE expanding from\n        11\u002F15 to 44 signatures; SQLi expanding to 60 signatures in CRS 4.22).\n\n### Step 2: Audit and Risk Classification\n\nEvaluate each in-scope rule against standard operational risk categories:\n\n\u003C!-- mdformat off -->\n\n| Risk Level | Impact Category | Criteria and Recommended Action |\n| :--- | :--- | :--- |\n| 🔴 **High Risk** | **Breaking Change** | Immediate risk of blocking legitimate production traffic upon cutover. Example: `methodenforcement-v422-stable` only permits `GET`, `HEAD`, `POST`, `OPTIONS`, and **blocks `PUT`, `PATCH`, `DELETE`** requests. Requires customer confirmation and API path\u002Fsignature exemptions. |\n| 🟡 **Medium Risk** | **Attention Required** | Behavioral shifts that should be validated in Preview Mode before enforcement:\u003Cbr>• **Coverage Expansion**: Sensitivity level 4 activates significantly more signatures (for example, RCE expands from 11\u002F15 to 44 signatures; SQLi expands to 60 signatures).\u003Cbr>• **Deprecated Exemption Lost**: Legacy rule opted out of any of the 15 retired CRS 3.0\u002F3.3 IDs (`981172`, `981173`, `980130`, `949110`; SQLi: `942110`; RCE: `932100`, `932105`, `932106`, `932110`, `932115`, `932150`; Scanner Detection: `913101`, `913102`, `913110`, `913120`), which are omitted in 4.22.\u003Cbr>• **Custom Filter Continuity**: Preserved custom header\u002Fcookie\u002Fquery\u002FIP conditions combined with WAF calls. |\n| 🟢 **Low Risk** | **Clean Upgrade** | Direct 1:1 ruleset translation with preserved active opt-outs and no expected behavioral divergence (for example, standard SQLi or XSS rules). |\n| ⚪ **No Action** | **Pass-Through** | Non-OWASP rules (pure IP allowlist\u002Fdenylist, rate limiting, default rule). Carried over unchanged. |\n\n\u003C!-- mdformat on -->\n\n### Step 3: Upgrade Mode Selection and User Alignment\n\nEngage the customer with findings before applying changes:\n\n1.  **Report Findings**: State how many WAF rules will be upgraded, signature\n    coverage expansions, and any deprecated signatures being retired.\n2.  **Method Enforcement Warning**: If `methodenforcement` is present, warn: >\n    *\"Notice: Method Enforcement in CRS 4.22 permits only GET, HEAD, POST, and\n    OPTIONS. If your application handles REST API updates (PUT, PATCH, DELETE),\n    these methods will be blocked with HTTP 403. Would you like to add an\n    exemption for API paths or opt out of rule id911100?\"*\n3.  **Explain Differences Between Modes**:\n    -   **Preview Mode (Recommended)**: Keeps existing legacy rules actively\n        enforcing while deploying corresponding upgraded CRS 4.22 preview rules\n        with `preview = true` at a lower numeric priority number (higher\n        evaluation priority, for example, `PRIORITY - 5`). Traffic is evaluated\n        first by preview rules and logged to Cloud Logging without blocking,\n        ensuring zero risk of downtime or false positives prior to cutover.\n        Requires sufficient quota under the 200-rule limit.\n    -   **In-Place Upgrade**: Directly modifies the CEL expressions and\n        `preconfiguredWafConfig` on existing rule priority numbers in-situ.\n        Immediate enforcement with zero additional rule overhead, but carries\n        cutover risk if new signatures or method enforcement block valid\n        traffic.\n4.  **Quota Guardrail (200 Rules)**:\n    -   Calculate projected rule count: `current_total_rules +\n        in_scope_waf_rules`.\n    -   If projected count > 200, alert the customer: > *\"Cloud Armor enforces a\n        maximum limit of 200 rules per security policy. Deploying in Preview\n        Mode would require PROJECTED_COUNT rules. The upgrade cannot proceed\n        in Preview Mode. We must either perform an In-Place Upgrade or\n        consolidate rules.\"*\n5.  **Priority Spacing Guardrail (Preview Mode)**:\n    -   If an in-scope WAF rule at `PRIORITY` immediately follows another rule\n        at `PREV_PRIORITY` with no free integer priority slot between them\n        (for example, `999` and `1000`, or a WAF rule at priority `0`), alert\n        the customer: > *\"Rule PRIORITY cannot be deployed in Preview Mode\n        because the preceding rule at priority PREV_PRIORITY leaves no open\n        priority number between PREV_PRIORITY and PRIORITY (and placing the\n        preview rule above PREV_PRIORITY would change evaluation order). To use\n        Preview Mode, please readjust your rule priorities to leave at least one\n        open priority slot before PRIORITY, or choose an In-Place Upgrade.\"*\n    -   **Do NOT automatically re-number existing customer rules**: Because rule\n        priorities act as primary identifiers in Cloud Armor and are often tied\n        to Terraform\u002FIaC resources and SIEM alerting filters, never silently\n        shift existing customer rule priorities to make room. If the customer\n        explicitly asks you to readjust their rule priorities for them, first\n        warn them about potential Terraform\u002FIaC state drift and confirm the\n        exact new priority numbers before executing any priority changes.\n\n### Step 4: Rule Transformation Logic\n\n#### A. Ruleset Name Translation\n\nTranslate legacy ruleset names according to the mapping table in\n[ruleset_mappings.md](references\u002Fruleset_mappings.md):\n\n-   Stable: `sqli-stable` to `sqli-v422-stable`, `rce-stable` to\n    `rce-v422-stable`\n-   Canary: `sqli-canary` to `sqli-v422-canary`\n-   3.3 Stable: `sqli-v33-stable` to `sqli-v422-stable`, `nodejs-v33-stable`\n    to `generic-v422-stable`\n\n#### B. CEL Opt-Out and Opt-In Translation\n\n-   Legacy `evaluatePreconfiguredExpr(ruleset, ['id1', 'id2'])` is strictly an\n    **opt-out (disabled)** list.\n-   Convert to native 4.22 syntax:\n\n    ```cel\n    evaluatePreconfiguredWaf('sqli-v422-stable', {'opt_out_rule_ids': ['owasp-crs-v042200-id942120-sqli']})\n    ```\n-   Remap signature IDs: `owasp-crs-v030001-idSIGNATURE_ID-GROUP` to\n    `owasp-crs-v042200-idSIGNATURE_ID-GROUP`. *(Exception: Standalone CVE\n    signatures such as `cve-canary` signatures `owasp-crs-v030001-id*-cve` and\n    `google-mrs-*` retain their original IDs and must not be remapped to\n    `v042200` or dropped).*\n-   Drop all 15 deprecated CRS 3.0\u002F3.3 signature numbers (`981172`, `981173`,\n    `980130`, `949110`; SQLi: `942110`; RCE: `932100`, `932105`, `932106`,\n    `932110`, `932115`, `932150`; Scanner Detection: `913101`, `913102`,\n    `913110`, `913120`).\n\n#### C. Fine-Tuning (`preconfiguredWafConfig`)\n\nFor rules with structured `preconfiguredWafConfig.exclusions[]`:\n\n-   Update `targetRuleSet` to the CRS 4.22 equivalent.\n-   Remap `targetRuleIds` to `v042200` and drop deprecated IDs. **Warning**: If\n    an exclusion's `targetRuleIds` list becomes empty (`[]`) after dropping\n    retired IDs, remove the entire exclusion entry rather than leaving\n    `targetRuleIds: []` (otherwise an empty `targetRuleIds` list exempts the\n    entire ruleset).\n-   Carry over all field exclusions (`requestHeadersToExclude`,\n    `requestCookiesToExclude`, `requestQueryParamsToExclude`,\n    `requestUrisToExclude`, `requestBodiesToExclude`) and match operators\n    without modification.\n-   Details in [fine_tuning_and_cel.md](references\u002Ffine_tuning_and_cel.md).\n\n### Step 5: Execution Delivery and Verification\n\n#### Delivering In-Place Upgrade\n\nExecute `gcloud compute security-policies rules update`:\n\n```bash\ngcloud compute security-policies rules update PRIORITY \\\n  --security-policy=\"POLICY_NAME\" \\\n  --project=PROJECT_ID \\\n  --expression=\"UPGRADED_EXPRESSION\"\n```\n\n#### Delivering Preview Mode Upgrade\n\nDeploy preview rules at a numeric priority strictly between the immediately\npreceding rule and `ENFORCED_PRIORITY` (`PREV_PRIORITY \u003C PREVIEW_PRIORITY \u003C\nENFORCED_PRIORITY`) using `rules create`:\n\n```bash\ngcloud compute security-policies rules create PREVIEW_PRIORITY \\\n  --security-policy=\"POLICY_NAME\" \\\n  --project=PROJECT_ID \\\n  --expression=\"UPGRADED_EXPRESSION\" \\\n  --action=\"ACTION\" \\\n  --preview \\\n  --description=\"PREVIEW: Upgraded CRS 4.22 Rule for Priority ENFORCED_PRIORITY\"\n```\n\n#### Telemetry Verification in Cloud Logging\n\nInstruct the customer to inspect preview logs before cutover:\n\n```bash\ngcloud logging read '\n  resource.type=\"http_load_balancer\" AND\n  jsonPayload.enforcedSecurityPolicy.name=\"POLICY_NAME\" AND\n  jsonPayload.previewSecurityPolicy.matchedRulePriority:*\n' --project=PROJECT_ID --limit=20\n```\n\n--------------------------------------------------------------------------------\n\n## Critical Gotchas and Domain Rules\n\n1.  **`evaluatePreconfiguredExpr` is NEVER Opt-In**: The array in legacy\n    `evaluatePreconfiguredExpr` was strictly an exclusion (opt-out) list.\n    Treating it as opt-in would inadvertently disable all other signatures in\n    that ruleset!\n2.  **Never Re-introduce Deprecated Signatures**: All 15 retired CRS 3.0\u002F3.3\n    signature numbers (`981172`, `981173`, `980130`, `949110`; SQLi: `942110`;\n    RCE: `932100`, `932105`, `932106`, `932110`, `932115`, `932150`; Scanner\n    Detection: `913101`, `913102`, `913110`, `913120`) were removed in CRS 4.22.\n    Keeping them in `opt_out_rule_ids` or `targetRuleIds` causes Cloud Armor API\n    schema rejections.\n3.  **Method Enforcement Defaults**: CRS 4.22 Method Enforcement blocks `PUT`,\n    `PATCH`, and `DELETE`. Never perform a silent in-place upgrade of method\n    enforcement without user confirmation.\n4.  **Preview Rule Priorities and Cutover Safety**: Cloud Armor evaluates rules\n    in ascending priority order (`0` to `2147483647`). A preview rule must\n    evaluate *before* the enforcing rule it previews, but *after* any preceding\n    rule (`PREV_PRIORITY \u003C PREVIEW_PRIORITY \u003C ENFORCED_PRIORITY`) so it never\n    crosses intervening `allow` or custom rules. During cutover to full\n    enforcement, update the original `ENFORCED_PRIORITY` rule in-place to CRS\n    4.22 and delete `PREVIEW_PRIORITY` rather than promoting `PREVIEW_PRIORITY`\n    in place.\n5.  **Atomic Import for Structured Exclusions**: When a policy contains complex\n    `preconfiguredWafConfig` blocks, prefer exporting the policy JSON,\n    transforming it, and applying it via `gcloud compute security-policies\n    import` to ensure atomic updates.\n6.  **Preserve Standalone CVE Signatures (`cve-canary`)**: `cve-canary` is an\n    out-of-band rule for specific vulnerabilities (for example, Log4j\n    CVE-2021-44228 \u002F CVE-2021-45046, React RCE CVE-2025-55182). Its signature\n    IDs (`owasp-crs-v030001-id044228-cve`, `id144228-cve`, `id244228-cve`,\n    `id344228-cve`) are valid and retain the `v030001` prefix. Only upgrade the\n    syntax to `evaluatePreconfiguredWaf('cve-canary', ...)`; never rewrite them\n    to `v042200` or drop them as deprecated.\n\n--------------------------------------------------------------------------------\n\n## References and Resources\n\n-   [ruleset_mappings.md](references\u002Fruleset_mappings.md): Full CRS 3.0 \u002F 3.3 to\n    4.22 ruleset mapping, sensitivity levels, and signature counts.\n-   [fine_tuning_and_cel.md](references\u002Ffine_tuning_and_cel.md): CEL syntax\n    options, structured `preconfiguredWafConfig` exclusions, and method\n    enforcement mitigations.\n-   [gcloud_recipes.md](references\u002Fgcloud_recipes.md): Copy-pasteable `gcloud`\n    recipes for audit, preview mode, and Cloud Logging queries.\n-   [upgrade_policy.py](scripts\u002Fupgrade_policy.py): Deterministic CLI helper\n    script.\n-   [contributing.md](references\u002Fcontributing.md): Domain and code invariants\n    for maintaining this skill.\n",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.0.1","Security","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill cloud-armor-crs-rule-upgrader",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill cloud-armor-crs-rule-upgrader",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill cloud-armor-crs-rule-upgrader","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002FSKILL.md",true,[51,57,61,65,69,73,77,81],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"INSTALL-SOURCE.json","REFERENCE","参考文档",547,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002FINSTALL-SOURCE.json",{"path":58,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fattribution.md",1935,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002Freferences\u002Fattribution.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fcontributing.md",4439,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002Freferences\u002Fcontributing.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Ffine_tuning_and_cel.md",6813,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002Freferences\u002Ffine_tuning_and_cel.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fgcloud_recipes.md",8435,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002Freferences\u002Fgcloud_recipes.md",{"path":78,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fruleset_mappings.md",11934,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002Freferences\u002Fruleset_mappings.md",{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Fupgrade_policy.py","SCRIPT","脚本",35821,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-armor-crs-rule-upgrader\u002Fscripts\u002Fupgrade_policy.py",[88,96,105,113,121,129],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]