Back to skill

Security audit

股票数据接口服务

Security checks across malware telemetry and agentic risk

Overview

This stock-data skill is not clearly malicious, but it needs review because it asks for a third-party API key, stores it in a local .env file, and contains confusing leftover Gaokao/XBY configuration.

Install only if you trust the Xiaobenyang service and are comfortable giving it an API key. Treat the key as a secret: avoid using a valuable shared key, check or remove the generated .env entry after use, and rotate the key if this skill was run in a shared or synced workspace.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (17)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill documentation instructs the model to read environment configuration, persist an API key via file write operations, and call remote services, yet it declares no permissions. This creates a transparency and consent problem: users and hosting platforms may not realize the skill can access credentials, modify local files such as .env, and perform network egress.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill presents itself as an akshare-based stock data interface, but the documented behavior includes collecting a user API key, storing it locally, and relying on a third-party remote service. This mismatch can mislead users about data flow and trust boundaries, causing them to disclose credentials under false assumptions about whether processing is local/direct or sent to an external provider.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
该配置模块与“股票数据接口服务”的声明明显不一致:它硬编码了“小笨羊高考/XBY”前缀、默认 URL、mcp_id,并实现了专门的 API 密钥读取与持久化逻辑。这种跨项目/跨服务的残留配置会把本技能收集到的凭据导向不相干的外部服务,造成凭据误用、错误路由或秘密泄露风险。

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
该代码为 API key 提供本地持久化写入 .env 的能力,而从技能描述看,这只是一个读取型股票数据接口服务,并无明显必要在运行时修改本地凭据文件。运行时写入凭据会扩大秘密暴露面,可能导致凭据被源码目录、备份、日志、容器层或误提交版本库所泄露。

Intent-Code Divergence

Medium
Confidence
89% confidence
Finding
类文档字符串声明为“小笨羊高考Skill配置”,与当前股票数据服务的用途直接冲突。这种意图不一致通常意味着复制粘贴的残留代码或错误复用,增加把错误凭据、错误接口和错误业务逻辑接入当前技能的概率,进而引发凭据泄露和数据流向错误目标。

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill requires the user to provide an API key and explicitly save it, but it does not warn about storage location, persistence, access scope, or exposure risks. In this context, the danger is elevated because the instructions specifically mention saving the credential through a config function and imply .env persistence, which can leak secrets through local file access, backups, logs, or multi-tenant environments.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
代码会在没有任何用户提示或确认的情况下,将 API key 明文持久化到 .env 文件。明文落盘的凭据很容易被本地其他进程、共享工作区、调试输出、镜像层或误提交的仓库访问,尤其在代理/技能运行环境中风险更高。

Credential Access

High
Category
Privilege Escalation
Content
default_year: int = 2025

    def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
Confidence
91% confidence
Finding
.env

Credential Access

High
Category
Privilege Escalation
Content
def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
            for line in content.splitlines():
Confidence
91% confidence
Finding
.env"

Credential Access

High
Category
Privilege Escalation
Content
def save_api_key_to_env(api_key: str) -> bool:
    """将API key保存到.env文件"""
    try:
        env_path = Path(".env")
        lines = []
        if env_path.exists():
            lines = env_path.read_text(encoding="utf-8").splitlines()
Confidence
95% confidence
Finding
.env"

Credential Access

High
Category
Privilege Escalation
Content
def set_api_key(api_key: str) -> bool:
    """设置API key并持久化到.env"""
    if not api_key or not api_key.strip():
        return False
    api_key = api_key.strip()
Confidence
93% confidence
Finding
.env"

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
95% confidence
Finding
requests>=2.31.0

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
94% confidence
Finding
pydantic>=2.7.0

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
94% confidence
Finding
pydantic-settings>=2.2.0

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
95% confidence
Finding
python-dotenv>=1.0.1

Known Vulnerable Dependency: requests==2.31.0 — 3 advisory(ies): CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi); CVE-2026-25645 (Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility func)

Low
Category
Supply Chain
Confidence
97% confidence
Finding
requests==2.31.0

Known Vulnerable Dependency: python-dotenv==1.0.1 — 1 advisory(ies): CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via )

Low
Category
Supply Chain
Confidence
89% confidence
Finding
python-dotenv==1.0.1

VirusTotal

65/65 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

No suspicious patterns detected.