← MCP server and skill grades

bdpan-storage

baidu-netdisk/bdpan-storage

B
Type
Skill
Scanned
Nov 17, 2026
Version
f5ab379cb6f0
Files read
39

This project provides AI agent skills for managing files and agent memory backups in Baidu Netdisk and generating presentations with Baidu Wenku AI PPT through a downloaded bdpan CLI binary. The biggest risks are that its installer and self-updater can execute or overwrite code while skipping integrity or confirmation checks in several environments, and the baidu-drive skill sends the user's full raw chat message on every CLI command without disclosing this in the README.

What it can reach

Shell commands
Requests the Bash tool and executes included shell scripts (install.sh, login.sh, update.sh, uninstall.sh, memory-backup.sh, run-aippt.sh) as well as the downloaded closed-source bdpan CLI binary.
Files
Uploads and downloads user-specified local files, reads and overwrites agent workspace memory files, installs the bdpan binary in ~/.local/bin, and writes configuration and update state under ~/.config/bdpan and the skill directory.
Network
Downloads binary installers from issuecdn.baidupcs.com, fetches skill update metadata and zip archives from pan.baidu.com, and communicates with Baidu Netdisk and Baidu Wenku APIs.
Secrets
Creates, uses, and deletes Baidu Netdisk OAuth tokens stored in ~/.config/bdpan/config.json and handles 32-character OAuth authorization codes during login.
Other
Reads, uploads, downloads, searches, shares, transfers, and deletes files inside the user's Baidu Netdisk /apps/bdpan/ folder, queries account storage quota, and consumes Baidu Wenku AI PPT generation quota.

Findings

2 medium4 low
  1. MediumSkill sends verbatim user chat messages on every CLI call and forbids escaping single quotes

    skills/baidu-drive/SKILL.md:54

    SKILL.md instructs the agent to pass the user's entire raw message word-for-word via --session-input (along with --agentname, --session-id, and any host --uid or --traceid) on every bdpan command, including read-only capacity or --help checks, for service quality tracking. This prompt telemetry is not disclosed in README.md, so unrelated secrets or private notes in the same message are sent to bdpan and exposed in the local OS process list (ps) to other users on the machine; additionally, requiring verbatim text inside shell single quotes while forbidding modification means any single quote in the prompt can break shell quoting when executed via Bash.

    Fix: Remove the mandatory --session-input requirement or make it opt-in and clearly documented in README.md, pass free-form text via stdin rather than command-line arguments, and require proper shell escaping instead of forbidding modification.

  2. MediumCLI installer skips SHA256 verification when checksums or hash tools are missing and installs without confirmation

    skills/baidu-wenku-aippt-personal/scripts/install.sh:225

    Although both README files claim SHA256 verification is mandatory, install.sh in both skills only logs a warning and still executes the downloaded binary installer when sha256sum/shasum is unavailable or when a platform checksum is missing (notably windows-amd64 in baidu-wenku-aippt-personal, which builds and downloads the .exe URL but omits its hash in get_checksum). In addition, install.sh downloads the executable into the current working directory instead of a private temporary directory and runs it without asking for confirmation when bdpan is not yet installed (which memory-backup.sh also triggers automatically).

    Fix: Abort with a non-zero exit code whenever expected_checksum or a SHA256 tool is missing, add checksums for all supported platforms, download installers into a mktemp -d directory, and prompt for confirmation on first-time installs unless --yes is passed.

  3. LowSkill self-updater fails to block silent --yes updates in most agents and relies on unpinned checksums

    skills/baidu-wenku-aippt-personal/scripts/update.sh:298

    Both update.sh scripts fetch a remote zip URL and its SHA256 checksum from the same dynamic pan.baidu.com API response and unzip it directly over the skill directory, replacing executable scripts and SKILL.md without a pinned hash or cryptographic signature. To prevent silent updates, update.sh tries to disable --yes inside agents by checking CLAUDE_CODE, ANTHROPIC_API_KEY, and MCP_SERVER, but Claude Code actually sets CLAUDECODE (without an underscore), OAuth sessions omit ANTHROPIC_API_KEY, other supported agents (Cursor, Codex, OpenClaw, KimiClaw, QClaw) set none of these variables, and baidu-wenku-aippt-personal/SKILL.md line 94 explicitly instructs the agent to run update.sh --yes.

    Fix: Remove --yes from SKILL.md, detect non-interactive or agent environments reliably (for example via detect-agent.sh or tty checks), restrict download URLs to an expected HTTPS host allowlist, and verify updates against a signed manifest rather than an unpinned checksum from the same API response.

  4. LowMemory backup restore allows arbitrary workspace file overwrites and symlink or prefix bypasses

    skills/baidu-drive/scripts/memory-backup.sh:459

    SKILL.md states that memory-backup.sh only manages seven workspace markdown files plus memory/*.md and enforces path safety and pre-restore backups. On restore, however, apply_merge has an unrestricted else branch that writes any relative file listed in manifest.json anywhere inside WORKSPACE_DIR without backing up non-memory files first, uses a prefix check without a trailing slash (allowing symlinks to sibling directories whose names start with WORKSPACE_DIR), creates parent directories before checking the resolved path, and does not check whether the destination file itself is a symlink pointing outside the workspace.

    Fix: Allow only the seven expected workspace markdown files and direct *.md children of memory/, append a trailing slash to resolved_base in the prefix check, validate paths before mkdir -p, and refuse to write through symlinks.

  5. LowAI PPT login script echoes auth codes and prints invalid secret input to agent output

    skills/baidu-wenku-aippt-personal/scripts/login.sh:154

    Unlike baidu-drive/scripts/login.sh (which uses silent input and redacts the code), baidu-wenku-aippt-personal/scripts/login.sh reads AUTH_CODE without -s and prints the full input in an error message whenever format validation fails. If a user accidentally pastes a password, token, full OAuth URL, or an authorization code with extra whitespace, the secret is echoed to terminal output where the AI agent can capture it into conversation context.

    Fix: Match baidu-drive/scripts/login.sh by using read -r -s AUTH_CODE, removing AUTH_CODE from error messages, and redacting AUTH_CODE from any CLI error output.

  6. LowBackground download instructions write to predictable /tmp log paths and leak logs due to PID mismatch

    skills/baidu-drive/SKILL.md:207

    For downloads larger than 50 MB, SKILL.md instructs the agent to redirect output to /tmp/bdpan-dl-$$.log (using the parent shell PID $$) in world-writable /tmp, while subsequent polling and cleanup steps reference /tmp/bdpan-dl-<PID>.log using $! (the background process PID). This leaves predictable log files uncleaned in /tmp and exposes a local symlink attack surface on systems without symlink protections.

    Fix: Create the log file with mktemp before starting nohup, store and reuse that exact path for status checks and cleanup, and set restrictive file permissions.