Back to skill

Security audit

Tri Platform Video Analysis

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its video-transcription purpose, but needs Review because generated HTML reports can include unescaped content that may run browser code when opened.

Review before installing. Use only links you intended to process, avoid private or sensitive videos, do not pass cookie files unless required, install dependencies in an isolated environment, and treat generated HTML reports as untrusted until the renderer escapes or sanitizes all analysis fields.

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/parse.py:382
Finding

Persistent HTML, JavaScript, and CSS Injection in Generated Reports

Content
View full analysis
str: """渲染 Hero 区域""" meta = analysis.get("meta", {}) platform = meta.get("platform", "") platform = platform if platform != "未知" else "" title = meta.get("title", "") duration = meta.get("duration", "") or "" category = meta.get("category", "") date = meta.get("date", dt.datetime.now().strftime("%Y.%m.%d")) badge_text = f"{platform}视频 · 深度解析" if platform else "视频 · 深度解析" meta_items = [] if meta.get("author"): meta_items.append(f"{meta['author']}") if duration: meta_items.append(f"{duration}") if category: meta_items.append(f"{category}") meta_items.append(f"{date}") hero = f'\n' hero += f'
{badge_text}
\n' hero += f'

{title}

\n' if meta_items: hero += f'
{"".join(meta_items)}
\n' hero += f'\n' return hero ``` The summary is also inserted as unrestricted HTML: ```python def _render_summary(analysis: dict) -> str: """渲染一句话总结卡片""" s = analysis.get("summary", "") if not s: return "" return f"""
一句话总结

{s}

""" ``` Capsule identifiers are interpolated into an inline JavaScript event handler and an HTML `id` attribute: ```python cards = "" for c in capsules: cid = c.get("id", "") icon = c.get("icon", "📌") title = c.get("title", "") subtitle = c.get("subtitle", "") cards += f""" ...[truncated 4483 chars]
Remediation
View remediation
str: return html.escape(str(value or ""), quote=True) ``` 2. Apply escaping separately to all metadata, quotes, capsule titles, subtitles, labels, bodies, tags, and document titles. 3. Handle the summary's intended `` support with a strict sanitizer that permits only the `em` element and no attributes. Do not accept arbitrary markup. 4. Remove inline event handlers. Emit validated identifiers through `data-*` attributes and register event listeners from trusted static JavaScript: ```html
``` 5. Restrict capsule IDs to a safe pattern such as: ```python if not re.fullmatch(r"[A-Za-z0-9_-]{1,64}", cid): raise ValueError("Invalid capsule ID") ``` 6. Do not interpolate arbitrary CSS. Validate `bg` against an allowlist of named theme tokens or a strict color grammar before use. 7. Add a restrictive Content Security Policy. In particular, avoid `unsafe-inline` for scripts and restrict network destinations. 8. Add regression tests using payloads containing closing tags, quotes, event handlers, script elements, malformed IDs, and CSS-breaking characters. Verify that generated reports display these values as text and never execute them. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:81
Finding

Unpinned Third-Party Dependencies Create a Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
faster-whisper== ``` 2. Generate and commit a lock or constraints file that also resolves transitive dependencies. 3. Use hash-verified installations, for example through a requirements file generated with hashes and installed using: ```bash pip install --require-hashes -r requirements.txt ``` 4. Document the expected package index and avoid untrusted supplemental indexes that could enable dependency confusion. 5. Automate dependency vulnerability scanning and update pinned versions through a controlled review process. 6. Keep the installation instructions in `SKILL.md` and `README.md` synchronized with the secured dependency manifest. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README documents automatic activation of LLM analysis when an API key is present, but it does not clearly disclose that transcript or video-derived content may be sent to an external third-party service. This creates a real privacy and data-handling risk because users may assume processing is local-only, especially given the nearby claim of local transcription and low-friction setup.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 27)May include surrounding context.

设置后自动启用 LLM 分析

export LLM_API_KEY=sk-xxx

可选

export LLM_BASE_URL=https://api.openai.com/v1 export LLM_MODEL=gpt-4o

text

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to perform network access, shell execution, and local file read/write, but it declares no explicit tool scope or permission boundaries. That creates a capability/authorization mismatch: a caller or runtime may not realize the skill can download untrusted remote content, consume local cookies, write HTML files, and execute commands, increasing the chance of unsafe invocation or over-privileged execution.

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

python
cmd.append(url)

    try:
        result = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL,
            text=True, timeout=600, encoding="utf-8", errors="replace",
        )

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The transcription function defaults language to zh, which steers processing toward a specific language unless the caller overrides it. This is a language-policy issue because the skill imposes a locale assumption by default rather than offering neutral auto-detection or explicit user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generated HTML hard-codes Chinese locale and fonts via lang="zh-CN" and Noto Sans/Serif SC, indicating the output is designed for Simplified Chinese regardless of user preference. This is a natural-language locale constraint that is not presented as an opt-in or documented as a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

Natural-language policy issues apply to all file types. The visible user-facing documentation forces a specific language/locale with no opt-in or alternative, which can violate language-choice expectations unless the constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The parameter table states --language defaults to zh, which imposes a specific language/locale by default. The document does not offer a user choice at invocation time or explain a justified region-specific constraint, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The top-level description presents the tool as a video acquisition and local transcription layer that outputs normalized subtitle JSON and text files. A large portion of the code instead implements interactive HTML report generation, which is a separate presentation capability not directly required for downloading or transcription.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The docstring frames the script as a collection/transcription layer with analysis delegated to the calling agent, yet the documented and implemented --generate-html mode produces a polished analysis report from structured analysis input. While this does not perform the analysis itself, it contradicts the narrow framing of the module as only download/transcription output.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.