T09 · Insecure Skill Coding Practices
- Location
scripts/version.sh:153- Finding
GNU sed Command Injection Through Untrusted Existing Version Metadata
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real publishing tool, but serious flaws could leak files during publication or run commands when handling an untrusted skill.
Install only if you understand the publishing targets and are comfortable auditing the exact directory before publishing. Do not run its version or publish commands on untrusted skill directories, avoid --yes until you have reviewed the archive contents, and keep secrets, .env files, private keys, backups, and repository metadata out of the skill folder.
scripts/version.sh:153GNU sed Command Injection Through Untrusted Existing Version Metadata
scripts/validate.sh:71Sensitive-Content Validation Is Warning-Only and Does Not Prevent Publication
scripts/publish.sh:159Unvalidated Skill Name and Version Permit Archive Path Traversal
scripts/platform_clawhub.sh:91ClawHub-Based Adapters Publish a Mutable Live Directory Instead of the Validated Artifact
README.md:29Installation Guidance Uses an Unpinned Global npm Dependency
声明描述的是一个完整的多平台发布技能,核心能力应包括面向多个平台的发布,以及验证、打包、版本管理和统一发布流程。实际代码块只是单独的 ClawHub shell 适配脚本,负责检查 clawhub CLI 是否安装/登录、调用 clawhub publish 发布、查询状态并输出 JSON 结果。它确实支持部分验证和版本/changelog 参数,但范围仅限 ClawHub,且没有看到 GitHub Releases、SkillHub CN、统一编排逻辑或打包实现。因此,代码行为只覆盖声明中的一个子集,且主用途明显更窄,构成描述与行为不一致。
声明的核心用途是“发布到多个平台”,包括验证、打包、版本管理和一键发布;但提供的代码仅是 status.sh 状态模块。它会读取技能元数据、发现平台适配器、调用 platform__status 查询函数,并输出状态 JSON。代码中没有执行发布、打包、上传、创建 Release、版本变更或多平台发布编排等行为。虽然“查询发布状态”可能属于发布工具链的辅助功能,但该代码块本身的实际主功能与声明的主要用途存在明显偏差,因此应判定为描述与行为不匹配。
The declared description presents the skill as a multi-platform release/publishing tool with validation, packaging, version management, and one-click publishing. The actual code chunk only implements local validation logic for a skill directory and metadata. There are no network calls, release creation steps, archive/build steps, version bumping/tagging logic, authentication handling, or platform-specific publishing actions. While validation is mentioned in the description, the supplied code does not substantiate the primary declared purpose of publishing across multiple platforms, so the description materially overstates the behavior of this code chunk.
声明描述的是一个完整的多平台发布技能,而实际代码只是一个 version.sh 模块,专注于本地 SKILL.md 文件中的版本读取、更新和写回。虽然“版本管理”属于声明中的一部分,但该代码块没有展示发布、打包、验证或与任何外部平台交互的行为,因此与声明的主要用途相比明显过窄,不能准确代表所宣称的整体能力。
The primary skill description is presented only in Chinese, with no indication that users may choose another language or that the skill is region-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.
The file consistently uses Chinese for the description, commands context, and safety rules, which effectively forces a specific language for users. The policy allows locale constraints only when users are given a choice or when the restriction is clearly justified as region-specific, neither of which is stated for the overall skill.
The example annotation uses @auth_check: echo $MYPLATFORM_TOKEN, which prints the secret value directly to stdout. In a publishing skill, stdout is commonly captured by wrappers, logs, CI systems, or JSON parsers, so this contradicts the document's own rule against outputting credentials and can leak live API tokens.
The api_key authentication example again uses @auth_check: echo $MY_TOKEN, which directly exposes the API key. Because this document is a template for adapter authors, it is likely to be copied into real implementations and can systematically cause credential disclosure across platforms.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
tar -xzf "$tarball_path" -C "$tmp_dir"
find "$tmp_dir" -type f | while read -r file; do
curl -X POST -F "file=@$file" "https://api.myplatform.com/upload"
done
rm -rf "$tmp_dir"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
tar -xzf "$tarball_path" -C "$tmp_dir"
find "$tmp_dir" -type f | while read -r file; do
curl -X POST -F "file=@$file" "https://api.myplatform.com/upload"
done
rm -rf "$tmp_dir"
This markdown file documents adapter behavior that uploads tarballs over HTTP APIs, including an Authorization header and file transfer to a remote endpoint. Under the markdown-specific SQP-2 criteria, the description lacks an explicit warning that skill contents and related metadata may be transmitted to external platforms, which could affect privacy or system integrity.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
platform_<name>_publish() {
local tarball_path="$1"
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-F "file=@$tarball_path" \
"https://api.platform.com/skills"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -X POST
-H "Authorization: Bearer $TOKEN"
-F "file=@$tarball_path"
"https://api.platform.com/skills"
}
The publish function performs a network operation that creates a GitHub release and uploads the provided tarball via gh release create. Although comments describe the function's purpose, there is no user-facing prompt, warning, or visible disclosure at execution time before transmitting data to GitHub.
platform_load dynamically sources platform_${target_name}.sh into the current shell, so any shell code in that adapter executes immediately with the caller's privileges. Although the path is constrained to the local scripts directory and quoted, this still creates a code-execution trust boundary: if an attacker can add or modify a platform adapter file, invoking platform_load will run arbitrary commands without isolation or explicit confirmation.
This shell script's natural-language output, comments, labels, and help text are consistently in Chinese, including operational errors and usage guidance. The file does not offer any language/locale selection or clearly justify that the skill is intended only for Chinese-speaking or region-specific users, which matches the language/locale policy violation criteria.
The user-facing help and safety guidance are entirely written in Chinese, which imposes a specific language on users of this skill. There is no indication that the tool is region-specific or that users can opt into another language, so this is a natural-language locale policy issue.
The help text states that sensitive information is not logged, but the publish path appends raw adapter output into the returned JSON summary via the detail field. If a platform adapter prints tokens, upload URLs, request headers, or other secrets, those values can be exposed to callers, captured by logs, or stored by downstream systems that record command output.
This markdown file contains user-facing instructional content only in Chinese, and there is no indication that the skill or documentation is region-specific or that users can opt into a preferred language. Under the policy rule for language/locale constraints, forcing a single language without opt-in is a natural-language policy concern.
The markdown includes a concrete example of sending a POST request to a Slack webhook containing skill name and version. The surrounding documentation does not warn users that publication events may be disclosed to external collaboration services, which is the type of behavioral warning SQP-2 expects in markdown descriptions.
The file includes user-facing auth/install hints and help text in Chinese, such as "请先运行" and "官方技能注册平台", with no indication that language is configurable or optional. This can violate a language/locale policy when users are not given an opt-in choice for the interface language.
The auth_hint string is written only in Chinese, and the help text also uses Chinese phrasing, which imposes a specific language on users without opt-in. This is a natural-language policy concern because the file provides user-facing guidance but does not offer a locale choice or document a justified region-specific constraint.
The help banner presents the skill description in Chinese only, which may violate language/locale policy when no user choice is offered. The file does not indicate that the skill is region-specific or that users can select their preferred language.
No suspicious patterns detected.