Back to skill

Security audit

跑步计算服务

Security checks for vulnerabilities and agentic risk

Overview

This running calculator skill is not clearly malicious, but it asks for and stores an API key, sends user inputs to a remote service, and contains mismatched copied Gaokao-related code and documentation that make its true scope harder to review.

Install only if you trust the xiaobenyang.com remote service with your running inputs and API key. Expect the skill to store XBY_APIKEY in a local .env file and to send calculation parameters to the remote MCP API. Review or restrict direct access to scripts.call_api before use, and consider deleting the stored key when you are done.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill advertises no declared permissions while its documented/project capabilities imply access to environment variables, file reads/writes, and network calls. This mismatch weakens user/admin ability to review what the skill can do and can conceal sensitive operations such as credential storage and external transmission.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The workflow example references an unrelated `search_schools` function and a gaokao project path inside a running calculator skill, showing copy-paste inconsistency between stated purpose and actual instructions. Such mismatches are dangerous because they can hide unintended tool routing, wrong code paths, or repurposed integrations that process user input in ways the user did not expect.

Intent-Code Divergence

Medium
Confidence
86% confidence
Finding
The document claims the code 'only calls APIs' and instructs returning `result["raw"]`, yet the listed tools are framed as local calculators. This contradiction obscures whether user data is processed locally or sent to external services, creating data-flow ambiguity and raising the risk of undisclosed external transmission and overexposure of returned content.

Intent-Code Divergence

Low
Confidence
82% confidence
Finding
Requiring an API key for a skill described purely as a running calculator is inconsistent with the documented capabilities and suggests hidden external dependency or undisclosed service coupling. While not proof of maliciousness by itself, this increases the risk that users will provide credentials without understanding why they are needed or where they are used.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
This code acts as a generic upstream MCP proxy by accepting arbitrary `mcp_id`, `tool_name`, and `params` and forwarding them to a remote `/api` endpoint using the configured API key. In a skill described as a running calculator, this greatly expands the effective capability surface beyond the declared domain, creating a confused-deputy risk where callers may invoke unintended upstream tools or tenants with this skill's credentials.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The file’s behavior is materially inconsistent with the declared running-calculation skill: it configures a remote service, manages an API key, and references a different 'gaokao' namespace. That mismatch strongly suggests hidden or transplanted functionality, increasing the risk that the skill accesses or depends on unrelated external infrastructure and secrets outside the user’s expectations.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
This code persistently stores an API key into a local .env file and updates process environment state, which exceeds what a local running calculator would normally need. Persisting credentials increases the chance of accidental disclosure through source-control commits, local file exposure, backups, or reuse by unrelated code on the same system.

Intent-Code Divergence

Medium
Confidence
86% confidence
Finding
The class docstring says this is '高考Skill配置' while the package is presented as a running calculation service. Such contradictions are a supply-chain warning sign because they indicate copy-pasted or repurposed code, making it harder to trust the true behavior and easier to hide unrelated data flows or credential use.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
All exported running-calculation functions forward user-supplied inputs to an external API via call_api instead of performing local-only calculations. In a fitness skill, this creates an unexpected data-flow boundary: user data is transmitted off-process/off-service, which can violate user expectations, increase privacy exposure, and introduce dependency on the security and availability of the remote service.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs the agent to ask the user for an API key and then persist it with `set_api_key(api_key)` without disclosing storage details, retention, or security controls. Collecting and saving credentials without transparent handling guidance can lead to long-term exposure of a sensitive secret through local files, logs, backups, or later misuse.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill tells the agent to directly display `result["raw"]` API response data to the user. Raw upstream payloads may contain sensitive fields, internal metadata, debugging information, or malformed content that should be filtered before disclosure.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The function writes the API key to .env with no user-facing warning, consent, or disclosure about persistence. Silent secret persistence is dangerous because users may assume a temporary session-only configuration while the credential remains on disk and may later be exposed.

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
93% confidence
Finding
The code explicitly and forcibly reads XBY_APIKEY from a local .env file during initialization, bypassing normal minimal-need principles for a running calculator. In the context of a mismatched skill, proactive secret loading is more dangerous because it normalizes access to credentials unrelated to the advertised functionality.

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
93% confidence
Finding
Opening and reading the entire .env file to search for an API key grants this skill access to local secret material that users may not expect it to inspect. Given the mismatch between the skill’s declared purpose and the actual credential-handling logic, this is a meaningful secret-access risk rather than harmless configuration.

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
94% confidence
Finding
This function is dedicated to saving an API key into a .env file, establishing persistent local credential storage. In a skill advertised as a running calculator, that is an unjustified credential-handling capability that increases the blast radius of secret compromise and suggests hidden dependency on external services.

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
91% confidence
Finding
The public function to 'set API key and persist to .env' exposes an easy path for long-term storage of sensitive credentials in a project file. This is risky because it encourages insecure secret management practices and may cause users or integrating agents to persist credentials without understanding the consequences.

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
The dependency is specified with a lower bound only, so installs may resolve to different versions over time. This weakens build reproducibility and can unexpectedly introduce vulnerable or breaking releases into the environment.

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
Using an unpinned version range for pydantic allows future installations to pull different releases than originally tested. That increases supply-chain and stability risk because security posture can change 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
94% confidence
Finding
A minimum-only version constraint for pydantic-settings permits uncontrolled upgrades at install time. This can introduce newly disclosed vulnerabilities or incompatible behavior into deployments.

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
python-dotenv is not pinned to a specific version, so environments may install different releases over time. This creates avoidable supply-chain and reproducibility risk, especially for a service component that may be deployed repeatedly across systems.

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
91% confidence
Finding
The dependency range permits installation of requests 2.31.0, a version with published advisories including credential leakage via .netrc handling and session verification issues. In an MCP server that may make outbound HTTP requests, these flaws can matter if the code processes attacker-influenced URLs or relies on requests session security behavior.

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
84% confidence
Finding
The dependency range permits python-dotenv 1.0.1, which is reported as vulnerable to symlink-following in set_key leading to arbitrary file overwrite. This is only likely to be exploitable if the skill actually calls dotenv file-writing functionality on attacker-controlled paths, so the contextual danger is lower in this dependency-only file but still real.

Static analysis

No suspicious patterns detected.