Back to skill

Security audit

huawei-cloud-publish-work-to-gallery

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this publishing skill suspicious because scanners report credential exposure, unsafe publishing and installation practices, and capabilities beyond its stated purpose; the review is incomplete.

Consider avoiding installation unless you need this specific publishing workflow and can review its credential handling, installer sources, requested system changes, and publication steps first. The scanners report meaningful risks, but several files were only partially analyzed, so the scan cannot establish that the remaining behavior is safe.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/gen_sts.py
Finding

Temporary authentication credentials can be readable by other local users

Content
View full analysis

Impact

An unauthorized local user can obtain live STS credentials and impersonate the corresponding identity wherever those credentials are accepted, including the gallery authentication workflow. This does not expose the permanent cloud secret key.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/publish-work.mjs
Finding

Publication does not enforce the documented confirmation requirement

Content
View full analysis

Impact

Supplied project material can be published before the user approves the final submission. The Skill explicitly states that its interfaces do not support withdrawal or deletion.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/build-detail-zip.mjs
Finding

Project resource symlinks can copy unrelated local files into uploaded archives

Content
View full analysis

Impact

A readable local secret smaller than the resource limit can be embedded under an image filename in the archive and sent to the gallery endpoint during an otherwise authorized publication. Server acceptance or public exposure of those bytes was not verified; the client-side inclusion and upload path are present.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (76)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill introduces installation and execution of a quality-reporting CLI that is not necessary to publish work. Its installation and automatic-update requirements create an additional executable supply-chain dependency in a workflow handling cloud credentials, without specifying a pinned, independently verified release.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied script’s primary purpose is local font provisioning, not publishing works. It contains no gallery or activity submission logic and does not access the declared publishing platform. Although its comments suggest support for screenshot rendering, the supplied code does not establish a connection between that setup and the publishing workflow. On the provided evidence, this is a materially different capability, not merely an implementation detail of a demonstrated publication operation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The supplied command changes an environment setting apparently related to quality reporting, rather than implementing or clearly supporting publication to the platform. This behavior is not disclosed in the declared purpose. The chunk alone does not establish whether any reporting component actually reads the variable or disables reporting.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Checking authentication configuration could support publishing, but this code exposes complete credential values rather than merely reporting whether they are configured. That secret-disclosure behavior is not represented by the declared publishing purpose. The supplied chunk does not publish anything or transmit credentials to an external destination.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The code implements a standalone screenshot-validation utility, not the publishing workflow described. Screenshot generation could support publication, but the supplied chunk contains no connection to the Huawei platform or any submission operation establishing that supporting role. This assessment is limited to the provided code; it does not establish malicious behavior or rule out publication functionality elsewhere in the skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill says the unrelated quality CLI stays current on every run, allowing publishing to introduce newly downloaded executable code without separate approval. Compromise of that update channel could execute code with the agent's local access, including access to credentials used during publishing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The chunk introduces IAM administration capabilities not disclosed by the publishing description. Although its stated rationale is identity verification, creating a persistent account-level delegation is materially different from ordinary authentication or publishing operations. The supplied commands do not show policy attachment, STS credential issuance, or privilege escalation, so those behaviors are not inferred.

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 17)May include surrounding context.

md
发布作品至华为云高校运营平台。**优先调用内置脚本**(单入口、fail-fast、自带 `--help`),报错才查 [references/troubleshooting.md](references/troubleshooting.md)。

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 89)May include surrounding context.

md
- **hcloud + AK/SK**:Step 1 需要。未装/未配置 → [troubleshooting#domain-id-resolution-issues](references/troubleshooting.md#domain-id-resolution-issues)。

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 107)May include surrounding context.

md
ut `#domain=<id> name=<name>`。凭证优先级:env → hcloud 已配置 → 引导用户([troubleshooting#2](references/troubleshooting.md#2-hcloud-credentials-not-configured))。Windows 已由 `

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 242)May include surrounding context.

md
| [troubleshooting.md](references/troubleshooting.md) | 网络/各步骤失败排查 | 脚本报错→先查这里 |

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 36)May include surrounding context.

md
js 15s、check-version.mjs 6s、gitcode-oauth --wait 默认 300s,均在各自 `--help`/源码标注) ④ `detect-env.mjs` 确定平台后只读对应平台 reference(按目录跳转,不全读)⑤ **合并无依赖的 bash 调用**:用 `;` 串联进一条

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 40)May include surrounding context.

md
/`python`/`bash` 解释器前缀(该说法仅 Linux 成立;**Windows 下 .mjs/.py 需 `node`/`python` 前缀、`preflight.ps1` 需 `powershell` 前缀**);若安装器未恢复可执行位(Linux 直接调用报 `Permission denied`)

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 90)May include surrounding context.

md
- **git**:Step 3。**zip** 仅 `build-detail-zip.mjs` 不可用时的备选(Linux `yum install zip`;Windows .NET `ZipFile`,见 [windows-setup.md](references/windows-setup.md))。

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 248)May include surrounding context.

md
| [windows-setup.md](references/windows-setup.md) | Windows 首次准备:编码/Playwright/zip | Windows 环境首次 |

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 90)May include surrounding context.

md
- **git**:Step 3。**zip** 仅 `build-detail-zip.mjs` 不可用时的备选(Linux `yum install zip`;Windows .NET `ZipFile`,见 [windows-setup.md](references/windows-setup.md))。

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 190)May include surrounding context.

md
2. **打包 zip + 校验一步到位**(`build-detail-zip.mjs` 内置正确目录结构 README.md@根 + resources/,打包后自动跑服务端同源校验,跨平台无需 zip/ZipFile):

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 107)May include surrounding context.

md
references/troubleshooting.md#2-hcloud-credentials-not-configured))。Windows 已由 `install-hcloud.ps1` 装好并写入用户 PATH,通常无需 `--hcloud`。

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 208)May include surrounding context.

md
cover.png --detail /tmp/detail.zip --strict --max-age 3600 --quiet`(exit 0 才继续;`publish-work.mjs` 内置 `verifyGates()` 也会拦截)。`publish-work.mjs` 还会在发请求前校验 `envUrl`

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 223)May include surrounding context.

md
p}/shot-index.png`)** + 原 tagline/description,仅换 `--title "<workName'>"` 重跑 `build-cover.mjs`(一键覆盖截图+合成+校验,且退出后不再处理 tmp):

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 230)May include surrounding context.

md
若 `coverTmp` 已被清理/不存在,重跑 `build-cover.mjs` 不带 `--screenshot`(会重新截图,需本地服务仍存活)。

External Script Fetching

High
Category
Supply Chain
Confidence
93% confidence
Finding

The command immediately executes a downloaded script from a mutable latest URL without an independently verified digest or signature. Although the endpoint is presented as the vendor's distribution source and installing the CLI is relevant, compromise of that distribution path could execute arbitrary code, potentially as root under the accompanying guidance.

Content

Scanner excerpt · references/troubleshooting.md (reported line 168)May include surrounding context.

bash
# Linux/macOS — 一键式安装(官方源 qs-hcli/hcli_02_003_02;默认装 /usr/local/hcloud/ → /usr/local/bin/)
curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh
# 无交互跳过: 末尾加 -y;提示权限不足时切换 root 重跑。无 root 沙箱用户级分步(包内含扁平 hcloud 二进制):
#   echo $HOSTTYPE   # x86_64=AMD64 / aarch64=ARM64(URL 按架构替换 amd64/arm64)
#   curl -sSL "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz" | tar -xz -C ~/.local/bin

Credential diagnostics print secret keys and security tokens without warning about disclosure.

High
Category
Output Handling
Confidence
99% confidence
Finding

The Bash diagnostics print actual secret keys and security tokens, exposing them to terminal logs and potentially agent transcripts. Authentication is necessary for publishing, but disclosing these values is not and could enable unauthorized cloud access within the credentials' permissions.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/detect-env.mjs (reported line 9)May include surrounding context.

js
//
// 字段:
//   os      win32 | linux | darwin      (process.platform)
//   shell   powershell | git-bash | bash
//   distro  linux 下: rhel(含 EulerOS/HCE/CentOS) | debian | other;其他平台 n/a
//   sandbox linux 下探测 CodeArts 沙箱(127.0.0.1:19300/healthz == ok)
//   tunnel  true=可开 DevBridge 隧道(仅 linux);false=无隧道能力(win32/darwin)→ envUrl="" 跳过隧道

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/ensure-gitcode-credential.mjs (reported line 12)May include surrounding context.

js
//   node ensure-gitcode-credential.mjs
//
// 行为:
//   1. 检测本机已有 GitCode 凭证(git credential fill / ~/.git-credentials / $GITCODE_TOKEN / cmdkey)
//   2. 有凭证 → exit 0,stdout "#credential=found source=<来源>"
//   3. 无凭证 → exit 0,stdout "#credential=missing",指引执行 gitcode-oauth.ensure.mjs
//      (该脚本自带二进制自动安装:存在不下载,缺失自动装至用户级工具目录)