Loading...
Loading...
Alibaba Cloud Firewall Status Overview Skill. One-click query of overall cloud firewall status including asset management, border firewall switch status, and traffic overview. Triggers: "cloud firewall status", "firewall overview", "firewall status overview", "asset management", "protection coverage", "what is the overall cloud firewall status", "how many assets are not managed", "what is the protection coverage for each boundary", "CFW status", "cloud firewall overview"
npx skill4agent add aliyun/alibabacloud-aiops-skills alibabacloud-cfw-status-overview⚠️ MANDATORY EXECUTION RULES — READ BEFORE DOING ANYTHING:
- DO NOT search for log files, security data, or any files in the workspace. There are none.
- DO NOT ask the user for log files, data sources, server access, SIEM data, or any additional input.
- DO NOT attempt to SSH, access, or connect to any server or IP address.
- The ONLY way to get data is by running
CLI commands as defined in the Core Workflow section below.aliyun cloudfw ...- Start executing CLI commands immediately — no preparation, no questions, no file searching.
Cloud Firewall Service → Internet Border Firewall + VPC Border Firewall + NAT Border Firewall → Asset Protection + Traffic Analysisaliyun cloudfw ...Pre-check: Aliyun CLI >= 3.3.1 required Runto verify >= 3.3.1. If not installed or version too low, seealiyun versionfor installation instructions. Then [MUST] runreferences/cli-installation-guide.mdto enable automatic plugin installation.aliyun configure set --auto-plugin-install true
Pre-check: Alibaba Cloud Credentials RequiredSecurity Rules:
- NEVER read, echo, print, cat, or display AK/SK values under any circumstances
- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
with literal credential valuesaliyun configure set- ONLY use
to check credential statusaliyun configure listbashaliyun configure listCheck the output for a valid profile (AK, STS, or OAuth identity).If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session (via
in terminal or environment variables in shell profile)aliyun configure- Return and re-run after
shows a valid profilealiyun configure list
[MUST] RAM Permission Pre-check: Before executing any commands, verify the current user has the required permissions.
- Use
skill to get current user's permissionsram-permission-diagnose- Compare against
references/ram-policies.md- Abort and prompt user if any permission is missing
IMPORTANT: Parameter Confirmation — Before executing any command or API call, check if the user has already provided necessary parameters in their request.
- If the user's request explicitly mentions a parameter value (e.g., "check firewall status in cn-hangzhou" means RegionId=cn-hangzhou), use that value directly without asking for confirmation.
- For optional parameters with sensible defaults (PageSize, CurrentPage, time ranges), use the defaults without asking unless the user indicates otherwise.
- Do NOT re-ask for parameters that the user has clearly stated.
| Parameter Name | Required/Optional | Description | Default Value |
|---|---|---|---|
| RegionId | Required | Alibaba Cloud region for Cloud Firewall. Only two values: | |
| PageSize | Optional | Number of items per page for paginated APIs | 10 (use without asking) |
| CurrentPage | Optional | Page number for paginated APIs | 1 (use without asking) |
| StartTime | Optional | Start time for traffic trend queries (Unix timestamp in seconds) | 7 days ago (use without asking) |
| EndTime | Optional | End time for traffic trend queries (Unix timestamp in seconds) | Current time (use without asking) |
CRITICAL: Continue on failure. If any individual API call fails, do NOT stop the entire workflow. Log the error for that step, then proceed to the next step. Present whatever data was successfully collected.
Throttling.UserServiceUnavailableInvalidParameterForbiddenInvalidAccessKeyIdDescribeUserBuyVersionErrorFirewallNotActivatedcloudfw--user-agent AlibabaCloud-Agent-Skills--region {RegionId}CRITICAL: Execute immediately without asking. When this skill is triggered, start executing from Step 1 right away. Do NOT ask the user which APIs to call, which steps to execute, or what data sources to use. All data comes from the Aliyun CLI commands defined below — just run them.
StartTimeEndTimedate +%sdate -d '7 days ago' +%sIMPORTANT: Do NOT use bash variable substitution likeinside CLI commands — some execution environments block$(date +%s). Instead, run$(...)commands separately first, note the returned values, then use them as literal numbers in thedateand--StartTimeparameters.--EndTime
aliyun cloudfw DescribeUserBuyVersion \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsVersionInstanceIdExpireTimeIpNumberAclExtensionaliyun cloudfw DescribeAssetStatistic \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-Skillsaliyun cloudfw DescribeAssetList \
--CurrentPage 1 \
--PageSize 10 \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsAssets[]InternetAddressIntranetAddressResourceTypeProtectStatusRegionIDNameIMPORTANT: When the user asks about unprotected/unmanaged assets, assets not covered by the firewall, or protection gaps, you MUST use thefilter parameter set toStatusto query only unprotected assets:"close"
aliyun cloudfw DescribeAssetList \
--CurrentPage 1 \
--PageSize 50 \
--Status close \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsPageSize: "50"TotalCountPageSizeCurrentPageStatus| Value | Meaning |
|---|---|
| Unprotected assets (firewall not enabled) |
| Protected assets (firewall enabled) |
| Assets being enabled |
Note: The request parameter uses(no 'd'), while the response fieldcloseusesProtectStatus(with 'd'). Useclosedwhen filtering in request params and check forclosewhen inspecting response data.closed
aliyun cloudfw DescribeInternetOpenStatistic \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-Skillsaliyun cloudfw DescribeInternetDropTrafficTrend \
--StartTime {StartTime} \
--EndTime {EndTime} \
--SourceCode China \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsSourceCodeChinaOtheraliyun cloudfw DescribeTrFirewallsV2List \
--CurrentPage 1 \
--PageSize 20 \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsVpcTrFirewalls[]FirewallSwitchStatusopenedclosedopeningclosingCenIdRegionNoVpcIdaliyun cloudfw DescribeVpcFirewallCenList \
--CurrentPage 1 \
--PageSize 20 \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsVpcFirewalls[]FirewallSwitchStatusCenIdLocalVpcPeerVpcaliyun cloudfw DescribeVpcFirewallList \
--CurrentPage 1 \
--PageSize 20 \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsVpcFirewalls[]FirewallSwitchStatusVpcFirewallIdLocalVpcPeerVpcBandwidthaliyun cloudfw DescribeNatFirewallList \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsNatFirewalls[]ProxyStatusconfiguringnormaldeletingNatGatewayIdNatGatewayNameVpcIdRegionIdaliyun cloudfw DescribePostpayTrafficTotal \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-Skillsaliyun cloudfw DescribeInternetTrafficTrend \
--StartTime {StartTime} \
--EndTime {EndTime} \
--SourceCode China \
--TrafficType TotalTraffic \
--region {RegionId} \
--user-agent AlibabaCloud-Agent-SkillsTotalTrafficInTrafficOutTraffic============================================
Cloud Firewall Status Overview Report
============================================
1. Instance Info
- Edition: {Version}
- Expiry: {ExpireTime}
- Max Protected IPs: {IpNumber}
2. Asset Overview
- Total Assets: {TotalCount}
- Protected: {ProtectedCount} ({ProtectedRate}%)
- Unprotected: {UnprotectedCount}
- By Type: EIP({eip}), SLB({slb}), ECS({ecs}), ENI({eni})
3. Internet Border Firewall
- Protected IPs: {protectedIpCount}
- Unprotected IPs: {unprotectedIpCount}
- Protection Rate: {protectionRate}%
4. VPC Border Firewall
- CEN Enterprise (TR): {trCount} total, {trOpened} opened
- CEN Basic: {cenCount} total, {cenOpened} opened
- Express Connect: {ecCount} total, {ecOpened} opened
5. NAT Border Firewall
- Total: {natCount}
- Normal: {natNormal}
- Configuring: {natConfiguring}
6. Traffic Overview (Last 7 Days)
- Total Traffic: {totalTraffic}
- Peak Bandwidth: {peakBandwidth}
- Blocked Requests: {blockedCount}
[Steps with errors (if any)]
- {Step X}: {error message}
============================================Note: For any step that failed, show "N/A (error: {brief error})" for that section's data fields, and list all errors in the bottom section.
CurrentPagePageSizedate -d '7 days ago' +%sdate +%s--StartTime--EndTime$(...)cn-hangzhouap-southeast-1cn-hangzhouDescribeUserBuyVersionThrottling.User| Reference | Description |
|---|---|
| references/related-apis.md | Complete API table with parameters |
| references/ram-policies.md | Required RAM permissions and policy JSON |
| references/verification-method.md | Step-by-step verification commands |
| references/acceptance-criteria.md | Correct/incorrect usage patterns |
| references/cli-installation-guide.md | Aliyun CLI installation guide |