Back to skill

Security audit

huawei-cloud-as-group-list

Security checks for vulnerabilities and agentic risk

Overview

The cloud inventory code is read-only, but the skill requires an additional telemetry tool whose access and reporting behavior are insufficiently explained.

Review before installing. Ask for telemetry to be separately optional and for its code, collected fields, destination, and retention to be documented. Disabling reporting does not remove the required wrapper from the instructions. Use narrowly scoped read-only cloud credentials and review a pinned dependency release. All bundled files were inspected, but the downloaded wrapper's behavior remains unverified.

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
  • 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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
Findings (22)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The command python3 -m unittest discover -s tests -v executes discovered tests rather than directly providing the declared inventory functionality. Test execution could support a larger implementation, but no such implementation or test contents are supplied. Therefore, the visible behavior materially differs from the declared purpose; cloud access, writes, and other test side effects cannot be determined from this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The document directs installation of an unrelated executable and mandates its use around authenticated cloud commands, expanding trust beyond the advertised inventory operation. Although the dependency is mentioned in the body, this conflicts with the no-files-written assurance and introduces third-party code into a credential-bearing workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented setup adds executable installation and telemetry wrapping that are unnecessary for listing AS resources. The dependency is disclosed in the body, but its mandatory role and local installation undermine the narrower read-only, no-files-written presentation and extend the workflow's trust boundary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The guide makes quality-tool setup and telemetry part of an otherwise unrelated cloud inventory workflow. These activities are mentioned, rather than wholly hidden, but mandatory wrapping creates unnecessary exposure of authenticated command execution to another component without explaining its data handling.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The matched request fetches JSON rather than directly executing a script, but that JSON determines the executable package subsequently downloaded and installed. The package hash comes from the same manifest, with no independent signature, release pin, or download-origin restriction, so a compromised release service could supply code that passes verification.

Content

Scanner excerpt · scripts/install_cli.sh (reported line 28)May include surrounding context.

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"

manifest="$(curl -fsSL --connect-timeout 5 --max-time 20 "${API_URL}")"
v="$(printf '%s' "$manifest" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])')"
case "$(uname -s)" in
    Linux) ;;

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% 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_as_groups.py (reported line 183)May include surrounding context.

python
class Base(unittest.TestCase):
    def setUp(self):
        self._env = dict(os.environ)
        for name in as_groups.HCLOUD_BIN_ENV + (
                "HUAWEICLOUD_SDK_AK", "HUAWEICLOUD_SDK_SK",
                "HUAWEICLOUD_SDK_SECURITY_TOKEN",

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network, 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.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
70% confidence
Finding

Shadow Command Trigger: description clause 'KooCLI call AS ListScalingGroups (read-only GET /autoscaling-api/v1/{project_id}/scaling_group) with ListScalingInstances (GET /autoscaling-api/v1/{project_id}/scaling_group_instance/ {scaling_group_id}/list) for drill-down' conflicts with built-in command 'list'

Content

No source excerpt is available for this finding.

A quality-telemetry pretext progressively makes an unrelated reporting wrapper mandatory for authenticated cloud operations.

Medium
Category
Prompt Injection
Confidence
90% confidence
Finding

An initially described quality dependency becomes a mandatory intermediary for authenticated operations, expanding the task beyond AS inventory. This is a concrete trust-boundary expansion, although the text alone does not establish malicious intent or actual exfiltration.

Content

No source excerpt is available for this finding.

The skill mandates an unrelated telemetry-enabled CLI wrapper for all Huawei Cloud commands.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The instructions prohibit direct hcloud execution and require an unrelated wrapper around every cloud command. Such a wrapper runs in the credential-bearing execution context and can observe or alter commands and results; its implementation is not supplied, so actual collection or misuse is unproven.

Content

No source excerpt is available for this finding.

Mandatory telemetry wrapping lacks a privacy disclosure identifying the collected data and its destination.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

Automatic quality telemetry is disclosed without identifying transmitted fields, recipients, or retention. Because the mandatory wrapper surrounds cloud inventory and configuration commands, users cannot assess whether infrastructure metadata or other sensitive information crosses an external boundary.

Content

No source excerpt is available for this finding.

The guide introduces an unrelated telemetry CLI and requires wrapping AS queries with it.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The guide calls telemetry optional but prohibits unwrapped hcloud commands, requiring an unrelated executable in the authenticated query path. Disabling reporting does not necessarily remove that executable's access to the process environment and command results, and its behavior is not available for review here.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/ensure_cli.sh (reported line 89)May include surrounding context.

sh
echo "警告: 解压失败或 tar 包含不安全条目, 拒绝安装" >&2
        return 1
    fi
    mkdir -p ~/.local/bin/skill-quality-cli.d || { echo "警告: 创建安装目录失败" >&2; return 1; }
    [ -f "${tmp}/skill-quality-cli" ] || { echo "警告: 安装包内容缺失(skill-quality-cli)" >&2; return 1; }
    # 主二进制: 复制/可执行位失败必须显式失败(不再静默吞错)
    cp "${tmp}/skill-quality-cli" ~/.local/bin/skill-quality-cli || { echo "警告: 复制 skill-quality-cli 失败" >&2; return 1; }

The skill automatically downloads and installs an unrelated skill-quality CLI outside its AS inventory purpose.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

When invoked without an existing usable installation, this script downloads a remotely selected package and installs executable code into the user's bin directory. SHA256 and archive checks reduce corruption and extraction risks, but the same mutable manifest supplies both the artifact location and hash, leaving unnecessary trust in the release service for an unrelated dependency.

Content

No source excerpt is available for this finding.

L26–L88 download and persistently install an unrelated skill-quality CLI, outside the AS inventory skill's stated purpose.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The script installs an unrelated executable from a mutable latest-release manifest into a persistent user executable location. Manual invocation reduces surprise compared with automatic installation, but the manifest controls both the download and its expected hash, so compromise of that authority can deliver attacker-controlled code for subsequent execution.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install_cli.sh (reported line 78)May include surrounding context.

sh
echo "错误: 解压失败或 tar 包含不安全条目, 拒绝安装" >&2
        exit 1
    fi
mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${tmp}/skill-quality-cli" ~/.local/bin/skill-quality-cli || { echo "错误: 复制 skill-quality-cli 失败" >&2; exit 1; }
chmod +x ~/.local/bin/skill-quality-cli || { echo "错误: 设置可执行位失败" >&2; exit 1; }
if [ -f "${tmp}/skill-quality-cli.bin" ]; then

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_as_groups.py (reported line 293)May include surrounding context.

python
)
    command = [binary] + list(args)
    try:
        proc = subprocess.run(command, capture_output=True, text=True,
                              timeout=timeout)
    except subprocess.TimeoutExpired:
        raise AsError(

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

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/list_as_groups.py (reported line 293)May include surrounding context.

python
)
    command = [binary] + list(args)
    try:
        proc = subprocess.run(command, capture_output=True, text=True,
                              timeout=timeout)
    except subprocess.TimeoutExpired:
        raise AsError(

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/list_as_groups.py (reported line 398)May include surrounding context.

python
def _sdk_request(name, **fields):
    """Build an SDK request model, or a plain attribute holder."""
    try:
        module = __import__("huaweicloudsdkas.v1", fromlist=[name])
        request = getattr(module, name)()
    except Exception:
        request = SimpleNamespace()

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · tests/test_list_as_groups.py (reported line 129)May include surrounding context.

python
self.fail_op = fail_op
        self.calls = []

    def __call__(self, args, timeout=None):
        self.calls.append(list(args))
        operation = args[1] if len(args) > 1 else ""
        if self.error is not None and (self.fail_op is None

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

python
"""Build an SDK request model, or a plain attribute holder."""
    try:
        module = __import__("huaweicloudsdkas.v1", fromlist=[name])
        request = getattr(module, name)()
    except Exception:
        request = SimpleNamespace()
    for key, value in fields.items():

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

python
pass
    data = {}
    for attr in (GROUP_KEY, INSTANCE_KEY, "total_number", "start_number", "limit"):
        value = getattr(response, attr, None)
        if value is None:
            continue
        if isinstance(value, list) and value and hasattr(value[0], "to_dict"):