Back to skill

Security audit

Huawei Cloud Cce Cost Optimization Advisor

Security checks for vulnerabilities and agentic risk

Overview

The skill is presented as a mostly read-only cost advisor, but its packaged CLI exposes under-documented commands that can read Kubernetes secrets and change or delete cloud resources.

Review before installing. Use only tightly scoped read-only Huawei IAM credentials and Kubernetes RBAC that denies secrets and write operations, and do not provide administrator credentials. The package should be reduced to a cost-advisor allowlist before production use; treat confirm=true as capable of real infrastructure changes.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/huawei_cloud/cce.py:3313
Finding

Cluster-Wide Kubernetes Secret Disclosure Through the Public CLI

Content
View full analysis
Dict[str, Any]: return cce.list_cce_secrets( params["region"], params["cluster_id"], params.get("namespace"), _to_int(params.get("limit"), 100), params.get("include_data", "false").lower() == "true", params.get("ak"), params.get("sk"), params.get("project_id") ) ``` ```python # scripts/huawei_cloud/dispatcher.py:1514 "huawei_list_cce_secrets": ( ("region", "cluster_id"), _list_cce_secrets ), ``` ```python # scripts/huawei_cloud/cce.py:3398-3423 core_v1 = k8s_client.CoreV1Api() if namespace: secrets = core_v1.list_namespaced_secret(namespace, limit=limit) else: secrets = core_v1.list_secret_for_all_namespaces(limit=limit) secret_list = [] for secret in secrets.items: secret_info = { "name": secret.metadata.name, "namespace": secret.metadata.namespace, "type": secret.type, "created": str(secret.metadata.creation_timestamp) if secret.metadata.creation_timestamp else None, "labels": secret.metadata.labels, "annotations": secret.metadata.annotations, "data_keys": list(secret.data.keys()) if secret.data else [] } if include_data and secret.data: secret_info["data"] = secret.data secret_list.append(secret_info) ``` ### Technical Analysis The Skill declares a cost-optimization purpose centered on CCE inventory, utilization metrics, HPA analysis, and configuration recommendations. Reading Kubernetes Secret values is not required for those functions. The CLI nevertheless exposes `huawei_list_cce_secrets`. If the caller ...[truncated 2014 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/huawei_cloud/dispatcher.py:1443
Finding

Cost-Advisor Entry Point Exposes Unrelated Destructive Cloud Administration Actions

Content
View full analysis
Optional[Dict[str, Any]]: try: script_dir = os.path.dirname(os.path.abspath(__file__)) if script_dir not in sys.path: sys.path.insert(0, script_dir) from huawei_cloud.dispatcher import dispatch_action, is_registered_action except Exception as exc: return { "success": False, "error": "Modular dispatcher unavailable", "error_type": type(exc).__name__, } if not is_registered_action(action): return None return dispatch_action(action, params) ``` ```python # scripts/huawei_cloud/dispatcher.py:1468-1500 "huawei_create_cce_cluster": ( ("region", "cluster_name", "vpc_id", "subnet_id"), _create_cce_cluster ), "huawei_delete_cce_cluster": ( ("region", "cluster_id"), _delete_cce_cluster ), "huawei_delete_cce_node": ( ("region", "cluster_id", "node_id"), _delete_cce_node ), "huawei_resize_cce_nodepool": ( ("region", "cluster_id", "nodepool_id", "node_count"), _resize_cce_nodepool ), "huawei_create_cce_nodepool": ( ( "region", "cluster_id", "nodepool_name", "flavor", "availability_zone", "root_volume_size", "root_volume_type" ), _create_cce_nodepool ), "huawei_delete_cce_nodepool": ( ("region", "cluster_id", "nodepool_id"), _delete_cce_nodep ...[truncated 2719 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/huawei_cloud/cce.py:3360
Finding

Disabled TLS Verification and Unsafe Temporary Kubernetes Credential Files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (446)

Description-Behavior Mismatch

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

This module exposes remote state-changing operations including create, update, enable/disable, and delete actions for AOM alarm and action rules, directly contradicting the skill’s declared read-only scope. In an agent context, this is dangerous because users or higher-level orchestration may trust the manifest and invoke the skill expecting analysis only, while the code can alter monitoring coverage or remove controls in the target cloud account.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file implements numerous mutating and destructive capabilities—cluster deletion, node deletion, workload scaling/resizing, workload deletion, drain/cordon, hibernate/awake, and EIP binding—despite the skill being advertised as a read-only cost optimization advisor. This creates a dangerous scope mismatch: users or higher-level agents may invoke powerful state-changing operations under the assumption that the skill is analysis-only.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill can enumerate Kubernetes Secrets and, when include_data=true, return secret contents directly to the caller. That is highly sensitive credential-access behavior and is not justified by a cost optimization use case, making the mismatch especially dangerous because users may invoke the skill under a benign pretext while exposing credentials, tokens, or keys.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL-CN.md (reported line 1)May include surrounding context.

md
---
name: cost-optimization-advisor
description: Use this skill for Huawei Cloud CCE cost optimization analysis, including idle resources, oversized CPU or memory requests, low-utilization nodes, 24-hour and 7-day utilization trends, HPA recommendations, and node autoscaler policy optimization.
---

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authentication via username/password or AK/SK plus security-group inspection indicates broader cloud-account and network-security access than a cost advisor should require. This enlarges the consequences of credential misuse and violates least privilege in a sensitive cloud context.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal, suspicious.insecure_tls_verification

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/huawei_cloud/cce_nodepool.py:456

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/huawei_cloud/network.py:781

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/huawei_cloud/storage.py:416