Back to skill

Security audit

Cos_Uploader_Qcloud_lh

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real photo-to-COS uploader, but it needs Review because crafted input or debug use can cause arbitrary readable local files to be uploaded.

Install only after the uploader is fixed to accept trusted OpenClaw attachment metadata or restrict real paths to the inbound media directory, reject symlinks, verify actual image content, and run as a dedicated low-privilege user. Use a Tencent Cloud sub-account limited to writing the intended bucket and prefix, pin dependencies, and make sure people sending images know they will be stored in COS.

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

Error
Location
scripts/skill_handler.py:59
Finding

Arbitrary Readable File Upload Through Unvalidated File Paths

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:1
Finding

Mutable and Unverified Python Dependencies Installed From the Package Index

Content
View full analysis
=1.9.30 cryptography>=41.0.0 ``` ```bash pip install --upgrade pip -q pip install -r "${SKILL_DIR}/scripts/requirements.txt" -q ``` ### Technical Analysis Both dependencies use open-ended lower-bound constraints. Consequently, installation resolves whatever newer versions and transitive dependencies are available from the configured Python package index at installation time. The project does not provide: - Exact dependency versions. - A lockfile covering transitive dependencies. - Package hashes. - Signature or provenance verification. - A restricted, trusted package source. Python package installation can execute package build hooks and installation logic. Therefore, a compromised package release, transitive dependency, index, or mirror could execute code during `install.sh`. The unconditional pip upgrade introduces an additional mutable component into the installation process. This audit did not find evidence that the currently named packages are malicious. The finding concerns the unsafe and non-reproducible dependency installation model. ### Attack Path 1. An administrator executes `install.sh`, potentially under the root account suggested by the deployment documentation. 2. The script upgrades pip from the configured package index. 3. Pip resolves the latest versions satisfying the open-ended dependency constraints. 4. A compromised future release, compromised transitive dependency, or malicious package served by a compromised index is selected. 5. Package build or installation code executes with the privileges of the administrator running the installer. 6. The malicious dependency can access local files, alter the Skill environment, steal credentials, or establish persistence. ### Impact Ass ...[truncated 683 chars]
Remediation
View remediation
cryptography== ``` 2. Generate and commit a lockfile that includes all transitive dependencies. 3. Record cryptographic hashes and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.lock ``` 4. Review dependency updates before modifying the lockfile. Incorporate vulnerability scanning and software-composition analysis into the release process. 5. Avoid automatically upgrading pip during every installation. Pin and separately review the installer version when an upgrade is necessary. 6. Configure an approved package index or internal mirror and ensure TLS certificate verification remains enabled. 7. Install the Skill and its dependencies as a dedicated unprivileged account rather than root. 8. Prefer binary wheels from trusted sources where appropriate, and reject unexpected source builds in production deployment workflows. 9. Produce and retain a software bill of materials so deployed dependency versions can be tracked and audited. ]]>
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (27)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to collect and store Tencent Cloud SecretId/SecretKey, validate bucket connectivity, and initialize local configuration while not implementing the user-facing upload workflow it advertises. Because cloud credentials are highly sensitive, misrepresenting a credential-harvesting/setup utility as a photo-upload helper materially increases the risk of users granting secrets without understanding the true function.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill appears to collect and store Tencent Cloud SecretId/SecretKey, validate bucket connectivity, and initialize local configuration while not implementing the user-facing upload workflow it advertises. Because cloud credentials are highly sensitive, misrepresenting a credential-harvesting/setup utility as a photo-upload helper materially increases the risk of users granting secrets without understanding the true function.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill appears to collect and store Tencent Cloud SecretId/SecretKey, validate bucket connectivity, and initialize local configuration while not implementing the user-facing upload workflow it advertises. Because cloud credentials are highly sensitive, misrepresenting a credential-harvesting/setup utility as a photo-upload helper materially increases the risk of users granting secrets without understanding the true function.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill appears to collect and store Tencent Cloud SecretId/SecretKey, validate bucket connectivity, and initialize local configuration while not implementing the user-facing upload workflow it advertises. Because cloud credentials are highly sensitive, misrepresenting a credential-harvesting/setup utility as a photo-upload helper materially increases the risk of users granting secrets without understanding the true function.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README describes automatic receipt and cloud upload of WeChat photos, but does not prominently warn that user-submitted images will be transferred to Tencent COS and retained there, creating privacy and consent risk. In this skill context, the issue is more significant because the workflow is explicitly automated and triggered by inbound chat media, so operators may deploy it without informing end users whose images are being archived.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises an executable entrypoint (run.sh) but does not declare any explicit tool scope or permission boundaries. In agent environments, undeclared shell capability increases the risk of overbroad execution, hidden side effects, and makes review harder because users cannot tell what system access the skill expects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill description says image attachments from WeChat are automatically uploaded to cloud storage, but it does not clearly warn users about the privacy and data-transfer implications of that automation. Automatic exfiltration of personal images to a cloud bucket is safety-sensitive, especially when triggered by incoming messages and when users may not realize every image will be uploaded.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 58)May include surrounding context.

sh
echo "[4/5] 设置文件权限..."
chmod +x "${SKILL_DIR}/run.sh"
chmod +x "${SKILL_DIR}/install.sh"
chmod 644 "${SKILL_DIR}/scripts/skill_handler.py"
chmod 644 "${SKILL_DIR}/scripts/cos_uploader.py"
chmod 644 "${SKILL_DIR}/scripts/config.py"
chmod 644 "${SKILL_DIR}/scripts/setup_config.py"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 59)May include surrounding context.

sh
echo "[4/5] 设置文件权限..."
chmod +x "${SKILL_DIR}/run.sh"
chmod +x "${SKILL_DIR}/install.sh"
chmod 644 "${SKILL_DIR}/scripts/skill_handler.py"
chmod 644 "${SKILL_DIR}/scripts/cos_uploader.py"
chmod 644 "${SKILL_DIR}/scripts/config.py"
chmod 644 "${SKILL_DIR}/scripts/setup_config.py"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 60)May include surrounding context.

sh
echo "[4/5] 设置文件权限..."
chmod +x "${SKILL_DIR}/run.sh"
chmod +x "${SKILL_DIR}/install.sh"
chmod 644 "${SKILL_DIR}/scripts/skill_handler.py"
chmod 644 "${SKILL_DIR}/scripts/cos_uploader.py"
chmod 644 "${SKILL_DIR}/scripts/config.py"
chmod 644 "${SKILL_DIR}/scripts/setup_config.py"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 61)May include surrounding context.

sh
echo "[4/5] 设置文件权限..."
chmod +x "${SKILL_DIR}/run.sh"
chmod +x "${SKILL_DIR}/install.sh"
chmod 644 "${SKILL_DIR}/scripts/skill_handler.py"
chmod 644 "${SKILL_DIR}/scripts/cos_uploader.py"
chmod 644 "${SKILL_DIR}/scripts/config.py"
chmod 644 "${SKILL_DIR}/scripts/setup_config.py"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 69)May include surrounding context.

sh
echo "[5/5] 创建运行时目录..."
mkdir -p "${SKILL_DIR}/scripts/conf"
mkdir -p "${SKILL_DIR}/scripts/logs"
chmod 700 "${SKILL_DIR}/scripts/conf"
echo "  ✅ 目录创建完成"

# ==================== 安装完成 ====================

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The comments and visible runtime messages are entirely in Chinese, including the usage/help text and error output. This imposes a specific language on users without any opt-in or documented locale justification, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language documentation entirely in Chinese, and later user-facing runtime messages are also Chinese-only. Under the policy for natural-language violations, forcing a specific language without opt-in or a documented region-specific justification is a reportable issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code performs a network upload of a local file to Tencent Cloud COS, which transmits user or system data off the local machine. Although the docstring describes the upload behavior, there is no confirmation prompt, user-facing print/log notice, or other explicit disclosure at the point of action.

Content

No source excerpt is available for this finding.

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
55% confidence
Finding

Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.

Content

Scanner excerpt · scripts/cos_uploader.py (reported line 109)May include surrounding context.

python
if file_size <= 20 * 1024 * 1024:  # 20MB 以下使用简单上传
            with open(local_file_path, 'rb') as fp:
                response = client.put_object(
                    Bucket=bucket,
                    Body=fp,
                    Key=cos_key,

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
55% confidence
Finding

Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.

Content

Scanner excerpt · scripts/cos_uploader.py (reported line 118)May include surrounding context.

python
)
        else:
            # 大文件使用分块上传
            response = client.upload_file(
                Bucket=bucket,
                LocalFilePath=local_file_path,
                Key=cos_key,

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

整个技能 README 仅以中文呈现,且未说明该技能是否仅面向中文用户、是否支持其他语言,或是否允许用户自行选择语言/locale。根据该规则,若存在语言/地区约束而未提供选择或合理说明,属于自然语言层面的组织策略风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

All visible natural-language content in the skill metadata and instructions is presented only in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in can be a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's user-facing description and usage text are presented in Chinese, and the remainder of the installer output continues in that language. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation when no locale choice or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

Comments and all echoed instructions are presented in Chinese, including usage and deployment guidance. This effectively forces a specific language for users without opt-in, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The natural-language documentation in this file is entirely Chinese and does not indicate any user language choice or locale-specific justification. Under the stated policy, forcing a specific language without opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a lower bound only, so builds may resolve to different versions over time. This weakens supply-chain reproducibility and can unexpectedly introduce vulnerable or breaking releases into the skill environment.

Content

Scanner excerpt · scripts/requirements.txt (reported line 1)May include surrounding context.

text
cos-python-sdk-v5>=1.9.30
cryptography>=41.0.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

Using cryptography with only a minimum version means the actually installed version is not controlled or reproducible. Because this is a security-sensitive package, version drift increases the chance of pulling in a release with known issues or incompatible bundled components.

Content

Scanner excerpt · scripts/requirements.txt (reported line 2)May include surrounding context.

text
cos-python-sdk-v5>=1.9.30
cryptography>=41.0.0