Back to skill

Security audit

B站关键词搜账号

Security checks for vulnerabilities and agentic risk

Overview

This skill does the advertised Bilibili account search, with manageable cautions around RedFox API-key use and unescaped public profile text in results.

Install only if you are comfortable giving this skill a RedFox API key and sending Bilibili search keywords to RedFox. Treat returned profile names and bios as untrusted public content, and verify important account links or claims before acting on them.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/search_bili_user.py:65
Finding

Untrusted API Profile Data Is Processed and Rendered Without Injection Defenses

Content
View full analysis
list: items = [] for u in users: items.append({ "uid": u.get("uid", 0), "nickname": u.get("nickname", "").strip(), "avatar": normalize_avatar(u.get("avatar", "")), "description": (u.get("description", "") or "").strip(), "fans_num": u.get("fansNum", 0) or 0, "gender": u.get("gender", 3), "level": u.get("level", 0), "is_living": u.get("isLiving", 0) == 1, "is_uploader": u.get("isUploader", 0) == 1, "live_room_id": u.get("liveRoomId", 0), "space_url": build_space_url(u.get("uid", 0)), }) ``` The related workflow instructs the agent to process these fields: ```markdown 获取到账号列表后,AI 必须根据每个账号的 `nickname`(昵称)和 `description`(简介)自动判断其内容方向 ``` It then requires direct Markdown rendering: ```markdown | 1 | [昵称](space_url) | 105.2w | Lv6 | 男 | 21894129 | 简介文字(超30字截断) | 是 | 单机游戏 | ``` The nickname rule further requires the value to be used directly: ```markdown **昵称规则:** `[昵称](space_url)`;昵称直接使用,不截断 ``` ### Technical Analysis The `nickname` and `description` fields are obtained from an external API and ultimately may contain content controlled by Bilibili account owners. The script copies both values into its JSON output without stripping control characters, applying a strict length limit, escaping Markdown syntax, or assigning an explicit untrusted-data classification. The workflow then requires the AI agent to inspect these values for classification and insert them into Markdown out ...[truncated 2490 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README says users can 'simply describe' what they want 'in natural language—no fixed commands to memorize,' which provides no clear activation scope or exclusion conditions. This broad phrasing increases the chance of unintended invocation because many ordinary Bilibili-related requests could match without any defined constraints or negative examples.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The phrase 'Show me more' is a common everyday expression and, without contextual constraints, is ambiguous as a trigger for advancing pagination. Because the document does not specify that this only works within an active Bilibili search session, the trigger can overlap with unrelated conversation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README says users can 'directly use natural language' and '无需记忆固定命令', which makes activation conditions very open-ended. This lacks clear scope, explicit trigger phrases, or exclusion examples, increasing the chance of unintended invocation from ordinary conversation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill metadata declares no explicit tool scope or permission boundaries even though it clearly depends on environment access for API keys and network access for external requests. Without an allowlist such as permissions or allowed-tools, an agent runtime may grant broader capabilities than necessary, increasing the risk of unintended network calls or misuse of sensitive environment data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger description is broad and can activate for general requests about searching B站 accounts, finding creators, or similar accounts, without clear constraints on when the skill should or should not run. Over-broad activation can cause the agent to invoke external networked functionality unnecessarily, send user queries to third-party services unexpectedly, or interfere with safer/more appropriate skills.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow is written as mandatory Chinese interaction, including fixed Chinese prompts such as asking follow-up questions and requiring the user to reply with the Chinese phrase "查看更多". This imposes a specific language/locale on all users and does not offer any language choice or opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest says the skill supports searching accounts sorted either by 综合排序 or 粉丝数排序. However, the workflow explicitly says --order is fixed to fans, that all queries must be output in fan-count descending order, and that the user need not specify sorting. This narrows actual documented behavior below the manifest's claimed functionality.

Content

No source excerpt is available for this finding.