Back to skill

Security audit

QAnon帖子分析服务

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be an API-backed QAnon dataset tool, but it mixes in unrelated Gaokao/XiaoBenYang school-service artifacts and stores API keys in plaintext, so users should review it before installing.

Install only if you trust the XiaoBenYang API service and are comfortable giving it an API key. Treat the key as a real credential: avoid using a highly privileged key, check or remove the local .env file when done, and be aware that the package contains unrelated Gaokao/school-service remnants that should be corrected before broad use.

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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Lp3

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding
The skill declares no permissions while its documented behavior requires reading environment variables, writing a local .env file, and making network calls. This under-declaration is dangerous because it hides the real trust boundary from users and reviewers, especially since it also handles secrets and persists them locally.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill claims to be a QAnon dataset access service, but its documented behavior includes collecting an API key, persisting it locally, and acting as a generic remote API client for an external service. This mismatch obscures data flow and external dependencies, making it easier to obtain credentials under misleading pretenses.

Intent-Code Divergence

Medium
Confidence
87% confidence
Finding
The workflow example instructs calling an unrelated school-search function, which indicates copy-paste errors or incorrect routing guidance in a skill that already handles credentials and external API calls. Misdocumented tool usage can cause the agent to invoke unintended functionality or send user data to the wrong endpoint if matching code exists elsewhere.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The configuration is clearly for an unrelated external service ('小笨羊高考') while the declared skill is a QAnon post analysis service. This mismatch strongly suggests hidden or repurposed functionality that can redirect credentials or requests to an unexpected backend, violating user expectations and creating a supply-chain style trust risk.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill persists API keys to a local .env file even though the described functionality is dataset access and analysis, not credential management. Storing secrets on disk expands exposure to local compromise, accidental inclusion in backups or repositories, and unexpected retention beyond the current session.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The class docstring labels this as '小笨羊高考Skill配置', directly contradicting the advertised QAnon analysis purpose. In security review, this kind of identity mismatch is a strong indicator of copied, mislabeled, or intentionally disguised code and makes hidden data flow to an unrelated service more dangerous.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill instructs the agent to ask the user for an API key and save it locally, but provides no warning about local persistence, access scope, retention, or who can read the stored credential. This creates a secret-handling risk because users may disclose credentials without informed consent and the key may remain accessible on disk beyond the immediate session.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The code writes the API key into .env without any user-facing disclosure or consent mechanism. Users may unknowingly leave long-lived credentials on disk, increasing the chance of theft through local access, source control mistakes, or artifact leakage.

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
90% confidence
Finding
The code forcibly parses .env to extract XBY_APIKEY for an unrelated service, bypassing normal scoped configuration behavior and increasing the chance that local credentials are consumed unexpectedly. In the context of a misbranded skill, this makes secret access more suspicious because it is tied to hidden external-service configuration.

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
90% confidence
Finding
Opening and reading the .env file to pull a specific API key is a direct credential access path. In isolation this can be legitimate, but here it is more dangerous because the secret belongs to an unrelated branded service and is not obviously necessary for the advertised QAnon analysis workflow.

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
92% confidence
Finding
This function explicitly saves an API key into a plaintext .env file, creating a durable local credential store. That is sensitive credential handling and becomes riskier in a skill whose declared purpose does not clearly justify secret persistence.

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
88% confidence
Finding
The function advertises setting and persisting an API key to .env, embedding credential storage as application behavior rather than a deployment concern. This broadens the attack surface by normalizing local plaintext secret retention for end users.

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
The dependency is specified with a lower bound only, so builds may resolve to different versions over time. This weakens reproducibility and can unintentionally introduce vulnerable or incompatible releases through normal dependency updates or supply-chain compromise.

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
Using an unpinned version range for pydantic allows dependency resolution to drift across environments and over time. That increases supply-chain risk and makes it easier for a newly introduced vulnerable release to be pulled in without code changes.

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
The package version is not fixed, so installations are not deterministic and may consume future releases with undiscovered flaws. In a server component, that creates ongoing supply-chain exposure even if the current code is otherwise safe.

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
An unpinned python-dotenv dependency can resolve to different versions across deployments, increasing the chance of pulling a vulnerable or breaking release. Because dotenv libraries often interact with local configuration and filesystem state, version drift can have security consequences.

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
92% confidence
Finding
The allowed version range includes requests 2.31.0, which is flagged with multiple advisories, including credential leakage via malicious URLs and TLS verification issues on reused Session objects. In a data-access MCP server that likely performs outbound HTTP requests, these flaws are more relevant because remote endpoints or attacker-controlled URLs could influence network behavior and expose secrets or weaken transport security.

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
87% confidence
Finding
The dependency range includes python-dotenv 1.0.1, which is reported as vulnerable to symlink-following file overwrite in set_key. If the service ever writes .env files or exposes configuration-management functionality, an attacker with local influence over file paths or symlinks could potentially overwrite arbitrary files; in a server context, that can lead to configuration tampering or broader compromise.

Static analysis

No suspicious patterns detected.