Back to skill

Security audit

huaweicloud-config-helper

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Huawei Cloud Config helper that performs read-only inventory and compliance-related queries using user-provided Huawei Cloud credentials, with scoping and dependency-hygiene caveats.

Install and use this only in a trusted environment with Huawei Cloud credentials limited to Config ReadOnlyAccess. Avoid giving it broad account keys, do not pass untrusted values into provider, region, resource type, or SQL parameters, and consider pinning SDK dependency versions before installation.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/query_Config_resource_summary.py:10
Finding

SQL Injection Through Unvalidated Resource Summary Filters

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:50
Finding

Unpinned Third-Party Dependencies in Installation Instructions

Content
View full analysis
Remediation
View remediation
huaweicloudsdkcore== ``` 2. Generate and commit a lock file containing resolved transitive dependencies. 3. Record cryptographic hashes and install with hash enforcement, for example: ```bash pip install --require-hashes -r requirements.txt ``` 4. Use an explicitly trusted package index and avoid untrusted `--extra-index-url` configurations. 5. Periodically scan pinned dependencies for disclosed vulnerabilities and update them through a controlled review process. 6. Install dependencies in an isolated virtual environment as a non-privileged user rather than using system-wide or administrator-level installation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The code is clearly related to Huawei Cloud Config and does support part of the declared scope: schema queries, SQL condition queries, and some compliance-related querying via built-in policy definitions. However, the description claims a broader assistant that provides global resource queries, resource configuration queries, resource relationship/asset inventory style querying, and general compliance checking capabilities. In the supplied code chunk, there are no functions for fetching specific resources, querying resource configurations directly, enumerating global resources broadly, or analyzing relationships. The primary purpose is aligned at a high level, but the implemented functionality is substantially narrower than the declared description, so this is a description/behavior mismatch due to overclaiming capabilities.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The activation criteria are extremely broad and mandate use of this skill for many generic Huawei Cloud resource-management, audit, and compliance scenarios, even when Config is not explicitly requested. Overbroad triggering can route unrelated user requests into a credentialed cloud-query workflow, causing unnecessary access to cloud metadata and increasing the chance of overcollection, privacy leakage, or execution in the wrong context.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill requires access to sensitive environment variables (HUAWEICLOUD_AK/SK) and performs networked cloud queries, but it does not declare any explicit tool scope or permission boundaries. This increases the risk of overbroad execution, unintended secret exposure, or use of tools beyond what the user expects, especially because the skill is designed to handle cloud inventory and compliance workflows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill name and description are entirely Chinese and present the assistant as a fixed Chinese-language helper, with no indication that users may choose another language. Under the stated policy, language constraints should be opt-in or explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The client initialization pulls HUAWEICLOUD_AK and HUAWEICLOUD_SK from environment variables, which is access to sensitive credentials. While the code handles request errors, it provides no comment, docstring, or other disclosure explaining that the skill depends on and accesses cloud secrets.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code forces request.x_language = "zh-cn", which imposes a specific locale on responses. There is no visible user opt-in, configurability, or justification that this skill is intended only for a Chinese-language or region-specific context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The user-facing argparse description and option help strings are written only in Chinese, which imposes a specific language on all users of the skill. The file does not provide an English alternative, language selection, or any justification that this is a China-only or locale-specific tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code issues a query through query_Config_resource_by_sql(sql) and imports requests, indicating remote access to configuration data, but the script provides no user-facing notice that it will contact an external service or retrieve potentially sensitive infrastructure metadata. Aside from the brief argparse description, there is no confirmation prompt, logging, or explanatory warning in the file about this behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This JSON file includes many Chinese-language description strings alongside English names, but it does not indicate that the skill is region-specific or provide any opt-in/choice for language or locale. Under the language/locale policy rule, forcing a specific language experience without user choice can be a policy concern when the constraint is undocumented.

Content

No source excerpt is available for this finding.