Back to skill

Security audit

huawei-cloud-skill-tester

Security checks across malware telemetry and agentic risk

Overview

Review recommended: this is a real Huawei Cloud test runner, but it can run extracted commands with cloud credentials and its write-confirmation/audit behavior is weaker than advertised.

Install only if you intend to run live Huawei Cloud tests. Use an isolated test account/project, least-privilege short-lived credentials, keep ALLOW_WRITES and ALLOW_REAL_E2E unset unless you have reviewed the exact generated cases, prefer --no-siblings unless cross-skill testing is intended, and periodically inspect or delete retained <skill-name>-test-files artifacts.

SkillSpector

By NVIDIA
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill declares powerful capabilities—environment access, file read/write, and shell execution—yet does not declare permissions. That mismatch weakens user and platform visibility into what the skill can actually do, especially because the workflow performs real-environment testing, installs/uninstalls skills, reads credentials from env vars, and writes reports/artifacts.

Intent-Code Divergence

Medium
Confidence
89% confidence
Finding
The Phase 6 schema uses execution-style fields such as step `status` values of `pass|fail|skip` for multi-skill scenarios that the document elsewhere says are only derived plans and not actually executed. This can mislead users, downstream automation, or auditors into treating unexecuted destructive workflows as verified results, creating unsafe operational decisions and false assurance.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The header comment says write operations require per-item user confirmation, but the Phase 4 executor automatically runs write test cases once credentials are present and merely sets user_confirmed=True in metadata. In a cloud-testing skill, this mismatch is dangerous because destructive or billable operations can be executed without explicit consent, violating operator expectations and increasing the chance of unauthorized resource creation, deletion, or charges.

Intent-Code Divergence

Medium
Confidence
89% confidence
Finding
The credential-handling comments correctly prohibit soliciting AK/SK in chat, but the generated phase summary hard-codes execution_meta.user_confirmed to true regardless of whether any user approval actually occurred. This creates a false audit trail that can mislead downstream agents or reviewers into believing sensitive actions were authorized when they were not.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The multi-skill branch explicitly says it may only derive a plan, but the generated result marks the workflow as automatically executed and later records user_confirmed as true. This creates integrity and trust issues in test evidence: downstream systems or operators may wrongly believe real end-to-end validation occurred and make deployment decisions based on fabricated execution status.

Intent-Code Divergence

Low
Confidence
84% confidence
Finding
The file header promises a user-confirmation step, but the implementation hard-codes confirmation state rather than obtaining explicit approval. In a script that can execute real SDK/CLI actions and potentially modify cloud resources, false confirmation weakens safety controls and auditability.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The multi-skill 'full flow' path often produces synthetic placeholder scenarios with steps pre-marked as pass instead of performing the end-to-end testing implied by the skill's purpose. This is dangerous because it can mask missing validation and produce misleading assurance artifacts, causing unsafe promotion of untested skills.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The trigger set includes broad phrases like 'verification', 'e2e', '跑测试', and '回归测试', which can collide with ordinary user intent or other skills. In this context, accidental invocation is more dangerous than usual because the skill can perform filesystem operations, scan sibling skills, and potentially initiate live Huawei Cloud test workflows.

Missing User Warnings

Medium
Confidence
83% confidence
Finding
This section describes real-environment lifecycle testing with create, update, delete, and cleanup behavior but lacks a prominent user-facing warning that live cloud resources, billing, and irreversible changes may occur. In a Huawei Cloud testing skill, that omission is dangerous because operators may enable writes or run phases assuming they are safe validations rather than actions against production-like environments.

Missing User Warnings

Medium
Confidence
83% confidence
Finding
The document states that skill installation copies in the test directory will be uninstalled automatically at pipeline end. In a testing framework that performs real-environment execution and resource lifecycle actions, implicit teardown without prominent warning can cause unexpected loss of test state, interfere with concurrent workflows, or remove artifacts an operator expected to preserve for debugging or audit.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This section documents how to enable write-capable test execution via `ALLOW_WRITES=1` but does not place an immediate, explicit warning that the command may create, modify, or delete live Huawei Cloud resources and incur cost. In a testing framework, operators may assume commands are safe by default; burying the risk in phase descriptions is insufficient when the nearby snippet directly enables destructive behavior.

Missing User Warnings

High
Confidence
98% confidence
Finding
The real E2E instructions explicitly enable live API execution for full-flow scenarios but do not clearly warn that the workflow may perform destructive actions across resource lifecycle steps such as list, create, update, and delete. Because this skill is an end-to-end cloud test orchestrator, the omission is more dangerous than in ordinary documentation: users are being guided to run automation against real environments with credentials.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The one-click full-pipeline example shows running the entire test pipeline with live credentials, including sibling-skill orchestration by default, without an adjacent warning about possible effects on real resources. In this skill's context, that is risky because a convenience command lowers operator scrutiny while broadening scope to multiple skills and potentially multiple resource types.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
This code executes SDK snippets, shell commands, and scripts derived from phase-1 data without any direct confirmation prompt in this file. Because those commands can include write operations and run in a real cloud environment with inherited credentials, an attacker who can influence phase-1 metadata or skill content can trigger unauthorized actions or resource changes.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
Automatic sibling-skill discovery broadens the set of skills included in orchestration without an explicit warning or approval checkpoint. In this context, expanding scope can pull in unreviewed neighboring skills, increasing the attack surface and causing unexpected execution planning or testing against unrelated code/resources.

Ssd 3

Medium
Confidence
91% confidence
Finding
Default sibling auto-scan causes the tester to discover and include other nearby huawei-cloud-* skills in orchestration testing without explicit per-skill consent. Combined with report generation and preserved artifacts, this broadens the data collection surface and can expose metadata, commands, test outputs, and cross-skill relationships from skills the user did not intend to analyze.

Ssd 3

Medium
Confidence
96% confidence
Finding
The skill explicitly preserves all test artifacts across runs and states that Phase 5/6 logs include real CLI/SDK responses for auditability. In a real-cloud testing context, those retained logs may contain resource identifiers, API payloads, operational metadata, and possibly sensitive outputs, creating durable disclosure risk on disk.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
snippet_lines.append('from huaweicloudsdk%s.%s import %s, %s' % (svc, sdk_ver, client_cls, request_class))
    snippet_lines.append('')
    snippet_lines.append('ak, sk = "", ""')
    snippet_lines.append('for k, v in os.environ.items():')
    snippet_lines.append('    u = k.upper()')
    snippet_lines.append("    if not (u.startswith('HUAWEI') or u.startswith('HW') or u.startswith('HWC')): continue")
    snippet_lines.append("    if 'ACCESS_KEY' in u or u.endswith('_AK') or u == 'AK': ak = v or ak")
Confidence
93% confidence
Finding
The generated SDK snippet iterates over all environment variables and auto-selects credentials based on broad name matching. In a testing framework that extracts commands from potentially adversarial SKILL.md content and later executes generated snippets, this expands credential exposure risk and can cause unintended use of unrelated AK/SK values present in the environment.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
client_class = getattr(mod, client_cls_name)
                        from huaweicloudsdkcore.auth.credentials import BasicCredentials, GlobalCredentials
                        ak, sk = '', ''
                        for k, v in os.environ.items():
                            u = k.upper()
                            if not (u.startswith('HUAWEI') or u.startswith('HW') or u.startswith('HWC')): continue
                            if 'ACCESS_KEY' in u or u.endswith('_AK') or u == 'AK': ak = v or ak
Confidence
84% confidence
Finding
The SDK fallback scans all environment variables and heuristically extracts AK/SK from any names matching broad Huawei/HW/HWC patterns. In combination with later execution of dynamic test code and shell commands, this increases exposure of secrets to untrusted code paths and expands the blast radius if crafted test cases can read process environment or trigger credential misuse.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Per-case gate:
  if is_write == false:
    Auto-execute → Record pass/fail
  if is_write == true:
    if env ALLOW_WRITES == "1":
      Auto-execute under AK/SK credentials → Record pass/fail + resource_changes
Confidence
84% confidence
Finding
The skill explicitly authorizes automatic execution of test cases once credentials are discovered, without per-action interactive confirmation for read-only operations. In this context, autonomous execution against a live cloud account increases the chance of unintended data access, rate-limit impact, and environment probing, especially when triggered broadly by an agent.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Auto-execute → Record pass/fail
  if is_write == true:
    if env ALLOW_WRITES == "1":
      Auto-execute under AK/SK credentials → Record pass/fail + resource_changes
      entry.execution_meta.user_confirmed = true
    else (default):
      Skip → status=skip, reason="ALLOW_WRITES=0"
Confidence
91% confidence
Finding
This line permits automatic execution of write operations under discovered AK/SK credentials whenever `ALLOW_WRITES=1`, and records that as `user_confirmed=true` even though no real per-case consent occurred. In a cloud-testing skill, that creates a meaningful risk of unauthorized or accidental creation, modification, or deletion of real resources if the environment variable is set by CI, inherited shells, or another tool.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Sort all feature points by list → create → update → delete
    - Chain into a single-skill resource lifecycle
    - Execute each step via real SDK/CLI against the live environment
    - Read-only steps auto-execute; write steps gated by ALLOW_WRITES=0|1
      (default 0, skipped with status=skip in the report)
    - Verify resource state after each mutation
    - AK/SK credentials required (3-tier resolution, see § Phase 4)
Confidence
87% confidence
Finding
The single-skill Phase 6 branch directs the framework to execute a full live resource lifecycle via SDK/CLI, automatically running read steps and conditionally running writes. Because this is an end-to-end chain in a real cloud environment, a mistaken invocation can compound impact across multiple sequential actions and make rollback incomplete or costly.

Unvalidated Output Injection

High
Category
Output Handling
Content
for svc_pkg, sdk_cls in _sdk_map.items():
            try:
                import_cmd = f'from huaweicloudsdk{svc_pkg}.v2 import {sdk_cls}'
                r = subprocess.run(
                    ['python3', '-c', import_cmd],
                    capture_output=True, text=True, timeout=10
                )
Confidence
87% confidence
Finding
The script builds Python code dynamically with `import_cmd = f'from huaweicloudsdk{svc_pkg}.v2 import {sdk_cls}'` and executes it via `python3 -c`. Because `svc_pkg` and `sdk_cls` come from `SERVICES_SDK_MAP_JSON` in the environment, a malicious value can break out of the intended import statement and execute arbitrary Python code in the current context. In a testing skill that processes external skills and runs automation, this is more dangerous because the environment may be influenced by untrusted inputs or CI/job configuration.

Unvalidated Output Injection

High
Category
Output Handling
Content
# Remove leading/trailing pipes and whitespace that might leak from table extraction
            cmd_text = cmd_text.strip().lstrip('|').strip()
            if cmd_text and len(cmd_text) > 5:
                r = subprocess.run(
                    ['bash', '-c', cmd_text],
                    capture_output=True, text=True, timeout=int(os.environ.get('TIMEOUT_CLI', '30')),
                    env=os.environ
Confidence
99% confidence
Finding
The executor runs tc['command'] with bash -c after reading test cases from prior pipeline output, with only limited placeholder and pattern checks. Because this skill is specifically designed to test arbitrary Huawei Cloud skills, test case content must be treated as adversarial; shell execution here enables command injection, local code execution, secret theft, and potentially destructive cloud actions using inherited AK/SK credentials.

Unvalidated Output Injection

High
Category
Output Handling
Content
method_name = tc.get('method_name', '')
            # If command starts with python3 -c, run as bash (it's a one-liner, not a snippet)
            if cmd_text.startswith('python3 -c ') or cmd_text.startswith('python3  -c '):
                r = subprocess.run(
                    ['bash', '-c', cmd_text],
                    capture_output=True, text=True, timeout=int(os.environ.get('TIMEOUT_CLI', '30')),
                    env=os.environ
Confidence
98% confidence
Finding
For SDK tests beginning with python3 -c, the script executes the entire command through bash -c, effectively granting arbitrary shell execution to test-case content. In this skill context, where commands may originate from generated or skill-supplied artifacts, that means an attacker can run arbitrary local commands, exfiltrate credentials, or pivot into cloud APIs under the operator's identity.

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Static analysis

No suspicious patterns detected.