Back to skill

Security audit

Links Pipeline

Security checks for vulnerabilities and agentic risk

Overview

The skill largely matches its stated link-processing purpose, but it can automatically fetch arbitrary links and has unsafe file-write and upload behavior that needs review before use.

Review before installing. Use only in a constrained environment, require explicit confirmation before processing links, avoid private or internal URLs, remove --no-check-certificate, validate URL destinations, and confine all saved or uploaded files to an approved storage root. Do not enable COS or DeepSeek processing for sensitive content unless you accept that data flow.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/extract_article.py:8
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery

Content
View full analysis
dict: """获取网页并提取正文""" headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" } resp = requests.get(url, headers=headers, timeout=30) resp.encoding = resp.apparent_encoding ``` ### Technical Analysis The `url` value is supplied through a command-line argument and passed directly to `requests.get`. The implementation does not validate: - The URL scheme - The destination hostname or port - The resolved IP address - Redirect destinations - Whether the destination belongs to a loopback, private, link-local, or reserved network - The maximum response size Consequently, an attacker who can cause the skill to process a URL can make the host running the agent issue requests to resources that are not directly accessible to the attacker. Redirect-based bypasses are also possible because `requests` follows redirects by default and the destination is not revalidated. ### Attack Path 1. An attacker asks the agent to process an article URL. 2. The URL points directly to an internal endpoint or redirects to one, such as a loopback service, private-network administration interface, or cloud metadata endpoint. 3. The agent invokes `extract_article.py` with the attacker-controlled URL. 4. `requests.get` sends the request from the agent's network context. 5. The response is parsed by Readability and BeautifulSoup. 6. Extracted content is returned in the script's JSON output, potentially exposing information from the internal resource. ### Impact Assessment Successful exploitation can provide access to HTTP services reachable from the agent host, including loopback and private-network services. Depending on the environment, this may expose internal application data, infrastructure meta ...[truncated 314 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/download.py:9
Finding

TLS Certificate Verification Disabled for Video Downloads

Content
View full analysis
Path: """yt-dlp 下载视频""" print(f"[pipeline] 下载视频: {url}") result = subprocess.run( ["yt-dlp", "--no-check-certificate", "-o", str(WORKDIR / "video.%(ext)s"), url], capture_output=True, text=True, timeout=120 ) ``` ### Technical Analysis The `--no-check-certificate` option explicitly disables TLS certificate verification in `yt-dlp`. Although HTTPS may still encrypt traffic, the client no longer reliably authenticates the remote server. An attacker able to intercept or influence the agent's network traffic can impersonate the requested media host and substitute arbitrary media content. The downloaded file is subsequently passed to `ffmpeg` and Whisper, increasing the impact of untrusted-file substitution because complex local parsers process the content. The use of an argument array prevents shell injection through the URL, but it does not mitigate certificate-validation failure. ### Attack Path 1. A user supplies an HTTPS media URL. 2. The skill invokes `yt-dlp` with certificate verification disabled. 3. An attacker controlling a network path, proxy, DNS response, or hostile access point presents an untrusted certificate and impersonates the destination. 4. `yt-dlp` accepts the unauthenticated connection and downloads attacker-controlled content. 5. The content is processed locally by `ffmpeg` and Whisper. 6. The attacker can corrupt the resulting transcript and may expose the host to vulnerabilities in downstream media parsers. ### Impact Assessment The direct impact is loss of download integrity and server authenticity. An attacker can substitute content, manipulate generated transcripts, or cause availability problems through malformed or oversized media. Code execution would require an additional vu ...[truncated 207 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/upload_to_cos.py:35
Finding

Filename Path Traversal Enables Writes Outside the Working Directory

Content
View full analysis
dict: """本地保存并上传""" local_path = f"/tmp/links-pipeline/{filename}" Path(local_path).parent.mkdir(parents=True, exist_ok=True) Path(local_path).write_text(text, encoding="utf-8") ok = upload(local_path, target_cos_path) ``` The affected values are populated directly from JSON supplied on standard input: ```python if __name__ == "__main__": data = json.load(sys.stdin) result = save_and_upload(data["text"], data["filename"], data["target_path"]) ``` ### Technical Analysis The script assumes that prefixing `filename` with `/tmp/links-pipeline/` confines the resulting path to that directory. This assumption is incorrect because absolute or traversal components are not rejected or normalized before writing. For example, a filename containing `../../home/user/example` resolves outside the intended work directory. The call to `mkdir` can also create attacker-selected parent directories where process permissions allow it. Finally, `write_text` follows symbolic links, so a pre-existing link in the predictable shared temporary directory can redirect the write. There is no shell injection in this code path; the vulnerability is filesystem path authorization failure. ### Attack Path 1. An attacker supplies JSON input containing controlled `text`, `filename`, and `target_path` fields. 2. The `filename` contains traversal components such as `../../home/user/.profile`. 3. The script concatenates the value into `/tmp/links-pipeline/../../home/user/.profile`. 4. The operating system resolves the traversal components outside `/tmp/links-pipeline`. 5. `write_text` creates or overwrites the destination with attacker-controlled text under the privileges of the agent process. 6. ...[truncated 817 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/upload_to_cos.py:13
Finding

Caller-Controlled Local Upload Destination Enables Arbitrary File Overwrite

Content
View full analysis
bool: """调用系统工具上传到对象存储""" sc = load_storage_config() stype = sc.get("type", "local") if stype == "cos": cos = sc.get("cos", {}) bucket = cos.get("bucket", "") region = cos.get("region", "") # 优先使用 ~/.cos.conf 中的凭据 result = subprocess.run( ["coscmd", "-b", bucket, "-r", region, "upload", local_path, target_path], capture_output=True, text=True, timeout=30 ) return result.returncode == 0 else: # 本地模式:直接复制 result = subprocess.run(["cp", local_path, target_path], capture_output=True, text=True, timeout=10) return result.returncode == 0 ``` The destination is accepted from standard input without validation: ```python if __name__ == "__main__": data = json.load(sys.stdin) result = save_and_upload(data["text"], data["filename"], data["target_path"]) ``` ### Technical Analysis When no storage configuration is present, `stype` defaults to `local`. In that mode, the caller-controlled `target_path` is supplied directly to `cp` without requiring it to reside beneath an authorized knowledge-base or storage root. Because `subprocess.run` uses an argument array and does not enable a shell, ordinary shell metacharacters do not create command injection. However, `cp` still performs an unrestricted filesystem copy to the selected destination. Existing files may be overwritten, and symbolic links may redirect the operation. In COS mode, caller control over the object path can similarly allow writes to unintended object keys within the configured bucket, although bucket-level access remains constrained by the credentials used by `cosc ...[truncated 1041 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (25)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个端到端的链接处理流水线,核心能力应包括链接类型判断、抓取下载、转录/提取、主题分类和路由投递。而给出的代码片段仅处理已经获得的“原始转录稿”文本清洗,不接收或解析链接,也不执行下载、文章提取、主题识别或知识库路由。其主要功能与声明中的主目的相比明显更窄且不同。此外,代码会访问外部 DeepSeek API,这一资源使用在声明权限中未体现。虽然“转录相关处理”可视为整体流水线中的一个辅助步骤,但单看该代码块,行为与所宣称的完整自动化链接处理管线存在实质不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个面向多类链接的全自动内容处理与分发管线,覆盖视频与文章两大类内容,并包含识别、提取、主题分析和知识库路由等多个阶段。实际代码只处理视频 URL 的下载、音频提取和 Whisper 转录,且失败时返回 need_browser_url,表明流程并非全自动。代码中没有任何链接类型判断、文章抓取、正文提取、主题分类或知识库投递逻辑。因此实际行为明显窄于且不同于声明的主要用途,属于描述与行为不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个多平台、多阶段的自动处理流水线,涵盖链接分类、视频/文章内容获取、转录或正文抽取、主题识别以及知识库路由。实际代码却只是一个文章提取脚本:对传入 URL 发起 HTTP 请求,用 readability 提取正文,再转为 Markdown,并读取 meta description。它没有任何链接类型判断逻辑,也没有视频平台处理、音视频转录、主题分类、知识库写入或路由功能。虽然“网页文章正文提取”属于声明中的一小部分,但该代码块的实际主功能明显比声明狭窄得多,无法代表所宣称的完整技能,因此属于描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个端到端的链接内容处理流水线,涵盖链接识别、内容抓取、转录/提取、主题分析和入库路由。但给出的代码片段只负责最后一小部分:从 stdin 读取已有文本,按配置中的关键词规则识别主题,并生成路由结果。它没有处理链接、没有网络访问、没有下载、没有解析不同平台内容、也没有转录能力。因此代码实际行为明显比声明范围窄,属于描述与实现不符。

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

Using --no-check-certificate disables TLS certificate validation when yt-dlp fetches remote content, allowing man-in-the-middle attackers or hostile network infrastructure to intercept or tamper with downloads. In this pipeline, which automatically retrieves untrusted external media based on user-supplied links, that materially increases the chance of processing spoofed or malicious content.

Content

Scanner excerpt · scripts/download.py (reported line 13)May include surrounding context.

python
"""yt-dlp 下载视频"""
    print(f"[pipeline] 下载视频: {url}")
    result = subprocess.run(
        ["yt-dlp", "--no-check-certificate", "-o", str(WORKDIR / "video.%(ext)s"), url],
        capture_output=True, text=True, timeout=120
    )
    if result.returncode != 0:

Lp1

High
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The script performs arbitrary outbound HTTP requests to a user-supplied URL via requests.get, but the finding indicates this network capability is not declared in the skill permissions. In an agent environment, undeclared network access is dangerous because it can fetch untrusted content, reach internal services if input is attacker-controlled, and bypass operator expectations or platform policy controls.

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

python
for rule in config["routing"]["rules"]:
        for topic in rule["topics"]:
            if topic.lower() in text_lower:
                return rule["target"]
    
    # fallback
    if config["routing"].get("fallback") == "ask":

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill advertises automatic downloading, transcription, external processing, and routing into a knowledge base without warning users about data handling, retention, third-party processing, or storage side effects. This creates privacy and integrity risks, especially if links contain private, copyrighted, or sensitive content that may be downloaded locally or sent to external services like transcription or LLM APIs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger conditions are broad enough that any ordinary message containing a link could activate a pipeline that downloads content, extracts text, and potentially writes into a knowledge base. In an agent environment with Bash, Process, Read, and Write permissions, unintended activation can lead to unnecessary external requests, local processing, and unwanted data ingestion without clear user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Forcing --language zh can cause inaccurate transcription for non-Chinese audio and may silently corrupt downstream classification and storage decisions. While this is not a classic exploit primitive, it is a safety and integrity issue because incorrect transcripts may be routed into the wrong knowledge base or misrepresented as accurate content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code sends the full transcript content to an external third-party API (api.deepseek.com) without any explicit disclosure, consent flow, redaction, or sensitivity checks. Because transcripts may contain personal, confidential, or regulated data, this creates a real data-exposure risk that is amplified by the skill's purpose of processing arbitrary linked content automatically.

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

python
def download_video(url: str) -> Path:
    """yt-dlp 下载视频"""
    print(f"[pipeline] 下载视频: {url}")
    result = subprocess.run(
        ["yt-dlp", "--no-check-certificate", "-o", str(WORKDIR / "video.%(ext)s"), url],
        capture_output=True, text=True, timeout=120
    )

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

python
"""ffmpeg 提取音频为16kHz wav"""
    audio_path = WORKDIR / "audio.wav"
    print(f"[pipeline] 提取音频: {video_path.name} → audio.wav")
    subprocess.run([
        "ffmpeg", "-i", str(video_path), "-vn",
        "-acodec", "pcm_s16le", "-ar", "16000", "-ac", "1",
        "-y", str(audio_path)

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

python
def transcribe(audio_path: Path) -> str:
    """whisper base 模型转录"""
    print(f"[pipeline] 转录音频 (base model)...")
    result = subprocess.run(
        ["whisper", str(audio_path), "--model", "base",
         "--language", "zh", "--output_dir", str(WORKDIR),
         "--output_format", "txt"],

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The whisper invocation hard-codes --language zh, which enforces a specific language/locale behavior. There is no indication that the user can opt in to this constraint or that the skill is intentionally limited to a Chinese-only use case.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code persists the transcription result to /tmp/links-pipeline/transcript.txt, which is a file write involving user-derived content. Although there are progress prints for earlier pipeline stages, there is no user-facing warning, confirmation, or explanatory comment/docstring indicating that transcript data will be stored on disk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file contains natural-language docstrings and CLI usage text only in Chinese (for example at L02, L09, and L43). Because the skill does not offer the user a language/locale choice or explain that it is intentionally limited to a Chinese-speaking context, it creates a language-policy issue under the natural-language policy rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains multiple hard-coded Chinese natural-language strings in the module docstring and user-facing result messages. Because the skill does not provide any language or locale selection, it effectively enforces a specific language on users, which matches the policy-violation criterion for language/locale restrictions without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest describes a pipeline that identifies link type, downloads/transcribes/extracts content, determines topic, and routes content to the appropriate knowledge-base inbox. This file implements persistence and remote upload to object storage via coscmd, which is a broader storage/export behavior not stated in the manifest description and is not obviously the same as routing to an inbox.

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

python
bucket = cos.get("bucket", "")
        region = cos.get("region", "")
        # 优先使用 ~/.cos.conf 中的凭据
        result = subprocess.run(
            ["coscmd", "-b", bucket, "-r", region,
             "upload", local_path, target_path],
            capture_output=True, text=True, timeout=30

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
74% confidence
Finding

The stated purpose is automated link processing and routing of extracted content, but this implementation invokes host-level executables through subprocess.run. Launching external binaries is a stronger capability than the manifest suggests and is not clearly required by the natural-language description itself.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
93% confidence
Finding

The code copies a file to an attacker-controlled target_path using the system cp command with no validation or confinement. In local mode, this can overwrite arbitrary writable filesystem paths or place data in sensitive locations, turning untrusted input into arbitrary file write behavior.

Content

Scanner excerpt · scripts/upload_to_cos.py (reported line 31)May include surrounding context.

python
return result.returncode == 0
    else:
        # 本地模式:直接复制
        result = subprocess.run(["cp", local_path, target_path],
                                capture_output=True, text=True, timeout=10)
        return result.returncode == 0

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function writes attacker-controlled filename and text to /tmp and then uploads or copies the resulting file without any validation, disclosure, or access control. Because filename is concatenated into the path directly, an input like ../../... can escape the intended directory and create or overwrite arbitrary writable files before exfiltrating or relocating them.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The embedded prompt is entirely in Chinese and instructs the model to produce a specific Chinese-language output structure, with no indication that users can choose another language or locale. This may violate language/locale policy when a skill imposes a language without user opt-in or documented justification.

Content

No source excerpt is available for this finding.