Back to skill

Security audit

AI B站信息源

Security checks for vulnerabilities and agentic risk

Overview

The skill has a real Bilibili report purpose, but its scheduled subscription, credential handling, HTML generation, hardcoded key, and people-investigation mode need Review before use.

Review carefully before installing. Use only a revocable, low-scope RedFox key; avoid enabling subscription until the scheduler and plaintext key storage are fixed; do not share generated reports if they may contain untrusted content; and avoid the person-background investigation mode unless the publisher adds clear privacy safeguards and user controls.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
assets/daily_report.py:816
Finding

Stored HTML and Script Injection in Automatically Opened Reports

Content
View full analysis
' articles_html += f'''
{cover_html}
{title}
{author} 🔗 {shares} 👍 {likes} 💬 {comments}
''' cards_html += f'''
{i:0 ...[truncated 3281 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/daily_report.py:1177
Finding

Shell Command Injection in Persistent Task Installation and Removal

Content
View full analysis
/dev/null; echo "{cron_line}") | crontab -', shell=True, check=True, capture_output=True ) ``` Subscription removal repeats the unsafe interpolation: ```python else: script_path = os.path.abspath(__file__) try: subprocess.run( f'crontab -l 2>/dev/null | grep -v "{script_path}" | crontab -', shell=True, check=True, capture_output=True ) ``` ### Technical Analysis `script_path` is obtained from `__file__`, but a filesystem path is not inherently safe for insertion into a shell command. The project can be installed under a directory whose name contains quotation marks, command substitutions, shell separators, newlines, or other metacharacters. Because both calls use `shell=True`, the shell parses the interpolated path as command syntax rather than treating it exclusively as data. The path is also inserted into a `grep` regular expression during removal without shell quoting or regular-expression escaping. This behavior exceeds the minimum privilege required to modify a user's crontab. Python can read, modify, and submit the crontab without invoking a shell. ### Attack Path 1. An attacker distributes or places the Skill under a crafted path containing shell metacharacters. 2. The user explicitly requests subscription installation or removal. 3. The script obtains the crafted path through `os.path.abspath(__file__)`. 4. The pat ...[truncated 901 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
assets/daily_report.py:1124
Finding

API Key Stored in Plaintext LaunchAgent Configuration

Content
View full analysis
EnvironmentVariables {ENV_KEY} {api_key} """ plist_content = f''' Label {PLIST_LABEL} ProgramArguments /usr/bin/python3 {script_path} --date today StartCalendarInterval Hour 9 Minute 0 StandardOutPath {log_path} StandardErrorPath {log_path} RunAtLoad {env_section} ''' plist_path.write_text(plist_content, encoding="utf-8") ``` ### Technical Analysis When the user enables the subscription on macOS, the script copies `REDFOX_API_KEY` from the process environment into a persistent plist under `~/Library/LaunchAgents`. The secret is stored as ordinary plaintext. The call to `write_text()` does not explicitly enforce restrictive permissions. Exposure therefore depends on the user's current umask, existing file permissions, backups, synchronization tools, endpoint indexing, and access by other user-level processes. The implementation also inserts the key into XML without XML escaping. A key containing XML metacharacters could corrupt the plist, although n ...[truncated 1209 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/investigator-config.json:5
Finding

Hardcoded Shared API Key in Distributed Configuration

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (57)

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · assets/daily_report.py (reported line 172)May include surrounding context.

python
用户配置并退出
    error(f"未检测到 {ENV_KEY},请先配置 API Key:")
    if sys.platform == "win32":
        print(f"  Windows PowerShell: [Environment]::SetEnvironmentVariable('{ENV_KEY}', 'ak_你的密钥', 'User')")
    else:
        print(f"  macOS/Linux (zsh):  echo 'export {ENV_KEY}=ak_你的密钥' >> ~/.zshrc && source ~/.zshrc")
        print(f"  macOS/Linux (bash): echo 'export {ENV_KEY}=ak_你的密钥' >> ~/.bashrc && source ~/.bashrc")
    print(f"  免费注册获取 Key: https://redfox.hk/login")
    print()
    sys.exit(1)


# ─── 数据获取 ──────────────────────────────────────────────────────────────────────
def fetch_batch(session, keywords, keyword, start_time=None, end_time=None):
    """批量获取多关键词的视频数据(新 batch 接口)

    Args:
        keywords: 关键词

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The report-generation path injects the API key into the generated HTML via html.replace("{{API_KEY}}", api_key or ""). This can expose the credential to anyone who opens, shares, uploads, or inspects the report file, turning a local report into a secret-leak vector.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Embedding the API key into HTML without a prominent user-facing warning causes silent credential disclosure. Because the file is saved to a common user directory and then opened in a browser, the chance of accidental sharing or local exposure is substantial.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The subscription installer writes the API key into a LaunchAgent plist EnvironmentVariables block, persisting the secret on disk without clear disclosure. This increases the attack surface because local users, backups, support bundles, or malware may later recover the credential from the plist.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The subprocess call uses shell=True with string interpolation of script_path into a shell pipeline, enabling tool-parameter abuse and command injection if the path contains crafted shell syntax. Because the command rewrites crontab entries, exploitation could both execute arbitrary commands and alter persistence state.

Content

Scanner excerpt · assets/daily_report.py (reported line 1210)May include surrounding context.

python
else:
        script_path = os.path.abspath(__file__)
        try:
            subprocess.run(
                f'crontab -l 2>/dev/null | grep -v "{script_path}" | crontab -',
                shell=True, check=True, capture_output=True
            )

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/report_template.html (reported line 8)May include surrounding context.

html
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>B站AI信息源 - {{DATE}}</title>

<!-- Fonts: Archivo Black (display) + Space Grotesk (body) -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Archivo+Black&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The '人物背景调查' section explicitly instructs the agent to profile individuals, verify biography and reputation, and search for controversy or lawsuits. For a skill whose stated purpose is Bilibili AI feed/report generation, this is unjustified and materially more dangerous because it enables doxxing-adjacent behavior, reputational screening, and collection of sensitive personal information outside the skill's legitimate scope.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The人物背景调查报告 template introduces a person-investigation capability that is not aligned with a B站 AI information-source skill and can facilitate profiling of individuals, collection of reputation signals, location, education, disputes, and litigation data. In context, this is more dangerous because the skill presents itself as a media/topic intelligence tool, so hidden person-background workflows can be invoked without clear user expectation, consent boundaries, or safeguards against privacy abuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The configuration embeds a default API key and a remote record-saving endpoint, indicating that collected investigation data may be transmitted off-platform without clear user-facing disclosure or consent. This is dangerous because sensitive queries, investigation targets, and derived records could be exfiltrated to a third-party service, and the hardcoded default credential may also be abused by anyone with access to the skill artifacts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The '人物背景调查' mode enables background investigations on individuals, which is not justified by the declared purpose of producing B站 AI content reports. In this context, the capability creates a heightened risk of doxxing, privacy intrusion, profiling, or misuse of the skill for surveillance of real people without meaningful user warning or purpose limitation.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · README.en.md (reported line 13)May include surrounding context.

md
- **Precise Trending Discovery**: Filters high-engagement AI videos from Bilibili, ensuring no important daily AI updates are missed.
- **Auto Topic Clustering**: Intelligently identifies directions such as AI tutorials, large models, and AI art — categories are determined dynamically by the day's content, no manual sorting needed.
- **In-depth Intelligence Investigation**: Automatically performs multi-search-engine cross-validation on hot topics and delivers structured reports with credibility labels.
- **One-click Visualization**: Dark-themed HTML daily report with cover images, engagement data, and video links for a clear overview of daily AI trending content.

**Target Audience**

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The feature description mentions daily subscription and cumulative local saving, but it does not prominently warn users that enabling subscription causes automatic recurring local storage. Users may unknowingly create persistent files, consume disk space, or retain potentially sensitive query history and generated reports on the device.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README instructs users to invoke the skill through open-ended natural language without clearly constraining allowed operations or requiring confirmation for sensitive actions like subscriptions or local file generation. In a tool that can fetch external data, generate HTML, and enable recurring tasks, broad invocation guidance increases the chance of unintended actions, prompt ambiguity, or abuse through overly permissive requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The subscription feature is described as automatically generating reports and saving them to a local folder, but the README does not clearly warn users about ongoing background file writes, storage growth, or where data will be written. This reduces transparency and can cause persistent local side effects that users may not expect, especially if reports include externally sourced content or accumulate over time.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The invocation guidance is broad enough that the skill may be triggered for a wide range of loosely related phrases, increasing the chance of accidental activation. In this skill's context, accidental activation could lead to unintended external queries, report generation, or local output creation that the user did not specifically request.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README instructs the skill to automatically fetch the latest date with available data, which conflicts with the stated requirement that if the requested target date has no data, the user must first be informed and explicit confirmation obtained before any API call. This can cause unauthorized or unexpected data retrieval, violating user-consent and control expectations in a way that may trigger external requests without approval.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes shell commands, reads environment variables for API keys, performs network requests, and writes files, but it does not declare any explicit tool scope such as allowed-tools or permissions. This creates an overly broad and opaque execution boundary: a host agent may enable powerful capabilities without users or reviewers being able to verify what the skill is supposed to access, increasing the risk of command execution, unintended data exposure, and filesystem modification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation text contains broad trigger phrases such as requests related to AI-B站日报, 爆款, 热点, 情报, and custom keyword queries, which can cause the skill to activate for loosely related user requests. In combination with shell and network behavior, ambiguous activation increases the chance of unintended execution, external requests, and data processing when the user did not clearly consent to using this specific skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly performs automatic multi-engine web searches and cross-validation based on user topics and clustered report topics, but it does not clearly warn users that their queries or derived topics will be transmitted to external search engines. This is a privacy and consent issue: sensitive interests, internal project names, or proprietary keywords provided by the user could be sent to third-party services without sufficiently explicit notice at the point of use.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 46)May include surrounding context.

python
# 15:00前:最新可用日期 = T-2;15:00后:最新可用日期 = T-1
DATA_UPDATE_HOUR = 15  # 数据更新时间(小时)

PLIST_LABEL = "com.qoder.bili-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 47)May include surrounding context.

python
# 15:00前:最新可用日期 = T-2;15:00后:最新可用日期 = T-1
DATA_UPDATE_HOUR = 15  # 数据更新时间(小时)

PLIST_LABEL = "com.qoder.bili-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1118)May include surrounding context.

python
# 15:00前:最新可用日期 = T-2;15:00后:最新可用日期 = T-1
DATA_UPDATE_HOUR = 15  # 数据更新时间(小时)

PLIST_LABEL = "com.qoder.bili-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1119)May include surrounding context.

python
# 15:00前:最新可用日期 = T-2;15:00后:最新可用日期 = T-1
DATA_UPDATE_HOUR = 15  # 数据更新时间(小时)

PLIST_LABEL = "com.qoder.bili-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1136)May include surrounding context.

python
# 15:00前:最新可用日期 = T-2;15:00后:最新可用日期 = T-1
DATA_UPDATE_HOUR = 15  # 数据更新时间(小时)

PLIST_LABEL = "com.qoder.bili-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1140)May include surrounding context.

python
# 15:00前:最新可用日期 = T-2;15:00后:最新可用日期 = T-1
DATA_UPDATE_HOUR = 15  # 数据更新时间(小时)

PLIST_LABEL = "com.qoder.bili-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

Static analysis

No suspicious patterns detected.