Install
openclaw skills install @huaweicloudskill/huawei-cloud-network-topology-auditOrchestrator skill that audits Huawei Cloud network topology for security and configuration risks. Given a user-described access path (e.g., "ELB web-elb → CCE prod-cce → RDS prod-db"), it resolves the real topology, expands to the full VPC network surface, evaluates risks against an extensible rule directory, and produces a Markdown audit report with a Mermaid topology diagram. Triggers include: "组网审计", "网络拓扑审计", "安全组审计", "网络合理性检查", "网络风险审计", "network audit", "topology audit", "security group audit", "network risk check", "组网评估".
openclaw skills install @huaweicloudskill/huawei-cloud-network-topology-auditRead-only orchestrator skill. This skill audits existing cloud resources — it never creates, modifies, or deletes any resource. All data collection is delegated to existing query skills (path A) or self-written scripts based on official documentation (path B).
This skill audits Huawei Cloud network topology for security and configuration risks. Given a user-described access path (e.g., "ELB web-elb → CCE prod-cce → RDS prod-db"), it:
rules/network-audit-rules.yaml)User describes access path (natural language)
│
▼
[Step 1] Connectivity precheck ── fail ──→ Prompt user to configure credentials
│ pass
▼
[Step 2] Path parsing + find-skills lookup
│
▼
[Step 3] Real topology discovery (Path A: query skills, Path B: self-written scripts)
│
▼
[Step 4] Diff: described path vs real topology (real = source of truth)
│
▼
[Step 5] User confirmation of the real topology
│
▼
[Step 6] Risk audit against network-audit-rules.yaml
│
▼
[Step 7] Markdown report generation (Mermaid diagram, ASCII fallback)
HUAWEI_ACCESS_KEY / HUAWEI_SECRET_KEY or
HW_AK / HW_SK / HWC_ACCESS_KEY / HWC_SECRET_KEY) or hcloud CLI configscripts/pip install huaweicloudsdkdcs| Variable | Required | Description |
|---|---|---|
SKILL_QUALITY_ENDPOINT | No | Report endpoint, default https://skillsapi.developer.myhuaweicloud.com/api/quality/report |
SKILL_QUALITY_NAME | No | Skill name (auto-detected) |
SKILL_QUALITY_DISABLE | No | Set 1 to disable reporting (local dev) |
SKILL_QUALITY_TIMEOUT | No | Report timeout in seconds (default 3) |
Run the precheck script to verify credentials are available and the API is reachable:
bash scripts/precheck.sh
Parse the user's natural-language access path:
references/resource-skill-mapping.mdhuawei-cloud-find-skills (via its search script) to confirm the query skill exists
in the current indexOutput: Structured path draft + collection path mapping
Execute the collection plan:
| Resource | Query Skill | Key Queries |
|---|---|---|
| VPC | huawei-cloud-network-query | ListVpcs, ShowVpc |
| Subnet | huawei-cloud-network-query | ListSubnets |
| Security Group | huawei-cloud-network-query | ListSecurityGroups, ShowSecurityGroup |
| Route Table | huawei-cloud-network-query | ListRouteTables |
| EIP | huawei-cloud-network-query | ListPublicips |
| ELB | huawei-cloud-network-query | ListLoadBalancers, ListListeners, ListPools |
| NAT | huawei-cloud-network-query | ListNatGateways, ListSnatRules, ListDnatRules |
| ECS | huawei-cloud-computing-query | ListServersDetails |
| RDS | huawei-cloud-rds-smart-service | ListInstances |
| CCE | huawei-cloud-cce-cluster-management | ListClusters, ListNodes |
| Resource | Script | SDK Used |
|---|---|---|
| DCS | scripts/query-dcs-instances.py | huaweicloudsdkdcs.v2 |
Output: Real topology dataset (all resources in the VPC network surface)
Compare the user-described path against the real topology:
Output: Diff list — "described vs real" with real topology as authoritative
Present the user with:
Wait for user confirmation. Do not proceed to Step 6 without it.
Load rules/network-audit-rules.yaml and evaluate each rule against the topology dataset:
Validate the rule directory before use:
python3 scripts/validate-rules.py rules/network-audit-rules.yaml
Output: Risk list (sorted by severity, each item traceable to a rule ID)
Generate a Markdown audit report containing:
Render the Mermaid diagram. If rendering fails, fall back to ASCII art:
bash scripts/mermaid-to-ascii.sh
Output: Final Markdown report (saved to a file and presented to the user)
| Command | Purpose |
|---|---|
bash scripts/precheck.sh | Step 1: Connectivity precheck |
python3 scripts/validate-rules.py rules/network-audit-rules.yaml | Step 6: Validate rule directory |
bash scripts/mermaid-to-ascii.sh | Step 7: Mermaid ASCII fallback |
python3 scripts/query-dcs-instances.py --region {region} | Path B: Query DCS instances (SDK) |
| Parameter | Required | Description | Example |
|---|---|---|---|
| Access path | Yes | Natural language path with resource names | "ELB web-elb → CCE prod-cce → RDS prod-db" |
--region | Yes | Huawei Cloud region | cn-north-4 |
--output | No | Report output path | ./audit-report.md |
This Skill integrates skill_quality_sdk.py for execution quality reporting. Every run automatically reports trace_id, status (success/biz_fail/sys_fail/cancel), error code, cost, and masked input/output to the operations console.
quality_context context manager:
from skill_quality_sdk import quality_context, QualityError
with quality_context(skill_name="huawei-cloud-network-topology-audit", skill_version="1.0.0") as q:
q.input = {...}
result = do_something()
q.output = result
scripts/ for future Python wrapper use| Prefix | Category | Examples |
|---|---|---|
| U | User input | U01 missing resource name, U03 no data found |
| C | Configuration | C01 missing credentials, C02 missing region |
| N | Network | N01 API timeout, N02 connection refused |
| B | Code bug | B01 null pointer, B04 rule parse error |
| P | Platform | P01 report generation failed |
Reporting is non-blocking and fails silently — it never interrupts the Skill main flow.
Disable via SKILL_QUALITY_DISABLE=1 for local testing.