Back to skill

Security audit

货币与石油价格服务

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to provide currency and oil-price lookups, but its artifacts show unclear service identity and under-disclosed local API-key persistence.

Review this before installing. Only provide an API key if you are comfortable with it being stored in a local .env file, and verify which backend service actually receives requests. Prefer a version that clearly documents the upstream domain, credential storage location, deletion steps, and uses pinned patched dependencies.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill directs the agent to use environment access, local file reads/writes, and network calls, yet the manifest does not declare corresponding permissions. This weakens transparency and reviewability, making it easier for a user or platform to underestimate the skill’s ability to persist secrets and contact remote services.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The documented purpose says this is a Zenrus real-time currency/oil service, but the behavior described includes storing API keys locally and calling a different upstream service/domain. That mismatch can mislead users into disclosing credentials and trusting data flows they did not intend, which is especially risky when secrets are collected and persisted.

Description-Behavior Mismatch

Medium
Confidence
79% confidence
Finding
The workflow example references unrelated gaokao/school-query functionality inside a finance/oil pricing skill. This kind of cross-domain inconsistency is a supply-chain red flag because it suggests copied or repurposed instructions, increasing the chance that hidden behavior, wrong tool routing, or unintended data exposure will occur.

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
The documented tool invocation example contradicts the actual available tools, indicating the instructions are unreliable. In practice, contradictory guidance around tool use can cause the agent to call unintended functions, mishandle parameters, or expose user data to the wrong backend.

Intent-Code Divergence

Low
Confidence
76% confidence
Finding
The project structure names the package as a gaokao skill, which conflicts with the declared currency/oil purpose. While not directly exploitable on its own, this inconsistency materially increases suspicion of repackaged code and makes it harder to verify what code will actually run and where user data may go.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The module exposes functionality to persist an API key into a local .env file, which exceeds the apparent needs of a read-oriented market data skill. Persisting secrets to disk increases the chance of accidental disclosure through source control, backups, or overly broad filesystem access, especially when this behavior is not clearly disclosed to users.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
This code adds local credential persistence capability that is not necessary for fetching exchange rates or oil prices. Unnecessary secret-handling logic broadens the attack surface and creates avoidable exposure paths for credentials on disk and in process state.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs the agent to request an API key from the user and store it, but does not disclose persistence, scope, retention, or security handling. This creates a credential-handling risk because users may provide secrets without informed consent, and local storage in .env or similar files can expose the key to other processes, logs, or future sessions.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The API key is written to .env without any visible warning, consent flow, or disclosure to the user. Silent secret persistence is dangerous because users may assume credentials are only used in-memory, while the code leaves recoverable copies on disk that can be exposed by other local processes, backups, or repository mistakes.

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
84% confidence
Finding
The code manually reads .env and forcibly extracts XBY_APIKEY instead of relying on normal settings loading, creating custom secret-handling logic that is harder to audit and easier to misuse. In this skill context, that behavior is more suspicious because a simple market-data client should not need bespoke local credential scraping from disk.

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
84% confidence
Finding
Checking for and reading .env directly is part of the same custom credential-access path that bypasses standard configuration abstractions. This increases the chance of unintended secret exposure and makes the skill's behavior less transparent to users and reviewers.

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
89% confidence
Finding
This function is dedicated to saving an API key into .env, creating a persistent credential store in the working directory. In the context of a data lookup skill, that is more dangerous than necessary because it leaves long-lived local secrets that may be leaked through repository inclusion, support bundles, or permissive file access.

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
90% confidence
Finding
The set_api_key workflow explicitly persists the credential to .env as part of normal operation, turning a transient input into durable local secret storage. That increases the blast radius of any local compromise and is not justified by the stated purpose of a read-only pricing service.

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
96% confidence
Finding
The dependency is specified with only a lower bound, so builds may resolve to different versions over time. This weakens supply-chain reproducibility and can unexpectedly introduce vulnerable or incompatible releases, which is a real security hygiene issue even if not directly exploitable by itself.

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
96% confidence
Finding
Using an unpinned pydantic version allows future installs to pull newer releases without review, reducing reproducibility and increasing supply-chain risk. In an agent skill that may be deployed automatically, this makes security posture dependent on upstream changes outside the author's control.

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
96% confidence
Finding
An unpinned pydantic-settings dependency means installations are not deterministic and may silently consume a later release with security or behavior changes. This is a supply-chain hardening weakness rather than an immediate code execution issue.

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
96% confidence
Finding
The unpinned python-dotenv requirement permits drift to arbitrary later versions, which can introduce newly published vulnerabilities or breaking behavior. Because dotenv libraries often interact with local configuration files, dependency integrity matters for safe deployment.

Known Vulnerable Dependency: requests==2.31.0 — 5 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) +2 more

Medium
Category
Supply Chain
Confidence
93% confidence
Finding
The requirements allow installation of requests 2.31.0, which is flagged with multiple advisories including credential leakage and request verification issues. In a service that fetches real-time currency and oil data over the network, a vulnerable HTTP client is more relevant because remote endpoints and attacker-controlled URLs could potentially influence outbound requests.

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
86% confidence
Finding
python-dotenv 1.0.1 is reported with a symlink-following issue in set_key that can lead to arbitrary file overwrite in affected usage patterns. This skill's metadata suggests a financial data service rather than a local file-management tool, so the practical danger depends on whether the code actually calls set_key on attacker-influenced paths; nevertheless, the dependency version is vulnerable.

Static analysis

No suspicious patterns detected.