Back to skill

Security audit

tt-download

Security checks for vulnerabilities and agentic risk

Overview

The skill’s stated purpose is coherent, but its downloader can render and fetch arbitrary URLs instead of only the documented OceanEngine flow.

Review before installing. Use this only with trusted OceanEngine video_player token URLs, avoid attacker-supplied links or @path files, and prefer a version that enforces exact OceanEngine host/path allowlists, validates redirects, limits cookies to the expected vck_* value, enables Chromium sandboxing, and uses an isolated temporary browser profile.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/tt_download.py:149
Finding

Unrestricted URL Processing Enables SSRF and Cross-Host Cookie Forwarding

Content
View full analysis
tuple[str, str, str]: """返回 (中间 cc.oceanengine.com src, 最终 video-cn 视频地址, cookie 字符串)。 注意:cc URL 在 302 时会下发 vck_xxx cookie,这个 cookie 是后续下载 video-cn 资源所必需的(缺它会返回 403 / X-Moat-Code 4119)。 """ html = render_with_chrome(page_url) cc_url = VideoSrcExtractor.extract_first(html) # cc.oceanengine.com URL 302 跳转到 video-cn 真实地址;不能跟随 body,只取 Location + Set-Cookie。 req = urllib.request.Request( cc_url, headers={ "User-Agent": UA, "Referer": "https://ad.oceanengine.com/", "Range": "bytes=0-1", # 只想要 redirect header,不下载内容 }, method="GET", ) opener = urllib.request.build_opener(NoRedirectHandler) try: opener.open(req, timeout=30) except urllib.error.HTTPError as e: location = e.headers.get("Location") if location: # 收集所有 Set-Cookie(可能多条) cookies = e.headers.get_all("Set-Cookie") or [] cookie_str = "; ".join( c.split(";", 1)[0].strip() for c in cookies if "=" in c ) return cc_url, location, cookie_str raise RuntimeError(f"cc URL 返回 HTTP {e.code} 但没有 Location 头。") raise RuntimeError("cc URL 未发生重定向,无法解析真实视频地址。") class NoRedirectHandler(urllib.request.HTTPRedirectHandler): """禁止 urllib 自动跟随 302/301,让我们能拿到 Location 头。""" def redirect_request(self, req, fp, code, msg, headers, newurl): return None def download(url: str, dest: str, cookie_str: str = "", chunk: int = 1 << 16) -> int: """把 url 流式写到 dest,返回写入字节数。""" headers = { "User-Agent": UA, "Referer": "https://ad.oceanengine.com/", } if cookie_str: headers["Cookie"] = ...[truncated 3955 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tt_download.py:82
Finding

Remote Web Content Is Rendered with the Chromium Sandbox Disabled

Content
View full analysis
str: """用 headless Chrome 渲染页面并返回完整 DOM HTML。""" chrome = find_chrome() cmd = [ chrome, "--headless=new", "--disable-gpu", "--no-sandbox", "--hide-scrollbars", "--disable-dev-shm-usage", "--virtual-time-budget=30000", # 给 SPA 足够时间发起请求并渲染 "--dump-dom", url, ] # Windows 下避免弹出额外的控制台窗口 popen_kwargs = dict(capture_output=True, timeout=timeout) if sys.platform.startswith("win"): si = subprocess.STARTUPINFO() # type: ignore[attr-defined] si.dwFlags |= subprocess.STARTF_USESHOWWINDOW # type: ignore[attr-defined] popen_kwargs["startupinfo"] = si popen_kwargs["creationflags"] = getattr(subprocess, "CREATE_NO_WINDOW", 0) proc = subprocess.run(cmd, **popen_kwargs) ``` ### Technical Analysis Chromium’s sandbox separates renderer processes handling untrusted web content from the host operating system. The unconditional `--no-sandbox` option disables this important containment boundary. This is particularly dangerous when combined with the absence of URL validation described in the preceding finding. A caller can cause the Skill to process attacker-controlled JavaScript rather than only the intended Oceanengine application. If that content exploits a Chromium renderer or browser vulnerability, disabling the sandbox can substantially reduce the number of additional barriers required to affect the host account. Headless rendering is required for the declared functionality, but disabling the browser sandbox is not generally required. The current configuration therefore exceeds the minimum privilege and exposure necessary for the task. ### Attack Path 1. An attacker convinces a ...[truncated 1375 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill documentation is written in Chinese and does not indicate that the skill is region-specific or that users may choose another language. Under the natural-language policy rules, forcing a specific language without user opt-in is a policy concern unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill describes and enables actions that require network access, file output, shell execution, and likely environment or local resource access, but it does not declare any explicit tool scope or permissions boundary. That omission weakens reviewability and least-privilege controls, making it easier for an agent runtime to grant broader capabilities than users expect when handling untrusted URLs and writing downloaded files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language instructions and usage guidance in this file are presented exclusively in Chinese, which can functionally force a specific language on users or agents without explicit opt-in. The file does not state that the skill is intended only for Chinese-speaking users or provide an alternative language option.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The keyword triggers include broad phrases such as "素材中心 视频" and "oceanengine 下载", which can cause the skill to activate for loosely related user requests rather than only the intended signed video_player URL flow. In an agent ecosystem, overly broad routing can expose users to unnecessary browser/network actions, increase accidental data handling, and cause this skill to be selected when a narrower or safer tool would be more appropriate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python file contains the primary module docstring entirely in Chinese, and later CLI descriptions and status/error messages are also Chinese-only. Under the policy, forcing a specific language without opt-in is a natural-language locale violation unless the skill clearly states a justified region-specific constraint, which this file does not.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/tt_download.py (reported line 106)May include surrounding context.

python
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW  # type: ignore[attr-defined]
        popen_kwargs["startupinfo"] = si
        popen_kwargs["creationflags"] = getattr(subprocess, "CREATE_NO_WINDOW", 0)
    proc = subprocess.run(cmd, **popen_kwargs)
    if proc.returncode not in (0, 1):  # Chrome 在 --dump-dom 时偶尔返回 1
        raise RuntimeError(
            f"Chrome 运行失败 rc={proc.returncode}:\n"

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The stderr contract specifies the fixed message '✅ 已下载 → ', which imposes Chinese output on all users. This is a natural-language locale choice without any documented opt-in or justification in this file.

Content

No source excerpt is available for this finding.