Back to skill

Security audit

huawei-cloud-asm-fuzzy-list

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed, read-only Huawei Cloud ASM mesh listing helper, with ordinary credential and dependency handling risks users should manage.

Install only in an environment where making read-only Huawei Cloud ASM API calls is acceptable. Use least-privilege credentials limited to asm:mesh:list, avoid pasting AK/SK into chats or files, and prefer a pinned or internally mirrored huaweicloudsdkasm package before running the live test script.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:74
Finding

Unpinned Huawei Cloud SDK Dependency Creates Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:74-78, SKILL.md:101-106, references/cli-installation-guide.md:8-12
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

SKILL.md:74-78:

bash
1. **Python 3.8+** with the Huawei Cloud Python SDK installed:

   ```bash
   pip3 install huaweicloudsdkasm
   ```

SKILL.md:101-106:

markdown
6. **Handle errors** — If the call fails:
   - **Region not supported** (`region_id ... is not in the following supported
     regions`): the ASM service only supports `cn-north-4` — use that region.
   - **Credentials/permissions** (`APIGW.0802 forbidden` or a 403): the account
     lacks permission — verify the IAM policy grants the mesh list action.
   - **SDK not installed**: `pip3 install huaweicloudsdkasm`.

references/cli-installation-guide.md:8-12:

markdown
## Install the Huawei Cloud Python SDK for ASM

```bash
pip3 install huaweicloudsdkasm
text

### Technical Analysis

The installation instructions retrieve the latest available version of `huaweicloudsdkasm` from pip's configured package index without an exact version constraint, integrity hash, lock file, or explicitly trusted index.

Consequently, the package installed at execution time may differ from the package that was reviewed. If the package publisher account, distribution infrastructure, or configured package index is compromised, a malicious newer release could be selected automatically. The Skill subsequently imports the installed package while Huawei Cloud access and secret keys are present in environment variables. Python package initialization code can execute during import and can access those credentials, local files available to the runtime user, and network resources.

The static pre-scan's separate sensitive-network pattern is not itself evidence of malicious exfiltration. The reviewed commands use AK/SK cred
...[truncated 2107 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the Huawei Cloud SDK to a specifically reviewed release:

    bash
    python3 -m pip install "huaweicloudsdkasm==<reviewed-version>"
    
  2. Record cryptographic hashes in a requirements file and require hash verification:

    text
    huaweicloudsdkasm==<reviewed-version> --hash=sha256:<verified-hash>
    

    Install it with:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Pin and hash transitive dependencies as well, using a generated lock file from a controlled build process.

  4. Explicitly use an approved package index or internal artifact mirror rather than inheriting arbitrary user-level pip index configuration.

  5. Install the SDK in a dedicated virtual environment and run the Skill as a non-privileged OS user.

  6. Continue enforcing the documented least-privilege IAM policy so that compromised credentials cannot perform operations beyond ASM mesh listing.

  7. Establish a dependency-update process that reviews release notes, verifies package provenance and hashes, runs security checks, and updates the pinned version deliberately.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
81% confidence
Finding

The skill includes executable examples that read cloud credentials from environment variables and invoke an external SDK/API, but it declares no explicit tool scope such as allowed-tools or permissions. In an agent environment, missing scope metadata can lead to over-broad access assumptions and make it harder to enforce that the skill is limited to environment access and outbound read-only network calls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The markdown states that the ASM service currently supports only cn-north-4 and later instructs users to default to that region. Because SQP-3 covers natural-language language/locale policy violations, this is the only potentially applicable policy issue, but the documentation does not clearly present the skill itself as a region-specific compliance or China-region-only tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The markdown includes commands that check for and later use HUAWEICLOUD_SDK_AK and HUAWEICLOUD_SDK_SK, which are sensitive credentials. While the file explains functional behavior, it does not warn users that the procedure requires exposing cloud access keys in the shell environment or advise careful handling of those credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This shell script executes live Huawei Cloud ASM list operations in tests using access key and secret key from environment variables. Although the script checks for credentials and prints test names, it does not clearly disclose that running the tests will contact a real cloud service and use configured credentials.

Content

No source excerpt is available for this finding.