Back to skill

Security audit

social video -publish寒武纪视频发布

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a disclosed video publishing helper, but it needs Review because it touches logged-in social accounts and includes unsafe generated terminal download commands.

Review before installing. Use only with accounts you are comfortable controlling through the browser, confirm every publish action manually, and avoid copying generated curl or wget commands unless the URL and filename are fully trusted and safely quoted.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
platform-helper.py:94
Finding

Shell Command Injection in Generated Download Commands

Content
View full analysis
dict: """ 生成安全的下载指导 注意:不执行下载,仅提供指导 """ if not output_name: output_name = "video_download" # 验证 URL 安全性 parsed = urllib.parse.urlparse(video_url) if parsed.scheme not in ["http", "https"]: return { "status": "error", "message": "仅支持 HTTP/HTTPS 协议" } # 提供安全的下载方法 result = { "status": "guide_generated", "video_url": video_url, "suggested_name": f"{output_name}.mp4", "methods": { "browser": { "description": "浏览器直接下载(推荐)", "steps": [ f"1. 在浏览器中打开: {video_url}", "2. 按 Ctrl+S 或右键 → 另存为", f"3. 保存为: {output_name}.mp4" ] }, "curl": { "description": "使用 curl 下载(命令行)", "command": f'curl -L -o "{output_name}.mp4" "{video_url}"', "note": "在终端中运行此命令" }, "wget": { "description": "使用 wget 下载(命令行)", "command": f'wget -O "{output_name}.mp4" "{video_url}"', ``` ### Technical Analysis The `video_url` and `output_name` values originate from command-line arguments and are interpolated directly into commands intended to be run in a shell. Neither value is safely quoted or constrained by a strict allowlist. The URL validation only verifies that `urllib.parse.urlparse(video_url).scheme` is either `http` or `https`. This does not reject embedded quotation marks, command separators, command substitutions, shell metacharacters, or newline characters. No validation is applied to `output_name`. Wrapp ...[truncated 2166 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

整个技能说明均以中文呈现,且未说明可根据用户偏好切换语言,也未提供语言选择或 opt-in 机制。按规则,若技能在自然语言层面强制特定语言而无用户选择,属于语言/locale 政策风险。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger section includes a catch-all phrase like '类似的多平台视频发布需求', which can cause the skill to activate for broader requests than intended. In a browser-automation context tied to logged-in social media accounts, overbroad triggering increases the chance of unintended account actions or the agent steering a conversation into publishing workflows without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring repeatedly states that the script only parses information and does not perform downloading, with all downloads supposedly done manually in a browser. However, the implementation includes generate_download_script that emits ready-to-run curl and wget commands, and other paths instruct users to extract direct media links via developer tools for downloading. That is a meaningful contradiction in stated intent versus actual behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

generate_download_script is documented as only providing safe guidance and not executing downloads. While it does not itself run the commands, it constructs concrete curl and wget commands that enable downloading outside the browser, contradicting the broader documented claim that downloading is performed by the user in the browser. This is an intent-level mismatch, not just missing detail.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest description is written entirely in Chinese and presents the skill as a general multi-platform publishing assistant, but it does not state that use is limited to Chinese-speaking users or offer any language/locale choice. Under the policy rules, an unexplained language-specific constraint can be a natural-language policy violation when no opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code file contains user-facing natural-language instructions and examples entirely in Chinese, and the CLI help strings later continue that pattern. Under the policy rule for language or locale constraints, forcing a single language without user opt-in can be a natural-language policy violation when no choice or justification is provided.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.