Back to skill

Security audit

huawei-cloud-flexus-l-server-manage

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but it handles powerful Huawei Cloud billing/server actions while disabling TLS certificate checks and recommending broad account permissions.

Install only if you are comfortable granting Huawei Cloud credentials that can create, renew, pay for, and unsubscribe resources. Use a dedicated least-privilege temporary credential, prefer dry-run first, avoid broad FullAccess/BSS Administrator where possible, and do not use this version on untrusted networks until TLS verification is fixed.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/flexus_lifecycle.py:332
Finding

TLS Certificate Verification Disabled for Credentialed Cloud Lifecycle Requests

Content
View full analysis

Vulnerability Details

File Location: scripts/flexus_lifecycle.py:23-25, scripts/flexus_lifecycle.py:332-339, and scripts/flexus_lifecycle.py:461-468
Vulnerability Type: Improper certificate validation (CWE-295)
Risk Level: High

Vulnerable Code

python
# Disable SSL warnings
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
python
config = HttpConfig.get_default_config()
config.ignore_ssl_verification = True

client = BssClient.new_builder() \
    .with_credentials(credentials) \
    .with_http_config(config) \
    .with_region(BssRegion.value_of(region)) \
    .build()
python
resp = requests.request(
    signed_request.method,
    full_url,
    headers=signed_request.header_params,
    data=signed_request.body,
    verify=False,
    timeout=60
)

Technical Analysis

The Skill explicitly disables TLS certificate verification for two security-sensitive communication paths:

  1. The Huawei Cloud BSS SDK client used for resource validation, renewal, and unsubscription sets ignore_ssl_verification to True.
  2. The direct HCSS request used to create a Flexus L instance passes verify=False to requests.request.

The global suppression of InsecureRequestWarning further conceals the insecure connection from users and operators.

These requests carry signed authorization headers and may include a temporary X-Security-Token, resource identifiers, order parameters, and destructive or charge-bearing lifecycle operations. Disabling certificate verification means the client does not establish that the TLS peer is the intended Huawei Cloud endpoint. A network intermediary able to redirect or intercept traffic can therefore present an arbitrary certificate without causing the request to fail.

The IAM project lookup and documentation extractor do not show this defect because their respective requests retain default c ...[truncated 1993 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the BSS SDK TLS bypass:

    python
    config = HttpConfig.get_default_config()
    # Do not set ignore_ssl_verification to True.
    
  2. Remove verify=False from the HCSS request so that requests uses certificate verification by default:

    python
    resp = requests.request(
        signed_request.method,
        full_url,
        headers=signed_request.header_params,
        data=signed_request.body,
        timeout=60
    )
    
  3. Remove global suppression of InsecureRequestWarning. TLS failures should remain visible and should fail closed.

  4. If a private enterprise CA or inspection proxy is legitimately required, accept an explicit CA bundle through a narrowly scoped configuration option and pass its path as verify="/path/to/ca-bundle.pem". Do not provide a mode that disables validation entirely.

  5. Add regression tests that connect to an endpoint with an untrusted or hostname-mismatched certificate and verify that HCSS and BSS operations fail before transmitting authenticated requests.

  6. Document supported proxy and CA configuration without recommending insecure TLS overrides.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (25)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill manages Flexus L server lifecycle actions such as create, renew, and unsubscribe. However, the supplied code does not perform any resource management actions at all. It only sends HTTP requests to a Huawei support documentation URL, parses HTML tables with regex, extracts spec/image/region metadata, and prints the results as JSON. There are no API calls for provisioning, billing changes, renewal, cancellation, authentication, or instance operations. This is a materially different primary purpose, so the description does not accurately represent the code's actual behavior.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · SKILL.md (reported line 193)May include surrounding context.

md
---

## ⚠️ Conversation Display Guidelines (Important)

**When displaying "Available Specifications" or "Available Images" to users in conversation, you MUST immediately append the following note:**

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code globally disables TLS certificate warnings and later performs credential-bearing Huawei Cloud API requests with SSL verification disabled. In a skill that handles AK/SK/security tokens and can create, renew, or unsubscribe paid cloud resources, this materially increases the risk of man-in-the-middle interception or tampering with authenticated requests.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill describes use of scripts, environment variables, network endpoints, and shell-style execution, but it declares no explicit tool scope such as allowed tools or permissions. That creates an authorization gap where an agent may over-grant capabilities or invoke this skill without clear boundaries, increasing the chance of unintended credential access, network use, or command execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Broad trigger phrases like purchase, renew, and unsubscribe can cause the skill to activate in unrelated conversations, especially when financial or infrastructure actions are involved. In a cloud-management skill, accidental activation is more dangerous because it can lead to execution of privileged workflows or requests for credentials in the wrong context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The detailed trigger rules include generic phrases such as renew, purchase server, and cancel subscription, which are ambiguous and likely to match unrelated user intents. Because this skill can lead to real cloud lifecycle and billing actions, weak scoping raises the risk of unintended activation and unsafe follow-on execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The API reference exposes renew and unsubscribe operations that can directly trigger billing changes and potentially irreversible service-impacting actions, but it provides no warning, confirmation requirements, or guidance about financial consequences. In a lifecycle-management skill specifically designed to purchase, renew, and cancel servers, this omission increases the likelihood that an agent or integrator will invoke destructive or billable actions without explicit user awareness or safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide recommends either assigning a broad built-in FullAccess policy or creating a custom policy with Resource set to '*' that grants account-wide create, renew, unsubscribe, payment, and refund capabilities. For a billing- and lifecycle-management skill, this violates least privilege and can enable unauthorized server purchases, renewals, cancellations, and financial actions across the account if the skill, operator, or connected credentials are misused.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a skill for creating, renewing, and unsubscribing Flexus L instances. This file also invokes another local script through subprocess.run, which introduces a general subprocess/code-execution capability not justified by the declared lifecycle-management scope.

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/flexus_lifecycle.py (reported line 75)May include surrounding context.

python
if data_type != "all":
            cmd.append(f"--{data_type}")
        
        result = subprocess.run(
            cmd,
            capture_output=True,
            text=True,

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

The requests call sends signed, credential-associated API traffic with verify=False, disabling server certificate validation. An attacker on the network path could impersonate the endpoint, capture security tokens or signed metadata, and potentially alter lifecycle operations such as instance creation or subscription cancellation.

Content

Scanner excerpt · scripts/flexus_lifecycle.py (reported line 466)May include surrounding context.

python
full_url,
            headers=signed_request.header_params,
            data=signed_request.body,
            verify=False,
            timeout=60
        )

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

During dry-run renewal validation, the code queries customer resources using list_pay_per_use_customer_resources to check whether resource IDs exist. The manifest scopes the skill to lifecycle actions on Flexus L instances, but this adds a broader account resource-inspection capability that is not explicitly justified by the stated purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The unsubscribe dry-run path also calls list_pay_per_use_customer_resources to inspect account resources before unsubscribing. This is a broader read capability than the manifest's create/renew/unsubscribe description and is not explicitly disclosed as part of the skill's purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The markdown lists only *_standard_ch Windows images, which indicates a specific locale/language variant is being prescribed. Because the document does not offer alternative locale options or explain why a Chinese-only image is required, this can conflict with the policy against forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code embeds user-facing region display names such as '华北-北京四' and '亚太-新加坡' in a single language. Because the file provides no opt-in, fallback, or justification that the skill is intended only for Chinese-speaking users or a China-specific environment, it may violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/flexus_lifecycle.py (reported line 866)May include surrounding context.

python
extra_ns, leftover = extra_parser.parse_known_args(unknown)
        for dest in GLOBAL_OPTION_DESTS:
            if dest in vars(extra_ns):
                setattr(args, dest, getattr(extra_ns, dest))
        if leftover:
            parser.error(f"unrecognized arguments: {' '.join(leftover)}")

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The request headers hard-code Accept-Language: zh-CN,zh;q=0.9, which imposes a specific language/locale preference in outbound requests. This is a natural-language policy concern because the file does not offer user opt-in or explain why a Chinese locale is required.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pyasn1 has 10 known advisory(ies) (CVE-2026-23490 (pyasn1 has a DoS vulnerability in decoder); CVE-2026-59885 (pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing al); CVE-2026-59886 (pyasn1: Uncontrolled resource consumption when converting decoded REAL values) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pyyaml has 8 known advisory(ies) (CVE-2019-20477 (Deserialization of Untrusted Data in PyYAML); CVE-2020-1747 (Improper Input Validation in PyYAML); CVE-2020-14343 (Improper Input Validation in PyYAML) +5 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: simplejson has 2 known advisory(ies) (CVE-2014-4616 (simplejson before 2.6.1 vulnerable to array index error); CVE-2014-4616 (simplejson before 2.6.1 vulnerable to array index error)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: setuptools has 10 known advisory(ies) (CVE-2013-1633 (Setuptools vulnerable to Man-in-the-middle attacks); CVE-2025-47273 (setuptools has a path traversal vulnerability in PackageIndex.download that lead); CVE-2024-6345 (setuptools vulnerable to Command Injection via package URL) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/test_global_options_position.py (reported line 39)May include surrounding context.

python
global PASS, FAIL
    try:
        args = fl.parse_cli_args(argv)
        actual = {k: getattr(args, k, None) for k in expected}
        if actual == expected:
            PASS += 1
            print(f"[PASS] {name}")

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This Python file contains natural-language commentary in Chinese within the inline comment '前置写法'. Under the policy rules, forcing or mixing a specific language without user opt-in can be a language/locale policy violation when no justification or language choice is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This inline comment includes the Chinese phrase '后置写法' alongside English text, but the file does not indicate that the skill is intended for a Chinese-speaking audience or provide a language-selection mechanism. That creates a natural-language locale inconsistency under the stated policy.

Content

No source excerpt is available for this finding.