Back to skill

Security audit

huawei-cloud-computing-query

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence because it reports exposed cloud password-retrieval features, insecure TLS and package installation settings, and unnecessary access to IAM user data; some analysis was incomplete.

Consider avoiding installation unless you need this skill and can accept these risks. Before using it with cloud credentials, review the password-retrieval and IAM user-listing operations, verify that TLS checks and package-mirror authentication are enabled, pin dependencies, and complete review of the two partially analyzed setup scripts. The scan is incomplete and does not establish malicious intent or an actual compromise.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/config.py
Finding

TLS verification is unconditionally disabled for authenticated cloud API requests

Content
View full analysis

Impact

An active interceptor can read private resource responses, observe request authentication material including a temporary security token when used, and forge inventory or resource-detail results presented to the user. This does not establish disclosure of the secret signing key.

T08 · Insecure Dependencies

Error
Location
scripts/ensure_env.py
Finding

Dependency installation disables authentication of package mirrors

Content
View full analysis

Impact

A substituted SDK package can execute arbitrary code as the current user. The environment check requires cloud credentials before reaching installation, so malicious package code also has access to those inherited environment variables.

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (50)

Tainted flow: 'remaining_budget()' from os.getenv (line 65, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/ensure_env.py (reported line 471)May include surrounding context.

python
break
        try:
            req = urllib.request.Request(url, method="HEAD")
            resp = urllib.request.urlopen(req, timeout=max(1, min(5, int(remaining_budget()))))
            if resp.status == 200:
                print(f"  可用镜像:{url}", flush=True)
                return url

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The reported Windows password-retrieval capability crosses a sensitive-data boundary not communicated by the top-level inventory description. Calling an API read-only does not make credential material safe for ordinary query output, although actual exposure depends on IAM permissions and whether the returned password is encrypted.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The reported ShowServerPasswordRequest retrieves credential material beyond the ordinary instance inventory advertised in the description. This creates a risk of sensitive password data entering agent responses or logs, though the implementation is not supplied and the API may return encrypted rather than immediately usable passwords.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The reported ListUsersV5Request accesses an identity directory rather than computing-resource inventory. Unlike the documented IAM project lookup, user enumeration is unnecessary for the stated workflow and could expose account information under permissions granted to the execution identity; the implementation and invocation conditions are not included here.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
bash scripts/check_env.sh

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
powershell -ExecutionPolicy Bypass -File scripts/check_env.ps1

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 · scripts/ensure_env.py (reported line 246)May include surrounding context.

python
if os.getenv("HW_ENV_REEXEC_GUARD") == "1":
        return False
    print(f"  使用虚拟环境 Python: {venv_python}", flush=True)
    env = dict(os.environ, HW_ENV_REEXEC_GUARD="1", PYTHONUNBUFFERED="1")
    sys.stdout.flush()
    sys.stderr.flush()
    rc = subprocess.run(

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

Response criteria require Chinese-language output without user opt-in.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The criteria mandate Chinese summary text and require error messages to provide Chinese guidance. No user language choice or justification for this language restriction is given.

Content

No source excerpt is available for this finding.

The BMS guide exposes initial Windows password retrieval, which is outside the stated resource-query purpose.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

The guide explicitly exposes Windows initial-password retrieval through the same interface used for ordinary inventory queries, and its generic show-output rules provide no secret-handling exception. This risks placing credential material in agent output or logs; exploitability depends on cloud permissions and whether the returned password remains encrypted.

Content

No source excerpt is available for this finding.

The module promises an actual ECS availability check that the execution flow never performs.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The module documentation explicitly says readiness includes a real ECS API call to verify project-level service availability. The execution flow only checks SDK imports, calls IAM for credential validation, and optionally resolves a project through IAM, yet reports that all checks passed; it never establishes ECS access or availability.

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

python
env = dict(os.environ, HW_ENV_REEXEC_GUARD="1", PYTHONUNBUFFERED="1")
    sys.stdout.flush()
    sys.stderr.flush()
    rc = subprocess.run(
        [venv_python, os.path.abspath(__file__)] + sys.argv[1:],
        env=env,
    ).returncode

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 · scripts/ensure_env.py (reported line 316)May include surrounding context.

python
# ── 工具函数 ──────────────────────────────────────────────────────────

def run_cmd(cmd, timeout=None, **kwargs):
    """运行命令,返回 (returncode, stdout, stderr)

    Args:

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

python
timeout: 超时秒数,超时后终止子进程并返回失败
    """
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, **kwargs)
        return result.returncode, result.stdout.strip(), result.stderr.strip()
    except subprocess.TimeoutExpired:
        return -1, "", f"命令超时({timeout}s): {' '.join(cmd)}"

Tainted flow: 'timeout' from os.getenv (line 521, 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/ensure_env.py (reported line 324)May include surrounding context.

python
timeout: 超时秒数,超时后终止子进程并返回失败
    """
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, **kwargs)
        return result.returncode, result.stdout.strip(), result.stderr.strip()
    except subprocess.TimeoutExpired:
        return -1, "", f"命令超时({timeout}s): {' '.join(cmd)}"

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

python
core_modules = ["huaweicloudsdkcore", "huaweicloudsdkecs", "huaweicloudsdkiam"]
    for mod in core_modules:
        try:
            __import__(mod)
        except ImportError:
            return False
    return True

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

python
all_ok = True
    for mod in SDK_MODULES:
        try:
            __import__(mod)
            print(f"  {mod} 可导入", flush=True)
        except ImportError:
            print(f"  {mod} 不可导入", flush=True)

Credential validation enumerates IAM users, an unnecessary capability for a computing-resource query skill.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

Routine setup automatically calls an IAM user-listing API, although computing-resource inventory does not require user-directory access. This unnecessarily retrieves identity information and makes setup depend on an unrelated permission, encouraging broader IAM grants; limiting the response to one user reduces exposure but does not remove the least-privilege issue.

Content

No source excerpt is available for this finding.

The BMS inventory skill exposes Windows server initial-password retrieval.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The registry exposes initial-password retrieval within a general computing-inventory skill, without a visible sensitive-operation gate. Read-only access is not necessarily non-sensitive: password material could enter agent output or logs, although cloud IAM still applies and the API may return encrypted rather than plaintext credentials.

Content

No source excerpt is available for this finding.

The query skill exposes server password retrieval, a credential-access capability outside its stated inventory purpose.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

The inventory registry includes server-password retrieval, extending its capabilities from resource inspection to credential access without a visible sensitive-operation gate. If permitted by the supplied cloud credentials, this can expose password material to agent output or logs; IAM authorization and any API-level encryption limit the impact and are not bypassed here.

Content

No source excerpt is available for this finding.

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 · tests/test_list_rendering.py (reported line 163)May include surrounding context.

python
def test_real_sdk_response_fields_match_the_registry_when_sdk_is_installed():
    for (service, op_name), (module_path, class_name) in SDK_RESPONSES.items():
        try:
            module = __import__(module_path, fromlist=[class_name])
        except ImportError:
            continue
        response_class = getattr(module, class_name)

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
70% confidence
Finding

Overly Broad Trigger: '镜像' is too short and may match unintended inputs

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
70% confidence
Finding

Overly Broad Trigger: 'AS' is too short and may match unintended inputs

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
70% confidence
Finding

Overly Broad Trigger: '集群' is too short and may match unintended inputs

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
70% confidence
Finding

Overly Broad Trigger: '节点' is too short and may match unintended inputs

Content

No source excerpt is available for this finding.