Back to skill

Security audit

Bilibili Digest

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Bilibili summarization purpose, but it needs review because unchecked follow-up network requests and file-writing weaknesses could exceed the expected scope.

Install only if you are comfortable with this skill fetching Bilibili content, sending summary material to the configured DeepSeek model, and writing local cache/export files. Review is recommended before use in environments with internal network access or sensitive workspaces; the subtitle URL fetching should be host-restricted and export paths should be contained before broad deployment.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/summarizer.py:81
Finding

Indirect Prompt Injection Through Untrusted Bilibili Content

Content
View full analysis
transcript_limit: transcript_excerpt += "\n... [transcript truncated]" prompt = f"""You are a professional note-taker and content analyst. Title: {title} Author: {author} Description: {description} {chapters_text} Transcript excerpt: {transcript_excerpt} Instructions ({summary_mode} mode): {mode_instructions.get(summary_mode, mode_instructions["detailed"])} IMPORTANT: - Always include the original video source attribution (title + author + link) - Timestamps must be accurate to the second (MM:SS format) - Output in {language} Generate the structured summary now:""" return prompt ``` ```python # scripts/summarizer.py:278-294 prompt = f"""Summarize the following column/article. Title: {title} Author: {author} Text: {column_text[:6000]} Generate a structured Markdown note with: 1. Core thesis (1 sentence) 2. Key arguments (3-5 points) 3. Notable quotes or data 4. Your takeaway Keep it concise but comprehensive.""" return prompt ``` ```python # scripts/segmenter.py:139-168 prompt = f"""Video title: {video_title} Below are the detected chapter boundaries. For each chapter, provide: 1. A concise, informative chapter title (in Chinese or English matching the video) 2. A 1-sentence summary of what this chapter covers Chapters: """ for ch in chapters: context = get_chapter_context(segments, ch) context_preview = context[:200] + "..." if len(context) > 200 else context prompt += f""" Chapter {ch['index']}: {_format_time(ch['start_seconds'])} - {_format_time(ch['end_seconds'])} Content preview ...[truncated 2284 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/api.py:215
Finding

Unrestricted Follow-Up Subtitle Fetch Permits SSRF

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/exporter.py:18
Finding

Path Traversal in Custom Markdown Filename Enables Arbitrary File Write

Content
View full analysis
str: """ Export a single video result as a Markdown file. Args: result: The video result dict from processing. output_dir: Directory to write the file to. filename: Optional filename (derived from title if not provided). Returns: Path to the written file. """ os.makedirs(output_dir, exist_ok=True) metadata = result.get("metadata", {}) content = result.get("content", {}) title = metadata.get("title", "Untitled") safe_title = _sanitize_filename(title) if not filename: filename = f"{safe_title}.md" elif not filename.endswith(".md"): filename += ".md" filepath = os.path.join(output_dir, filename) ``` ```python # scripts/exporter.py:141-144 full_content = "\n".join(yaml + body_lines) with open(filepath, "w", encoding="utf-8") as f: f.write(full_content) ``` ### Technical Analysis The title-derived filename is sanitized, but a caller-provided `filename` is not. It can contain `../` path components or be an absolute path. `os.path.join()` does not confine the resulting path to `output_dir`; an absolute second argument replaces the base directory, while traversal components can escape it after filesystem resolution. The file is opened in write mode, so an existing writable file is truncated and replaced. The published input schema does not expose a custom filename, reducing reachability through the documented Skill interface. However, `export_markdown()` is a public helper function and remains exploitable by integrations that pass attacker-influenced filenames. ### Attack Path 1. A ...[truncated 967 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (25)

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
92% confidence
Finding

The declared description focuses on processing individual Bilibili video/column content into structured notes with timestamps, key points, and chapter indexes. In contrast, this code chunk is specifically a cross-video merging engine: it accepts a list of existing per-video result dictionaries and combines them into comparative outputs such as common themes, viewpoint comparisons, and merged knowledge. It does preserve some timestamps from existing key points, but it does not extract content from Bilibili sources, does not summarize raw video/column material directly, and does not generate chapter indexes. The primary purpose of this code is materially different from the declared single-item extraction/structuring workflow, so this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The code’s primary function is danmaku analytics, not summarization of Bilibili video or column content. It parses bullet comments, groups them by time windows, detects high-density periods, extracts keywords from comments, and assigns rough sentiment labels. While it does output timestamps for comment activity highlights, it does not extract or summarize the underlying video/column content into structured notes, key points, or chapter indexes as declared. This is a materially different purpose rather than a supporting implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says the skill extracts and summarizes Bilibili video/column content into structured notes with timestamps, key points, and chapter indexes. However, the supplied code only performs URL parsing: it recognizes Bilibili URL patterns, extracts IDs for videos/articles/playlists/series, marks short links, validates domains, and batch-parses URLs. There is no code to retrieve remote content, process transcripts or article text, generate summaries, or create structured notes. While URL parsing could be a supporting utility for a larger summarization skill, this chunk by itself materially differs from the declared primary purpose and lacks the core described behavior.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/segmenter.py (reported line 175)May include surrounding context.

python
Generate the structured summary now:"""
    
    return prompt


def parse_llm_response(response: Optional[str]) -> Dict:

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/summarizer.py (reported line 108)May include surrounding context.

python
Generate the structured summary now:"""
    
    return prompt


def parse_llm_response(response: Optional[str]) -> Dict:

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/summarizer.py (reported line 294)May include surrounding context.

python
Generate the structured summary now:"""
    
    return prompt


def parse_llm_response(response: Optional[str]) -> Dict:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises network access, local caching, and file export behavior, but does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization and transparency gap: a host may grant broader capabilities than users expect, and reviewers cannot easily verify that the skill is limited to only the minimum required actions.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · SKILL.md (reported line 8)May include surrounding context.

md
author: Golden Bean (coder)
category: Content Extraction
description: Extract, structure, and summarize Bilibili video/column content into structured notes with timestamps, key points, and chapter indexes.
model: deepseek/deepseek-v4-flash
input_schema: schemas/input.schema.json
output_schema: schemas/output.schema.json
---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill states that it fetches Bilibili content and calls an external LLM, but it does not clearly warn users that fetched content, transcripts, danmaku, or user-supplied notes may be transmitted to third-party services. This is dangerous because users may provide copyrighted, private, or sensitive text under the assumption processing is local, leading to unintended data disclosure and compliance issues.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The schema constrains language to zh-CN or en-US but sets the default to zh-CN. This creates a language policy concern because the skill may force Chinese output unless the user explicitly overrides it, and no opt-in or justification is documented in this file.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.py (reported line 38)May include surrounding context.

python
}

# API Endpoints
API_VIDEO_INFO = "https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
API_VIDEO_INFO_AV = "https://api.bilibili.com/x/web-interface/view?aid={aid}"
API_PLAYER_WBI = "https://api.bilibili.com/x/player/v2?bvid={bvid}"
API_DANMAKU = "https://api.bilibili.com/x/v1/dm/list.so?oid={oid}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.py (reported line 39)May include surrounding context.

python
}

# API Endpoints
API_VIDEO_INFO = "https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
API_VIDEO_INFO_AV = "https://api.bilibili.com/x/web-interface/view?aid={aid}"
API_PLAYER_WBI = "https://api.bilibili.com/x/player/v2?bvid={bvid}"
API_DANMAKU = "https://api.bilibili.com/x/v1/dm/list.so?oid={oid}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.py (reported line 40)May include surrounding context.

python
}

# API Endpoints
API_VIDEO_INFO = "https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
API_VIDEO_INFO_AV = "https://api.bilibili.com/x/web-interface/view?aid={aid}"
API_PLAYER_WBI = "https://api.bilibili.com/x/player/v2?bvid={bvid}"
API_DANMAKU = "https://api.bilibili.com/x/v1/dm/list.so?oid={oid}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.py (reported line 41)May include surrounding context.

python
}

# API Endpoints
API_VIDEO_INFO = "https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
API_VIDEO_INFO_AV = "https://api.bilibili.com/x/web-interface/view?aid={aid}"
API_PLAYER_WBI = "https://api.bilibili.com/x/player/v2?bvid={bvid}"
API_DANMAKU = "https://api.bilibili.com/x/v1/dm/list.so?oid={oid}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/api.py (reported line 42)May include surrounding context.

python
}

# API Endpoints
API_VIDEO_INFO = "https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
API_VIDEO_INFO_AV = "https://api.bilibili.com/x/web-interface/view?aid={aid}"
API_PLAYER_WBI = "https://api.bilibili.com/x/player/v2?bvid={bvid}"
API_DANMAKU = "https://api.bilibili.com/x/v1/dm/list.so?oid={oid}"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code explicitly prefers subtitles whose language label starts with Chinese before falling back to any available subtitle. This enforces a locale/language choice in behavior without exposing a user choice or documenting why Chinese is required, 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
93% confidence
Finding

The keyword extraction logic explicitly filters for Chinese characters only, and the sentiment model relies on fixed Chinese keyword sets. This imposes a specific language/locale behavior without any user opt-in or documented limitation, which matches the language/locale policy concern for natural-language behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The function defaults the output language to "zh-CN", and the generated prompt later instructs the model to "Output in {language}". This creates a language policy issue because the skill imposes a specific locale by default rather than offering a user choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill documents cache and output paths but does not clearly warn that fetched content and generated notes are written persistently to local storage. This can expose transcripts, notes, or usage history to other local users, backups, or later unintended disclosure, especially on shared systems.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This JSON file contains all user-facing category names in Chinese and provides no indication that the skill offers locale selection or is limited to a Chinese-specific deployment. Per the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This is a JSON schema file, so SQP-1 applies. The title and description identify the skill purpose but provide no concrete invocation scope, trigger phrases, or exclusion conditions, which can make routing ambiguous if this schema is used as part of skill selection metadata.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

Several user- and developer-facing natural-language comments are written in Chinese only, such as the regex descriptions for BV/AV/CV IDs and playlist/series labels. This creates a locale-specific constraint without offering an alternative language or documenting that the skill is intentionally region/language-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The prompt instructs the model to generate chapter titles only 'in Chinese or English matching the video.' This is a natural-language locale constraint that excludes other languages and does not offer user opt-in or explain a justified regional limitation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest frames the skill as extracting, structuring, and summarizing Bilibili content, which implies source-grounded notes. However, the prompt explicitly asks for "Your takeaway," which introduces model-authored opinion rather than content extraction or source-based summarization.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.