Back to skill

Security audit

bilibili-search

Security checks across malware telemetry and agentic risk

Overview

This skill is a Bilibili data-collection helper that does what it advertises, but users should treat any optional Bilibili cookies and saved harvest files as sensitive.

Install only if you are comfortable with a Bilibili scraping tool that can use your agent-browser/Bilibili session. Avoid adding SESSDATA or bili_jct unless you need authenticated results, never commit or share cookie files, and periodically delete harvest outputs that contain comments, user IDs, or other collected data.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
84% confidence
Finding
The skill description claims a narrower and more uniform behavior than the body actually documents: it adds danmaku extraction, batch harvesting/report generation, and direct use of the bilibili_api library outside agent-browser. That mismatch weakens operator trust and review accuracy, because users may grant or run the skill under false assumptions about data scope, dependency trust, and execution paths.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README instructs users to store live Bilibili session cookies such as SESSDATA and bili_jct in a local plaintext file, but it does not explicitly warn that these are sensitive authentication credentials equivalent to account access. Even with a chmod 600 example, users may commit the file, back it up insecurely, or expose it in shared environments, enabling account takeover or unauthorized API use if the cookies are stolen.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The documentation instructs users to export and store full Bilibili cookies including session credentials such as SESSDATA and bili_jct in a local file, but does not clearly warn that these are sensitive authentication secrets. If that file is exposed through logs, backups, permissive filesystem access, or accidental commit, an attacker could hijack the user's Bilibili session and act as that account.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The skill persists scraped search/user/video/comment data to disk without any consent prompt, retention notice, or sensitivity labeling. In this context the harvested data can include user identifiers, comments, and potentially account-context-enriched results, creating privacy and data-handling risk if files are later exposed or reused.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The code sends requests with `credentials:'include'`, which causes the browser context's authenticated cookies to be attached to bilibili API calls. Because the skill advertises automatic cookie reuse, users may unknowingly transmit logged-in session context and receive privileged data, increasing privacy risk and the blast radius of any misuse.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The script is explicitly designed to persist scraped Bilibili data, including comments, user metadata, and potentially danmaku, into timestamped local directories. In an agent-skill context this creates a real privacy and data-governance risk because large amounts of third-party content and identifiers are retained on disk without any user-facing notice, retention limit, or minimization control.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This helper performs automated subprocess-driven harvesting of public platform data and stores the results, but there is no consent prompt, warning, or guardrail around privacy-sensitive collection. In this skill context that increases risk because the tool streamlines bulk collection of user-generated content and account information, making misuse or overcollection easier.

External Transmission

Medium
Category
Data Exfiltration
Content
def bvid_to_aid(bvid):
    """BV 号 → aid (通过 web-interface/view 拿)"""
    js = f"""(async () => {{
      const r = await fetch('https://api.bilibili.com/x/web-interface/view?bvid={bvid}', {{credentials:'include'}});
      const j = await r.json();
      return JSON.stringify({{code: j.code, aid: j?.data?.aid, title: j?.data?.title, msg: j.message}});
    }})()"""
Confidence
94% confidence
Finding
This is an intentional external transmission to bilibili's API, but it includes browser credentials and user-supplied identifiers in the request. In a scraping skill, outbound requests are expected; however, the automatic reuse of session cookies makes the transmission materially more sensitive than an ordinary public GET.

External Transmission

Medium
Category
Data Exfiltration
Content
for page in range(1, args.pages + 1):
        js = f"""(async () => {{
          const kw = {json.dumps(keyword)};
          const url = 'https://api.bilibili.com/x/web-interface/search/type'
            + '?search_type=video'
            + '&keyword=' + encodeURIComponent(kw)
            + '&order={args.order}'
Confidence
92% confidence
Finding
The search function transmits user-provided search keywords to an external service, which is expected for this skill, but still constitutes data exfiltration outside the local environment. Because requests run inside `agent-browser` with included credentials, searches can be linked to the user's browser session and account context.

External Transmission

Medium
Category
Data Exfiltration
Content
js = f"""(async () => {{
      const kw = {json.dumps(keyword)};
      const url = 'https://api.bilibili.com/x/web-interface/search/type'
        + '?search_type=bili_user'
        + '&keyword=' + encodeURIComponent(kw)
        + '&page=1&page_size=20';
Confidence
92% confidence
Finding
Username lookup sends externally supplied keywords to bilibili and uses the browser's authenticated context. While this is core functionality rather than covert exfiltration, it still creates privacy risk because operator-provided names or targets are disclosed to the platform and associated with session cookies.

External Transmission

Medium
Category
Data Exfiltration
Content
elif vid.lower().startswith('av'):
        aid = int(vid[2:])
        js = f"""(async () => {{
          const r = await fetch('https://api.bilibili.com/x/web-interface/view?aid={aid}', {{credentials:'include'}});
          const j = await r.json();
          return JSON.stringify({{bvid: j?.data?.bvid, code: j.code}});
        }})()"""
Confidence
90% confidence
Finding
Resolving an `av` identifier to a `bvid` requires an external API request, which is expected behavior for the tool. The risk comes from performing that request in an authenticated browser context without clear consent, not from the API call itself.

External Transmission

Medium
Category
Data Exfiltration
Content
# 详情
    detail_js = f"""(async () => {{
      const r = await fetch('https://api.bilibili.com/x/web-interface/view?bvid={bvid}', {{credentials:'include'}});
      const j = await r.json();
      const v = j?.data;
      if (!v) return JSON.stringify({{code: j.code, msg: j.message}});
Confidence
93% confidence
Finding
Fetching video details from bilibili is necessary for the skill, but it still transmits the target identifier and includes browser credentials. In this skill's context, the danger is elevated by the design goal of automatically reusing `buvid` and other session state, which can expose richer account-linked metadata than users expect.

External Transmission

Medium
Category
Data Exfiltration
Content
if args.comments > 0:
        aid = detail['aid']
        comments_js = f"""(async () => {{
          const r = await fetch('https://api.bilibili.com/x/v2/reply/main?oid={aid}&type=1&mode=3&next=0&ps={args.comments}', {{credentials:'include'}});
          const j = await r.json();
          const replies = (j?.data?.replies || []).map(rp => ({{
            rpid: rp.rpid, uname: rp.member?.uname, mid: rp.member?.mid,
Confidence
94% confidence
Finding
Comment retrieval sends requests to an external API and may return potentially sensitive user-generated content, including usernames, IDs, messages, and location-like metadata. Because the call uses included credentials, both the request and the enriched response are tied to the browser session and increase privacy/compliance risk.

External Transmission

Medium
Category
Data Exfiltration
Content
return 1
    else:
        js = f"""(async () => {{
          const r = await fetch('https://api.bilibili.com/x/web-interface/view?bvid={bvid}', {{credentials:'include'}});
          const j = await r.json();
          return JSON.stringify({{code: j.code, aid: j?.data?.aid, title: j?.data?.title}});
        }})()"""
Confidence
90% confidence
Finding
This API call maps a BVID to an AID as part of comment retrieval flow, so the external transmission is functional rather than malicious. The concern remains that it occurs under implicit cookie reuse and without explicit disclosure about off-host data transfer.

External Transmission

Medium
Category
Data Exfiltration
Content
next_offset = 0
    for page in range(args.pages):
        js = f"""(async () => {{
          const r = await fetch('https://api.bilibili.com/x/v2/reply/main?oid={aid}&type=1&mode=3&next={next_offset}&ps={args.ps}', {{credentials:'include'}});
          const j = await r.json();
          const replies = (j?.data?.replies || []).map(rp => ({{
            rpid: rp.rpid, uname: rp.member?.uname, mid: rp.member?.mid,
Confidence
94% confidence
Finding
Paginated comment fetching repeatedly transmits content targets to bilibili and retrieves user comment data at scale. In a scraping tool, this is expected, but the scale plus credentialed context and optional disk persistence make the privacy and compliance impact more significant than a one-off request.

VirusTotal

65/65 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
bili-fetch.py:14