T08 · Insecure Dependencies
- Location
scripts/install_check.py:9- Finding
Runtime Installation Uses an Ambiguous Distribution Name
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but its dependency installers are under-disclosed and can install unpinned or ambiguous third-party packages into the user's Python environment.
Review before installing. Use an isolated virtual environment, avoid running the included install_check.py or install_deps.sh as-is, install only reviewed pinned dependencies, and treat generated Markdown as containing untrusted public Bilibili user content.
scripts/install_check.py:9Runtime Installation Uses an Ambiguous Distribution Name
scripts/install_deps.sh:5Unpinned and Unnecessary Third-Party Packages Are Installed
scripts/analyze_video.py:317Untrusted Bilibili Content Is Embedded into Markdown Without Adequate Escaping
The skill documentation describes capabilities that perform network access, write reports to disk, and invoke a Python script, but it does not declare any explicit tool scope or permission boundaries. This creates an authorization gap: an agent or platform may allow broader execution than users expect, increasing the risk of unintended network requests, local file creation, or shell/script execution without clear consent.
The skill is designed to collect comments, danmaku, usernames or user-associated content, and then analyze them, but the description does not warn users that third-party user-generated data will be gathered and processed. This is risky because users may unknowingly trigger collection of personal or behavioral data, creating privacy, compliance, and trust issues even if the source is public.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def get_video_info(bvid: str) -> dict:
url = f"https://api.bilibili.com/x/web-interface/view?bvid={bvid}"
resp = requests.get(url, headers=DEFAULT_HEADERS, timeout=10)
data = resp.json()
if data['code'] == 0:
This code fetches video metadata, danmaku, and comments from Bilibili over HTTP and then processes user-generated content, but it provides no explicit disclosure that remote requests will be made and third-party content will be collected. The progress prints only state that data is being fetched, not that public user comments/danmaku are being transmitted to or retrieved from external services for analysis.
The generated report section is titled '视频简介', implying it will show the video's description. However, the code uses the first danmaku text instead of the actual video description whenever danmakus are present, which directly contradicts the label and misrepresents the data source.
The manifest describes collecting B站 comments/danmu and generating a structured analysis report, but it does not mention persisting output to disk. The code accepts an output path and writes the full report to a local file, which is a behavior expansion beyond purely in-memory analysis/report generation.
Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.
missing = []
for lib in required:
try:
__import__(lib)
print(f"[OK] {lib}")
except ImportError:
missing.append(lib)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if missing:
print("\n正在安装缺失的库...")
for lib in missing:
subprocess.check_call([sys.executable, '-m', 'pip', 'install', lib])
print("\n安装完成!")
else:
print("\n所有依赖已安装!")
The dependency specification uses a lower-bound only constraint for requests, which makes builds non-reproducible and can unintentionally pull in vulnerable or breaking future releases. In a skill that fetches remote B站 data over HTTP, the networking library is security-relevant, so lack of pinning modestly increases supply-chain and patch-management risk.
# 无需登录版 - 使用B站公开API
# 核心依赖
requests>=2.28.0
jieba>=0.42.1
snownlp>=0.15.2
The manifest includes requests without an exact version, while the package has multiple known advisories across some releases. Because the installed version is unverifiable from this file, there is a real risk that deployments may resolve to an affected version, especially across different build times or environments.
The jieba dependency is not pinned to an exact version, so different environments may install different releases. This is primarily a reproducibility and supply-chain hygiene issue rather than an immediately exploitable flaw, but it can still introduce unreviewed code changes or vulnerable transitive behavior over time.
# 核心依赖
requests>=2.28.0
jieba>=0.42.1
snownlp>=0.15.2
# 可选依赖 (用于词云等扩展功能)
The snownlp package is specified with a minimum version only, allowing future installations to resolve to different versions than originally tested. For an analysis skill processing untrusted text content, keeping NLP libraries deterministic reduces the chance of silently introducing insecure or unstable package updates.
# 核心依赖
requests>=2.28.0
jieba>=0.42.1
snownlp>=0.15.2
# 可选依赖 (用于词云等扩展功能)
# pandas>=2.0.0
The skill description and user-facing CLI strings are written entirely in Chinese, which effectively forces a specific language without any opt-in or documented locale constraint. Under the stated policy, language restrictions should either be optional for the user or explicitly justified as region-specific.
The script writes the full generated report to an arbitrary output path when --output is provided, but there is no prior warning in the argument help, docstring, or prompt that a local file will be created or overwritten. The post-write print confirms completion, but it does not disclose the file-write behavior before it occurs.
The module docstring is written only in Chinese ("检查依赖是否安装"), and the script's user-facing messages are also exclusively Chinese, which imposes a specific language choice without offering an alternative. The policy calls for flagging language or locale constraints when they are forced without user opt-in or documented justification.
No suspicious patterns detected.