T08 · Insecure Dependencies
- Location
SKILL.md:13- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Bilibili downloader appears purpose-aligned, but it needs Review because it handles session cookies and writes remote-content-based filenames without enough safety guidance or safeguards.
Review before installing. Use a virtual environment, pin and review the bilibili-api-python dependency, keep BILIBILI_SESSDATA out of code and tracked config files, treat that cookie like a password, and download only into a dedicated directory with enough disk space. Be cautious on Windows or shared systems because remote video titles can influence output filenames.
SKILL.md:13Unpinned Third-Party Dependency Installation
scripts/download_config.json:7Configuration Encourages Plaintext Session-Cookie Storage
scripts/download_video.py:17Incomplete Sanitization of Remotely Supplied Output Filenames
The code’s primary behavior is specifically downloading every video in a Bilibili playlist/series by playlist ID and saving them as MP4 files. That is broadly related to Bilibili downloading, but the declared description presents a more general downloader focused on individual content types such as videos, audio, subtitles, danmaku, and covers. This chunk does not implement those additional capabilities and instead adds a specific playlist-bulk-download behavior that is not clearly stated in the description. Therefore the description does not accurately represent this code chunk.
The declared description presents a broader multi-format Bilibili downloading capability, including audio, subtitles, danmaku, covers, and download preference management. The actual code chunk is much narrower: it instantiates a bilibili_api video object, fetches metadata for the title, and downloads a single video file to disk, optionally using a specified quality. This is aligned with part of the description (video downloading in various qualities), but it does not implement most of the other declared capabilities. Additionally, the script usage claims it accepts a BVID or URL, but the implementation passes the first argument directly as bvid to video.Video, so URL handling is not shown. Therefore the description overstates what this code chunk actually does.
The code is clearly related to the declared Bilibili downloading purpose, so there is strong alignment at a high level. However, the declared description explicitly includes downloading audio and danmaku, while this code only downloads the video, cover, and subtitles. It also supports configuration such as output directory and default quality. There is no evidence of unrelated behavior or undeclared sensitive access. The mismatch is therefore an overstatement of capabilities in the description relative to the supplied code chunk.
Without declared permissions the skill's intent is opaque and cannot be validated.
The authentication section instructs users to export a live session cookie into an environment variable without warning that it is a sensitive credential equivalent to account access. If exposed through shell history, logs, process listings, or agent telemetry, the cookie could be reused to access the user's Bilibili account and premium content.
The guide instructs users to place a live Bilibili session cookie (SESSDATA) into an environment variable or directly into code, but gives no warning that this value is a sensitive credential equivalent to account access. In a downloader skill context, users are likely to copy/paste real session tokens, increasing the chance of credential leakage through shell history, source control, logs, screenshots, or shared scripts.
The manifest describes downloading videos, audio, subtitles, covers, and related assets from Bilibili, but does not mention playlist or series bulk-download functionality. This file specifically enumerates all videos in a playlist and downloads them in sequence, expanding the skill’s operational scope beyond the described per-item download behavior.
The skill encourages writing downloaded media to local paths but does not warn users or agents that running it will modify local storage and may consume significant disk space. In an agent setting, this can lead to unintended filesystem changes, overwriting files, or storage exhaustion if invoked without adequate notice or path controls.
The file's natural-language instructions are entirely in Chinese and do not indicate that the skill is region-specific or provide an alternative language option. Per SQP-3, forcing a specific language without user opt-in can be a language/locale policy concern when no justification or choice is given.
This JSON manifest includes natural-language labels such as "杜比视界" alongside English labels, effectively fixing part of the user-facing configuration to a specific locale without any documented opt-in or alternative. The policy requires flagging language or locale constraints when no user choice is offered.
This code fetches playlist metadata and video download URLs from a remote service and writes downloaded media files to disk, but it only documents usage and progress. There is no explicit warning that running the script will contact Bilibili and save multiple files locally, which is a safety-relevant side effect for a downloader script.
No suspicious patterns detected.