Back to skill

Security audit

pikpak-magnet-pipeline

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed, step-by-step PikPak download pipeline that uses local state and the PikPak CLI with clear limits and no automatic cloud deletion.

Install only if you are comfortable running a local Python wrapper around the PikPak CLI. Keep the state file private, verify PIKPAK_BIN/PATH in your environment, authorize each account/resource/destination explicitly, and treat printed cleanup commands as manual suggestions to review before running.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • 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 (4)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
机制来源、固定许可证、发行证据与不采纳项见同目录下 `references/upstream-design.md`(纯 Markdown 文本,随本 skill 一同分发,可直接用文本编辑器完整阅读;其中不含脚本、不联网、不在运行时执行任何外部请求)。rclone 为 MIT,固定研读快照与发行 tag 的祖先关系未核

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill explicitly states it uses local execution, shell commands, environment inheritance, file I/O, and networked CLI operations, but it does not declare any machine-readable tool scope such as permissions or allowed-tools. In hosts that rely on frontmatter or metadata to enforce least privilege, this omission can cause the skill to run with broader capabilities than an operator expects, increasing the blast radius if the skill is misused or invoked in an unsafe environment.

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

python
if fmt_json:
        cmd += ["-F", "json"]
    try:
        proc = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
        return proc.returncode, proc.stdout, proc.stderr
    except FileNotFoundError:
        die("找不到 PikPak CLI。安装页:https://mypikpak.com/cli")

Tainted flow: 'cmd' from os.environ.get (line 211, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
91% confidence
Finding

The executable path is taken from the PIKPAK_BIN environment variable and then executed via subprocess.run without validation or pinning. An attacker who can influence the environment can redirect execution to an arbitrary program, causing arbitrary code execution under the privileges of the user running the pipeline; in an agent/skill context, that is especially dangerous because skills often run in semi-automated environments where environment variables may be inherited implicitly.

Content

Scanner excerpt · scripts/magnet_pipeline.py (reported line 215)May include surrounding context.

python
if fmt_json:
        cmd += ["-F", "json"]
    try:
        proc = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
        return proc.returncode, proc.stdout, proc.stderr
    except FileNotFoundError:
        die("找不到 PikPak CLI。安装页:https://mypikpak.com/cli")

Static analysis

No suspicious patterns detected.