Back to skill

Security audit

huawei-cloud-cce-list

Security checks for vulnerabilities and agentic risk

Overview

This cluster-listing skill needs review because its required telemetry is insufficiently explained and environment overrides weaken its read-only guarantee.

Before installing, verify the telemetry wrapper and its data collection, or disable reporting with SKILL_QUALITY_REPORT=0. Use a project-scoped read-only cloud identity and remove or tightly control CCE_LIST_HCLOUD_BIN and CCE_LIST_HCLOUD_ARGS. All eight bundled files were inspected; the external wrapper and downloaded installer remain outside that evidence. The artifacts support Review, without establishing credential theft or malicious intent.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (14)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The security-relevant mismatch is that environment overrides control the executable and prepend unchecked arguments despite the claimed ListClusters-only execution guarantee. If an attacker can influence the process environment, execution can escape that guarantee with the agent's permissions and inherited credentials; the incomplete table is a separate correctness defect.

Content

No source excerpt is available for this finding.

Environment overrides bypass the promised ListClusters-only execution guard.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The guards inspect user arguments and the requested operation, but not the environment values used to build the actual executable and argument list. Consequently, an environment-controlling attacker can bypass the promised read-only execution boundary even though build_command itself always contains ListClusters.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/list_cce.py (reported line 295)May include surrounding context.

python
def _env_credential(markers):
    for key, value in os.environ.items():
        upper = key.upper()
        if not upper.startswith(("HUAWEI", "HW_", "HWC")):
            continue

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/list_cce.py (reported line 305)May include surrounding context.

python
def _env_project_id():
    for key, value in os.environ.items():
        upper = key.upper()
        if upper.startswith(("HUAWEI", "HW_", "HWC")) and "PROJECT_ID" in upper and value:
            return value

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/test_list_cce.py (reported line 320)May include surrounding context.

python
ListClustersRequest(no_such_param=1)

    def test_sdk_fallback_missing_env_credentials_raises_config(self):
        env = {k: v for k, v in os.environ.items()
               if not k.upper().startswith(("HUAWEI", "HW_", "HWC"))}
        with mock.patch.dict(os.environ, env, clear=True):
            with self.assertRaises(ConfigError) as ctx:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/test_list_cce.py (reported line 366)May include surrounding context.

python
[_FakeCluster(CLUSTER_1), _FakeCluster(CLUSTER_2)])
        captured["client"] = fake_client

        env = {k: v for k, v in os.environ.items()
               if not k.upper().startswith(("HUAWEI", "HW_", "HWC"))}
        env.update({"HUAWEI_ACCESS_KEY": "test-ak",
                    "HUAWEI_SECRET_KEY": "test-sk",

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The guide mandates telemetry collection through skill-quality-cli, a capability unrelated to the declared CCE cluster-listing purpose.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The guide mandates a telemetry-collecting intermediary for authenticated cloud commands, introducing a reporting purpose beyond cluster inventory without specifying collected fields, destinations, or retention. This creates a privacy and trust-boundary risk if command metadata or inventory output is reported, although the supplied source does not establish the wrapper's actual payload or prove credential exfiltration.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/list_cce.py (reported line 216)May include surrounding context.

python
cmd.extend(extra)
    cmd.extend(argv)
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=120, universal_newlines=True,
        )

Tainted flow: 'cmd' from os.environ.get (line 210, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
97% confidence
Finding

CCE_LIST_HCLOUD_BIN selects an arbitrary executable and CCE_LIST_HCLOUD_ARGS supplies unchecked leading arguments to subprocess.run. An attacker who can influence these environment values can cause unintended program execution with inherited credentials; no shell-metacharacter injection is required.

Content

Scanner excerpt · scripts/list_cce.py (reported line 216)May include surrounding context.

python
cmd.extend(extra)
    cmd.extend(argv)
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=120, universal_newlines=True,
        )

The skill prescribes Chinese-language diagnostic messages without offering a language choice or documenting a locale requirement.

Low
Category
Output Handling
Confidence
90% confidence
Finding

The error-handling workflow explicitly specifies Chinese output for empty results, permission failures, and CLI usage errors. These are prescribed user-facing messages rather than incidental Chinese documentation, and the skill provides neither language opt-in nor a justified locale constraint.

Content

No source excerpt is available for this finding.

Acceptance criteria require Chinese-language user-facing messages without a language choice or documented locale justification.

Low
Category
Output Handling
Confidence
90% confidence
Finding

The empty-list and permission-error criteria prescribe specific Chinese messages as required output. No user opt-in, locale selection, or justification for requiring Chinese is provided in this file.

Content

No source excerpt is available for this finding.

Credential errors are prescribed in Chinese without a user language choice.

Low
Category
Output Handling
Confidence
85% confidence
Finding

The guide specifies the Chinese message 缺少 AK/SK 凭证 for credential failures without conditioning it on the user's language preference. No language opt-in or justification for this fixed localization is provided.

Content

No source excerpt is available for this finding.

The advertised full-field table silently discards fields from the API response.

Low
Category
Excessive Agency
Confidence
100% confidence
Finding

The manifest promises a default table containing every returned field, but normalize_cluster constructs a fixed dictionary of twelve selected fields and discards everything else. The table renderer only sees those normalized dictionaries, so its union-of-fields logic cannot recover omitted metadata, specification, status, or top-level fields.

Content

No source excerpt is available for this finding.