Back to skill

Security audit

bilibili-all-in-one

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent Bilibili automation, but it needs review because it handles full browser-session cookies, can persist them in plaintext, and can make account-changing uploads or draft edits.

Install only if you are comfortable giving the skill account-level Bilibili session cookies and letting it perform publisher actions on your behalf. Prefer a dedicated test account, avoid persistence, do not put .credentials.json in a shared or version-controlled workspace, and run dependencies in an isolated virtual environment with reviewed versions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:108
Finding

Unpinned Third-Party Dependencies Installed at Runtime

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 108–113
Vulnerability Type: Unpinned and unverifiable runtime dependencies
Risk Level: Medium

Vulnerable Code Snippet:

bash
pip install httpx aiohttp beautifulsoup4 lxml requests
# Optional: speech-recognition subtitle fallback
pip install faster-whisper
# Optional: video stream merging
# Install ffmpeg on the operating system

Technical Analysis

The installation instructions use pip install without exact version constraints, package hashes, a lockfile, or a designated trusted package index. Dependency resolution therefore changes over time and may install releases that were not reviewed with this Skill.

Python package installation can execute package build or installation logic. If an upstream package or one of its transitive dependencies is compromised, invoking these instructions could execute attacker-controlled code with the privileges of the Agent process. The project contains no dependency manifest or executable implementation that would allow auditors to reproduce and verify the intended dependency graph.

This finding does not establish that any named package is currently malicious. The vulnerability is the absence of controls ensuring that the installed artifacts are the same artifacts that were reviewed and tested.

Attack Path

  1. An upstream package account, release process, distribution artifact, or transitive dependency is compromised.
  2. The attacker publishes a malicious version that satisfies the unconstrained dependency request.
  3. An Agent or user follows the Skill instructions and runs the provided pip install command.
  4. Pip resolves the malicious release because no exact version or hash is required.
  5. Malicious build, installation, or imported runtime code executes in the Agent environment.

Impact Assessment

Successful exploitation could execute arbitrary code with the operating-system privile ...[truncated 534 chars]

Remediation
View remediation

Remediation Suggestions

  1. Provide a reviewed dependency manifest with exact versions for all direct and transitive dependencies.
  2. Generate and enforce cryptographic hashes, such as with pip-compile --generate-hashes followed by pip install --require-hashes.
  3. Use a lockfile and update dependencies through a controlled review process.
  4. Explicitly specify an approved HTTPS package index and disable unexpected extra indexes.
  5. Install dependencies in a dedicated virtual environment or restricted container rather than the Agent's global environment.
  6. Run automated vulnerability and provenance checks against every locked dependency.
  7. Document the expected ffmpeg source and version instead of directing users to install an unspecified system package.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:129
Finding

Plaintext Persistence of Account-Equivalent Session Credentials

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 129–148
Vulnerability Type: Plaintext storage of sensitive session credentials
Risk Level: Medium

Vulnerable Code Snippet:

bash
export BILIBILI_SESSDATA="your_sessdata"
export BILIBILI_BILI_JCT="your_bili_jct"
export BILIBILI_BUVID3="your_buvid3"
json
{
  "sessdata": "your_sessdata",
  "bili_jct": "your_bili_jct",
  "buvid3": "your_buvid3"
}
python
app = BilibiliAllInOne(
    sessdata="your_sessdata",
    bili_jct="your_bili_jct",
    buvid3="your_buvid3",
)

The Skill further specifies that enabling BILIBILI_PERSIST=1 or BilibiliAllInOne(persist=True) stores these values in .credentials.json in the current directory.

Technical Analysis

The Skill supports persisting complete Bilibili browser-session cookies in a predictable plaintext file. File mode 0600, as claimed by the documentation, limits ordinary access by other operating-system users but does not encrypt the credentials or protect them from processes running under the same account.

Storing the file in the current working directory also increases the possibility that it will be included in a repository commit, workspace archive, automated backup, support bundle, or Agent artifact collection. The document advises users to add the file to .gitignore, but the reviewed project does not include a .gitignore.

SESSDATA and bili_jct are identified by the Skill itself as complete session credentials with account-equivalent authority. Their compromise is consequently more serious than disclosure of a narrowly scoped API key.

The project does not include the referenced implementation. Auditors therefore cannot verify that mode 0600 is applied before credential data is written, that symbolic links are rejected, that file paths are constrained, or that credentials are redacted from errors and logs.

Attack Path

  1. A user supplies ...[truncated 1418 chars]
Remediation
View remediation

Remediation Suggestions

  1. Keep session credentials in memory by default and clearly discourage persistence of primary-account credentials.
  2. When persistence is necessary, use the operating system's credential manager or an encrypted secret store rather than a plaintext JSON file.
  3. Store credential references, not raw cookie values, in project configuration.
  4. Use a fixed per-user configuration directory outside the project workspace, with restrictive directory and file permissions.
  5. Create files atomically with exclusive creation, reject symbolic links, and apply restrictive permissions before writing sensitive content.
  6. Include .credentials.json in a supplied .gitignore and add automated secret scanning or pre-commit protection.
  7. Ensure logs, exceptions, command output, callbacks, and serialized results redact all cookie values.
  8. Provide explicit credential revocation and rotation instructions and recommend short-lived, minimally privileged test accounts.
  9. Add tests verifying permissions, path handling, deletion behavior, log redaction, and resistance to symbolic-link attacks.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

)

text

**持久化 (可选)**: 默认凭据仅存内存,设置 `BILIBILI_PERSIST=1` 或 `BilibiliAllInOne(persist=True)` 后自动保存到 `.credentials.json` (0600权限),下次启动自动加载,运行时可用 `app.auth.persist = True/False` 切换,`app.auth.clear_persisted()` 删除文件.
## 模块凭据要求

| 模块 | 是否需要凭据 | 说明 |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

)

text

**持久化 (可选)**: 默认凭据仅存内存,设置 `BILIBILI_PERSIST=1` 或 `BilibiliAllInOne(persist=True)` 后自动保存到 `.credentials.json` (0600权限),下次启动自动加载,运行时可用 `app.auth.persist = True/False` 切换,`app.auth.clear_persisted()` 删除文件.
## 模块凭据要求

| 模块 | 是否需要凭据 | 说明 |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

)

text

**持久化 (可选)**: 默认凭据仅存内存,设置 `BILIBILI_PERSIST=1` 或 `BilibiliAllInOne(persist=True)` 后自动保存到 `.credentials.json` (0600权限),下次启动自动加载,运行时可用 `app.auth.persist = True/False` 切换,`app.auth.clear_persisted()` 删除文件.
## 模块凭据要求

| 模块 | 是否需要凭据 | 说明 |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

)

text

**持久化 (可选)**: 默认凭据仅存内存,设置 `BILIBILI_PERSIST=1` 或 `BilibiliAllInOne(persist=True)` 后自动保存到 `.credentials.json` (0600权限),下次启动自动加载,运行时可用 `app.auth.persist = True/False` 切换,`app.auth.clear_persisted()` 删除文件.
## 模块凭据要求

| 模块 | 是否需要凭据 | 说明 |

Ssd 3

High
Category
Not specified by scanner
Confidence
80% confidence
Finding

This line tells the user to log in via a browser and extract three cookies for use by the tool, including reuse of a full authenticated session. In context with the later note that these cookies are equivalent to password-level access, this is a natural-language instruction to collect and use highly sensitive authentication data.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
84% confidence
Finding

This line confirms that SESSDATA and bili_jct are full browser session cookies with account-password-level privileges. Combined with earlier setup instructions for passing them via environment variables, JSON, direct parameters, and optional persistence, the file semantically promotes handling and reuse of extremely sensitive user-provided secrets.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file documents a callback_url parameter for asynchronous completion notifications, which implies sending execution results to a user-supplied network endpoint. The description does not warn that using this option may transmit task data off-platform or disclose potentially sensitive output to third parties.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill's core documentation consistently describes authentication via Bilibili session cookies such as SESSDATA, bili_jct, and buvid3 (L085, L121-L148, L264-L265). But L068-L069 and L357-L359 instruct users to configure an 'API Key', which is materially different from the actual credential type and could mislead users about the sensitivity and scope of the secrets involved. This is an intent/documentation contradiction rather than a mere omission, because the file elsewhere explicitly says these are not limited API keys.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill description states that the publisher module can upload videos, schedule publication, and edit drafts, which are account-affecting operations with real external consequences. Although credential requirements are described, there is no prominent warning here that these actions may modify account state or publish content on the user's behalf.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The natural-language content of the skill, including display name, summary, description, instructions, and examples, is effectively Chinese-only. There is no indication that the user can opt into another language or that the locale limitation is a documented requirement of the skill.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

L225 states that all HTTP requests are sent only to official Bilibili domains and not to any third-party services. However, elsewhere the skill documents an optional subtitle fallback using faster-whisper (L083, L112-L113, L253-L254), which introduces an additional processing path outside the narrowly stated 'only Bilibili domains' claim. Even if faster-whisper is local inference, the wording at L225 is overbroad and creates intent-level ambiguity about non-Bilibili dependencies.

Content

No source excerpt is available for this finding.