Back to skill

Security audit

Video Prompt Reverse

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent video-analysis purpose, but it needs Review because its browser automation can attach to and act on unrelated browser tabs and its guidance normalizes unsafe cookie and certificate handling.

Only install this after reviewing the browser automation risks. Use a dedicated browser profile with no sensitive sessions, verify the exact Doubao tab before any CDP action, avoid uploading private or copyrighted frames, do not combine browser cookies with disabled certificate checks, and prefer pinned dependencies in an isolated environment.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/cdp_client.py:53
Finding

PowerShell Command Injection Through Unvalidated CDP Host and Port

Content
View full analysis
Optional[str]: """通过 JSON API 获取 Tab 的 WebSocket URL""" try: result = subprocess.run( ['powershell', '-Command', f'(Invoke-RestMethod http://{host}:{port}/json).webSocketDebuggerUrl'], capture_output=True, text=True, timeout=5 ) ``` ### Technical Analysis The `host` and `port` parameters are interpolated directly into a PowerShell program passed through the `-Command` option. They are not validated or encoded before interpolation. Using an argument list for `subprocess.run()` does not prevent this vulnerability. Although it avoids parsing by an intermediate operating-system shell, PowerShell still interprets the complete interpolated string as source code. An attacker who can control either argument can introduce PowerShell metacharacters or additional statements. The method is currently called with default values in the bundled workflow, but it is a public method reachable through `connect()`, which also accepts caller-supplied `host` and `port` parameters. The vulnerability therefore becomes exploitable wherever those values originate from an untrusted configuration, wrapper, API request, or agent-generated input. ### Attack Path 1. An attacker gains influence over a value passed as the CDP `host` or `port`. 2. The application calls `CdpClient.connect()` and forwards the value to `_get_ws_url()`. 3. `_get_ws_url()` embeds the value into the PowerShell `-Command` source string. 4. PowerShell parses attacker-provided syntax as an additional expression or command. 5. The injected command executes with the operating-system privileges of the Python process. ### Impact Assessment Successful exploitation permits arbitrary local command ...[truncated 481 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/cdp_client.py:53
Finding

Silent Fallback to an Unrelated Browser Tab Enables Unauthorized Page Control

Content
View full analysis
Optional[str]: """通过 JSON API 获取 Tab 的 WebSocket URL""" try: result = subprocess.run( ['powershell', '-Command', f'(Invoke-RestMethod http://{host}:{port}/json).webSocketDebuggerUrl'], capture_output=True, text=True, timeout=5 ) urls = result.stdout.strip().split('\n') for url in urls: if tab_id in url: return url # 返回第一个可用 URL if urls: return urls[0] return None except Exception: return None ``` Automatic discovery also falls back to the first tab when no Doubao tab is identified: ```python for tab in tabs: title = tab.get("title", "") url = tab.get("url", "") tab_id = tab.get("id", "") print(f"Tab: [{tab_id}] {title} - {url[:60]}") if "doubao" in url.lower() or "豆包" in title: print(f">>> 找到豆包 Tab: {tab_id}") return tab_id # 返回第一个可用的 Tab if tabs: first_id = tabs[0].get("id") print(f"未找到豆包 Tab,使用第一个: {first_id}") return first_id ``` The workflow then performs DOM operations against whichever target was selected: ```python cdp = CdpClient() connected = cdp.connect(tab_id) if not connected: print(f"ERROR: 无法连接到 Tab: {tab_id}") sys.exit(1) print(f"已连接到 Tab: {tab_id}") try: # Step 1: 批量上传 await upload_frames_batch(cdp, tab_id, selected) # Step 2: 点击分析 if not click_explain_button(cdp, tab_id): print("ERROR: 无法点击解释图片按钮") sys.exit(1) # Step 3: 读取结果 ...[truncated 2447 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/troubleshooting.md:19
Finding

Troubleshooting Guidance Recommends Disabling TLS Certificate Verification

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:18
Finding

Unpinned Runtime Dependency Installation Creates Supply-Chain Exposure

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose focuses on video-to-prompt analysis, but the workflow also includes Chrome/Edge DevTools remote debugging, WebSocket access to a browser debugging endpoint, JavaScript-based DOM traversal, button clicking, and possible fallback to arbitrary tabs. That mismatch is dangerous because it hides powerful browser automation capabilities that could interact with unrelated authenticated pages, exfiltrate data from open tabs, or perform unintended actions outside the stated Doubao use case.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

This is a true tool-parameter abuse issue because the document recommends a security-weakening flag, --no-check-certificates, as a normal troubleshooting step. In the context of an automated video-download pipeline, such guidance can cause users to fetch remote content over a connection whose authenticity is not verified.

Content

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

md
**排查顺序:**
1. 视频链接是否有效(抖音/快手需要 cookie 才能下非公开/会员内容)
2. 加 `--no-check-certificates` 跳过 SSL 验证
3. 用 `--cookies-from-browser chrome` 从浏览器导入 cookie
4. 查看详细错误:`yt-dlp -v "URL"` 输出 debug 信息

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

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

ell\Microsoft.PowerShell_profile.ps1` 中添加:

powershell
$env:PYTHONIOENCODING="utf-8"
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8

yt-dlp 下载失败

症状: 下载报错或返回空文件

排查顺序:

  1. 视频链接是否有效(抖音/快手需要 cookie 才能下非公开/会员内容)
  2. 加 --no-check-certificates 跳过 SSL 验证
  3. 用 --cookies-from-browser chrome 从浏览器导入 cookie
  4. 查看详细错误:yt-dlp -v "URL" 输出 debug 信息

FFmpeg 提取帧失败

症状: frames/f_%03d.jpg 文件夹为空

排查:

powershell
# 检查视频是否正常
ffprobe video.mp4

# 检查视频编码
ffmpeg -i video.mp4 2>&1 | Select-String "Video:"

# 常见问题:视频流不在第一个轨道,用 -map 指定
ffmpeg -i video.mp4 -map 0:v:0 -vf "select='not(mod(n\,40))'" -vsync vfr "frames/f_%03d.jpg"

CDP 连接失败

症状: WebSocket connection refused 或 CDP connection error

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill clearly instructs the use of shell-capable tooling (pip, yt-dlp, ffprobe, ffmpeg) but declares no explicit tool scope or permissions boundary. This creates an unsafe execution model where an agent may invoke shell commands without transparent authorization constraints, increasing the risk of unintended command execution or misuse in broader environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill directs users to download third-party videos, extract frames, and upload those frames to an external service for analysis, but it does not provide a clear warning about privacy, copyright, or data-transfer implications. This is risky because extracted frames may contain personal data, sensitive scenes, or proprietary content that is then transmitted to a third party without informed consent or minimization controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow instructs users to download videos from third-party platforms, extract frames, and upload those frames to Doubao for analysis, but provides no privacy warning, consent guidance, or data-handling limitations. This can expose personal, copyrighted, or sensitive visual content to an external service and may violate platform terms, confidentiality expectations, or internal data-governance rules.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

The manifest describes a toolchain for downloading videos, extracting keyframes, uploading them to 豆包 PC, and producing structured prompt output. This section adds a Python script that invokes PowerShell via subprocess to enumerate DevTools tabs, which is a broader host-automation capability not clearly justified by the stated end-user purpose of reverse-engineering video prompts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The troubleshooting guide explicitly recommends --no-check-certificates, which disables TLS certificate validation and can expose users to man-in-the-middle attacks or downloads from spoofed endpoints. In a toolchain that fetches remote video content, normalizing this flag as routine troubleshooting is unsafe because it trains users to bypass transport security without understanding the risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guide recommends --cookies-from-browser chrome without warning that browser cookies are sensitive authentication material and may grant access to private or paid accounts. This is not automatically malware behavior, but it does encourage extracting and reusing live session tokens in a workflow that downloads gated content, increasing risk of account compromise, privacy exposure, and policy abuse.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
92% confidence
Finding

This subprocess call builds a PowerShell command string with interpolated host and port values. If those parameters can be influenced by upstream input, an attacker may be able to alter the PowerShell command or redirect the tool to an unintended DevTools endpoint, expanding access to browser data and automation beyond the local trusted target.

Content

Scanner excerpt · scripts/cdp_client.py (reported line 55)May include surrounding context.

python
def _get_ws_url(self, tab_id: str, host: str = "127.0.0.1", port: int = 9222) -> Optional[str]:
        """通过 JSON API 获取 Tab 的 WebSocket URL"""
        try:
            result = subprocess.run(
                ['powershell', '-Command', f'(Invoke-RestMethod http://{host}:{port}/json).webSocketDebuggerUrl'],
                capture_output=True, text=True, timeout=5
            )

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file exposes a generic DevTools-backed JavaScript execution primitive via Runtime.evaluate plus helper functions for DOM interaction. That goes well beyond the declared video-to-prompt workflow and can be used to read page data, manipulate authenticated sessions, trigger arbitrary actions, or automate unrelated sites open in the browser.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Arbitrary JavaScript execution is exposed without any user notice, consent, or runtime safety gating. Because CDP evaluation runs in the context of the target page, it can access page state and perform privileged actions as the logged-in user, which is especially dangerous in a tool that may touch a real browsing session.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The helper performs automated clicking on arbitrary selectors and optional matching text without requiring confirmation or validating the page origin. This can submit forms, authorize prompts, dismiss warnings, or trigger account-affecting actions in whatever tab the CDP client is attached to.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code enumerates all tabs exposed by the browser's remote debugging interface and, if no Doubao tab is found, silently falls back to the first available tab. In a browser with authenticated sessions, this can redirect automation into unrelated tabs and expose or manipulate sensitive content outside the user's intent.

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/cdp_client.py (reported line 179)May include surrounding context.

python
策略:查找标题包含"豆包"或 URL 包含"doubao"的 Tab
    """
    try:
        result = subprocess.run(
            ['powershell', '-Command', 'Invoke-RestMethod http://127.0.0.1:9222/json -TimeoutSec 3 | ConvertTo-Json -Depth 3'],
            capture_output=True, text=True, timeout=10
        )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This script automates uploading local JPG frame files from a user-supplied directory into an external Doubao browser tab via CDP, but it provides no explicit consent prompt, privacy notice, destination verification, or data classification check before transmission. Because the skill’s stated purpose is to reverse-engineer prompts from user videos, the uploaded frames may contain sensitive personal, proprietary, or confidential visual content, making silent exfiltration to a third-party service a real privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file forces a single language/locale experience through Chinese-only headings, instructions, and explanations. Under the stated policy, language constraints should either be optional for the user or explicitly justified as region-specific, which is not done here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This section says it is showing how to start 豆包 with DevTools enabled, but the example command launches a WeChat-related DLL path instead of Edge or 豆包. Although marked as a wrong example, it still directly contradicts the stated operational intent in the surrounding documentation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This file is a markdown document, so natural-language policy checks apply. The examples and templates prescribe English-form output while the surrounding instructions are in Chinese, which can amount to forcing a specific output language without user opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

These lines define the expected prompt format entirely in English even though the document itself is written in Chinese. Because no opt-in or rationale is provided, this may violate the language-choice policy for natural-language behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module documentation is written only in Chinese, which imposes a specific language context without any opt-in or stated regional justification. Under the policy, language-specific constraints should either offer user choice or be clearly documented as intentionally locale-specific.

Content

No source excerpt is available for this finding.