Back to skill

Security audit

huawei-cloud-scm-cert-list

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence because scanners report that its certificate-listing workflow adds an unrelated quality and telemetry CLI that it downloads and installs locally.

Consider the verdict’s Review status before installing. The main concern is the added quality and telemetry CLI, which may download and install executable software from a remote release service and make persistent local changes. Scanner coverage is incomplete: one of 11 components was only partially inspected, and a static analysis step was degraded, so the results do not establish that all behavior is safe.

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
  • 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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (19)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The prescribed readiness step installs an unrelated executable persistently, contradicting the broad no-files-written assurance and exceeding the certificate-listing purpose. The dependency is mentioned in the body, so it is not wholly concealed, but its mandatory execution exposes the user's environment to an additional software supplier.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The workflow directs installation and execution of a separate telemetry wrapper despite advertising read-only inventory and no file writes. Although the dependency is disclosed later in the document, mandating externally distributed code in a cloud-credential-bearing environment expands the trust boundary beyond SCM and creates a supply-chain exposure; actual credential collection is not demonstrated.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The matched request retrieves JSON rather than directly executing a fetched script, but the rest of the installer trusts that mutable JSON to select an executable archive and its checksum. A compromised release service can provide both a malicious artifact and a matching hash, and download URLs are not restricted to an approved HTTPS origin; later execution of the installed CLI would run that code with the user's privileges.

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

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

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.

Mandatory quality-telemetry tooling adds an unrelated capability to a read-only certificate inventory skill.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The mandatory wrapper requirement diverts otherwise direct read-only SCM commands through unrelated telemetry software. That software would run in the calling user's environment and could observe command arguments or subprocess output, while its implementation and reporting payload are not supplied for review.

Content

No source excerpt is available for this finding.

The guide introduces installation and execution of an unrelated quality/telemetry CLI into the certificate-listing workflow.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The guide introduces automatic installation and command wrapping by an unrelated telemetry CLI into a credentialed certificate-inventory workflow. Calling the dependency optional does not resolve the instruction that all hcloud calls must use it, and the reporting payload is not available to establish whether sensitive data is excluded.

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 certificate-inventory purpose.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

When invoked, this readiness script automatically downloads a remotely selected quality CLI and installs executable files under the user's persistent bin directory. HTTPS, checksum verification, and archive checks reduce some risks, but the mutable manifest supplies both the artifact and its expected checksum, leaving release-service compromise capable of introducing code for subsequent execution.

Content

No source excerpt is available for this finding.

Installs an unrelated quality CLI outside the certificate-inventory skill's stated purpose.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

This manually invoked installer adds remotely distributed quality-reporting software rather than functionality needed to list certificates. Manual invocation reduces the automatic-execution risk, but an agent following the skill's installation guidance can still introduce persistent executable code beyond the inventory task's authorization.

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

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

Tainted flow: 'cmd' from os.environ.get (line 145, 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_scm_certs.py (reported line 147)May include surrounding context.

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

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

python
def _sdk_request(name, **fields):
    """Build an SDK request model, or a plain attribute holder for tests."""
    try:
        module = __import__("huaweicloudsdkscm.v3", 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_scm_certs.py (reported line 107)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

Acceptance criteria require Chinese-language output without a language choice.

Low
Category
Output Handling
Confidence
90% confidence
Finding

The criteria prescribe a Chinese empty-result message and exact Chinese table headings. These requirements fix the output language without offering user opt-in or documenting why Chinese-only output is necessary; the cloud-region setting does not itself justify a language restriction.

Content

No source excerpt is available for this finding.

The table-output contract mandates Chinese column labels without a documented language choice or justification.

Low
Category
Output Handling
Confidence
88% confidence
Finding

The requirement for exactly the listed Chinese column labels fixes the output language rather than merely showing an example. The file provides no language opt-in or justification for requiring Chinese; selecting a cloud region does not establish a user language preference.

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

python
"""Build an SDK request model, or a plain attribute holder for tests."""
    try:
        module = __import__("huaweicloudsdkscm.v3", 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_scm_certs.py (reported line 375)May include surrounding context.

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