T09 · Insecure Skill Coding Practices
- Location
list_vpcs.py:175- Finding
Unvalidated Region Value Enables Signed Requests to Attacker-Controlled Hosts
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a disclosed read-only Huawei Cloud VPC lister, but an input-validation flaw can send signed credential metadata to a non-Huawei host if a malicious region value is supplied.
Review this skill before use. Only use a dedicated Huawei Cloud key with the documented read-only VPC/IAM permissions, do not pass region values from untrusted input, and prefer a fixed region allowlist or final-host validation before running it with real credentials.
list_vpcs.py:175Unvalidated Region Value Enables Signed Requests to Attacker-Controlled Hosts
The skill performs local file reads for credential loading and makes outbound network requests to Huawei Cloud APIs, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a trust and review gap: operators cannot easily verify what capabilities the skill is expected to use, and a modified or deceptive implementation could leverage those undeclared capabilities without clear policy constraints.
The module docstring, usage, and user-facing guidance are entirely in Chinese, and the script's prompts/errors are also Chinese-only. For a general-purpose infrastructure utility, this imposes a specific language on users without opt-in or justification, which matches the locale policy violation criteria.
The placeholder values for the access key fields are written only in Chinese, which imposes a specific language on users. The file does not indicate that the skill is region- or language-specific, nor does it offer an alternative language option.
This code file contains natural-language text in Chinese, including the class docstring and later user-facing output/asserted messages, without any indication that the skill supports multiple languages or that Chinese is an intentional opt-in locale. Under the policy rule, forcing a specific language without user choice is a locale-policy concern.
The tests verify Chinese-only output such as '暂无 VPC' and '认证失败', which strongly suggests the underlying skill emits fixed Chinese messages. Because no user language choice or documented locale restriction is present in this file, this appears to enforce a specific language by default.