Xpersona
A

Alibabacloud Waf Checkresponse Intercept Query

CLAWHUB · Unverified

Diagnose why a request was blocked by Alibaba Cloud WAF. Retrieves block logs, identifies the triggering rule, and provides remediation guidance. Supports di...

62
Rank
84
Safety
964
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 964 downloads reported by the source. Last updated 10/12/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-waf-checkresponse-intercept-query
  1. Install using `clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-waf-checkresponse-intercept-query` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/sdk-team/alibabacloud-waf-checkresponse-intercept-query before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-waf-checkresponse-intercept-query/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

106,992 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: alibabacloud-waf-checkresponse-intercept-query
description: |
  Diagnose why a request was blocked by Alibaba Cloud WAF. Retrieves block logs, identifies the triggering rule, and provides remediation guidance. Supports disabling problematic rules and managing WAF log collection settings.
  Use when users report being blocked by WAF, encounter 405/block error pages, see "Your request has been blocked" messages, or need to investigate and fix WAF interception issues.
  Trigger words: "WAF block query", "blocked by WAF", "405 troubleshooting", "request blocked", "checkresponse", "intercept query", "WAF拦截", "被WAF拦截", "disable WAF rule", "enable WAF log"
---

# WAF CheckResponse Intercept Query

## Prerequisites

**Pre-check: Aliyun CLI >= 3.3.3 required**
> Run `aliyun version` to verify >= 3.3.3. If not installed or version too low,
> see https://help.aliyun.com/document_detail/139508.html for installation instructions.

**Pre-check: Aliyun CLI plugin update required**
> [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin installation.
> [MUST] run `aliyun plugin update` to ensure that any existing plugins are always up-to-date.

## Observability

**UA Template** — Every `aliyun` CLI command invocation must include `--user-agent` with the following format:

```
AlibabaCloud-Agent-Skills/alibabacloud-waf-checkresponse-intercept-query/{session-id}
```

**session-id generation rules**:
- Generate **once** at the start of each skill session (before the first CLI command)
- Format: 32-character lowercase hexadecimal string (e.g. `a1b2c3d4e5f67890abcdef1234567890`)
- Generation method: `python3 -c "import uuid; print(uuid.uuid4().hex)"`
- Reuse the **same** session-id for all CLI commands within the same session

Example:
```bash
# Generate session-id once at the beginning
SESSION_ID=$(python3 -c "import uuid; print(uuid.uuid4().hex)")

# Use in every CLI command
aliyun waf-openapi describe-instance --region cn-hangzhou \
  --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-waf-checkresponse-intercept-query/${SESSION_ID}"
```

Before execution, you **must** collect the following information from the user:

| Parameter | Description | Required |
|-----------|-------------|----------|
| Request ID | The traceid obtained from the HTML body of WAF's block (intercept) response, or the Request ID shown on the 405 block page displayed in the browser | Yes |

**Optional**: WAF Instance ID, SLS Project name, SLS Logstore name (will be auto-discovered if not provided)

**Notes**:
- Request ID (traceid) is obtained from the HTML body of WAF's block response, or from the 405 block page displayed in the browser
- Uses Alibaba Cloud default credential chain for authentication (ECS RAM Role, ~/.alibabacloud/config, etc.)

## Region Information

| RegionId Value | Region | Description |
|----------------|--------|-------------|
| `cn-hangzhou` | Chinese Mainland | WAF instances within mainland China |
| `ap-southeast-1` | O

_meta.json

{
  "ownerId": "kn74p5w8ywv6prh40g0s82gmqh83nw54",
  "slug": "alibabacloud-waf-checkresponse-intercept-query",
  "version": "0.0.4",
  "publishedAt": 1783305294853
}

references/common-block-reasons.md

# Common WAF Block Reasons and Recommendations

## Block Reason Reference Table

| Rule Type | Common Causes | Recommendations |
|-----------|---------------|-----------------|
| Custom Access Control (ACL) | URL/parameters matched blacklist rules | Check if request URL and parameters match business expectations |
| CC Protection | Request frequency exceeded threshold | Reduce request frequency, or request CC threshold adjustment |
| IP Blacklist/Whitelist | Client IP is on the blacklist | Verify if IP was blocked by mistake, contact admin to remove |
| Region Blocking | Source region is restricted | Verify if the access region is compliant |
| Bot Management | Identified as malicious crawler | Verify if it is a legitimate crawler, request whitelist addition |
| Data Risk Control | Triggered risk control policy | Check if request behavior is normal |

## Protection Object Naming Conventions

Protection objects are named differently based on the access method:

| Access Method | Protection Object Name Example | Description |
|---------------|-------------------------------|-------------|
| **CNAME Access** | `hhd.aliyundemo.com-waf` | Domain name + `-waf` suffix |
| **ALB Cloud Product Access** | `alb-ofywk004eo08ou0hqe-alb` | ALB instance ID + `-alb` suffix |
| **MSE Route-Level Access** | `testzhukuoroute-gw-f3d2135cd0674b2199fab5a4186596e2-mse` | Route name + `-mse` suffix |
| **ECS Instance Port-Level Access** | `i-2ze9eanh176rq8p1o0l7-80-ecs` | ECS instance ID + port + `-ecs` suffix |
| **Domain + ALB Instance-Level Access** | `abc.test.com-alb-4zej9hs2bz41kq2g52-alb` | Domain name + ALB instance ID + `-alb` suffix |

references/ram-policies.md

# RAM Policy Requirements

This skill requires the following RAM permissions to operate correctly.

## Minimum Required Permissions

### WAF OpenAPI Permissions

| Action | Resource | Description |
|--------|----------|-------------|
| `waf:DescribeInstance` | `*` | Query WAF instance information |
| `waf:DescribeSlsLogStore` | `*` | Get SLS log storage configuration |
| `waf:DescribeSlsLogStoreStatus` | `*` | Check global log service status |
| `waf:DescribeResourceLogStatus` | `*` | Check protection object log switch |
| `waf:DescribeDefenseResources` | `*` | List protection objects (resources) associated with a WAF instance |
| `waf:DescribeDefenseTemplates` | `*` | List defense templates |
| `waf:DescribeDefenseRule` | `*` | Query defense rule details |
| `waf:DescribeDefenseRules` | `*` | List defense rules |
| `waf:DescribeBaseSystemRules` | `*` | Query built-in system rule details |

### SLS Permissions

| Action | Resource | Description |
|--------|----------|-------------|
| `log:GetLogStoreLogs` | `acs:log:*:*:project/<waf-sls-project>/logstore/<waf-logstore>` | Query WAF block logs from SLS |

### Optional Permissions (Rule Operations)

These permissions are only needed when the user requests to disable a WAF rule:

| Action | Resource | Description |
|--------|----------|-------------|
| `waf:ModifyDefenseRuleStatus` | `*` | Disable/enable a defense rule (RuleStatus=0/1 only) |

### Optional Permissions (Log Service Management)

These permissions are only needed when enabling log service or log collection for a protection object:

| Action | Resource | Description |
|--------|----------|-------------|
| `waf:ModifyUserWafLogStatus` | `*` | Enable WAF log service for an instance (enable only, disable is not permitted) |
| `waf:ModifyResourceLogStatus` | `*` | Enable/disable log collection for a protection object |

## Sample RAM Policy (JSON)

```json
{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "waf:DescribeInstance",
        "waf:DescribeSlsLogStore",
        "waf:DescribeSlsLogStoreStatus",
        "waf:DescribeResourceLogStatus",
        "waf:DescribeDefenseResources",
        "waf:DescribeDefenseTemplates",
        "waf:DescribeDefenseRule",
        "waf:DescribeDefenseRules",
        "waf:DescribeBaseSystemRules"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "log:GetLogStoreLogs"
      ],
      "Resource": "acs:log:*:*:project/*/logstore/*"
    }
  ]
}
```

## Notes

- The WAF resources use `*` because WAF instance IDs are dynamically discovered during execution.
- The SLS resource can be narrowed to specific projects/logstores if known in advance.
- Rule modification permissions (`ModifyDefenseRuleStatus`) are intentionally excluded from the base policy. Only grant when rule disable operations are needed.
- This skill **never** calls `DeleteDefenseRule` or `ModifyDefenseRule` — those actions are explicitly prohibited.

references/rule-config-details.md

# WAF Rule Configuration Details

## Config Field Description

| Parameter | Type | Description |
|-----------|------|-------------|
| `action` | string | Action to execute (block - block request, monitor - observe only) |
| `ccStatus` | int | **CC rule indicator**: 1 - custom rate limiting rule, 0 - custom access control rule |
| `effect` | string | **Only valid when ccStatus=1**, scope of effect after blacklisting |
| `conditions` | array | List of matching conditions |

## Important Notes - `ccStatus` and `effect`

### `ccStatus` Parameter

- `1` - The rule is a **custom rate limiting rule (CC rule)**
- `0` - The rule is a **custom access control rule (ACL rule)**

### `effect` Parameter (only valid when `ccStatus=1`)

- `service` - After blacklisting, takes effect on the **entire protection object** (i.e., `matched_host` in SLS logs)
- `rule` - After blacklisting, takes effect only within the **scope of this rule** (must satisfy rule matching conditions)

**Note**: When `ccStatus=0`, the `effect` parameter is meaningless and can be ignored.

## Example Configuration Interpretation

```json
{
  "action": "block",
  "ccStatus": 0,          // ACL rule, not a CC rule
  "effect": "service",    // Meaningless because ccStatus=0
  "conditions": [{"key": "URL", "opValue": "contain", "values": "/test"}]
}
```

## Common Rule ID Prefixes

| Prefix | Rule Type |
|--------|-----------|
| 101xxx | Custom Access Control (ACL) |
| 102xxx | CC Protection Rules |
| 103xxx | IP Blacklist/Whitelist |
| 104xxx | Region Blocking |
| 105xxx | Bot Management |
| 106xxx | Data Risk Control |

## SLS Log Key Fields

| Field | Description |
|-------|-------------|
| `request_traceid` | Request ID |
| `final_rule_id` | Block rule ID |
| `final_plugin` | Block plugin type (e.g., acl, cc, etc.) |
| `final_action` | Action executed (block - blocked, monitor - observed) |
| `status` | HTTP response status code |
| `real_client_ip` | Real client IP |
| `host` | Request domain |
| `request_uri` | Request URI |

Sponsored

Ads related to Alibabacloud Waf Checkresponse Intercept Query and adjacent AI workflows.