Back to skill

Security audit

区块链数据服务

Security checks for vulnerabilities and agentic risk

Overview

The skill appears read-only, but it asks for an API key and stores it locally while its backend identity does not cleanly match its Vitruveo-only description.

Review before installing. Use this only if you are comfortable giving it a XiaoBenYang API key and having that key saved as plaintext in a local .env file. Prefer environment-variable or secret-manager configuration, and wait for publisher clarification if you require a strictly Vitruveo-scoped backend.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/config.py:45
Finding

API Key Persisted in a Plaintext Project File

Content
View full analysis
bool: """将API key保存到.env文件""" try: env_path = Path(".env") lines = [] if env_path.exists(): lines = env_path.read_text(encoding="utf-8").splitlines() found = False new_lines = [] for line in lines: if line.startswith("XBY_APIKEY="): new_lines.append(f"XBY_APIKEY={api_key}") found = True else: new_lines.append(line) if not found: new_lines.append(f"XBY_APIKEY={api_key}") env_path.write_text("\n".join(new_lines) + "\n", encoding="utf-8") os.environ["XBY_APIKEY"] = api_key return True except Exception as e: print(f"保存API key失败: {e}") return False ``` The corresponding mandatory instruction is: ```markdown - 拿到用户提供的密钥后,调用 `scripts.config.set_api_key(api_key)` 保存,然后继续处理 ``` ### Technical Analysis The credential is stored as unencrypted text in `.env` using `Path.write_text()`. The implementation does not explicitly establish restrictive file permissions, reject symbolic links, use an operating-system credential store, or verify that `.env` is excluded from version control. Authentication requires transmitting the API key to the declared service, but permanent local storage is not necessary for individual API requests. Session-only memory or an existing environment variable would provide the required authentication with less exposure. Consequently, mandatory persistence exceeds the minimum privilege and data-retention requirement ...[truncated 1697 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Non-Reproducible Dependencies Allowed by Open-Ended Version Constraints

Content
View full analysis
=2.31.0 pydantic>=2.7.0 pydantic-settings>=2.2.0 python-dotenv>=1.0.1 ``` ### Technical Analysis Each `>=` constraint permits the package installer to select future versions that were not available or reviewed when the Skill was audited. This prevents reproducible builds and expands the trusted supply-chain surface over time. No evidence indicates that the currently named packages are malicious, misspelled, or obtained from an unauthorized package index. The risk is that future compromised, vulnerable, or incompatible releases remain valid under the manifest and may be installed automatically. Python packages can execute code during installation or when imported. Therefore, compromise of an allowed future release could affect the host at installation or runtime using the privileges of the account operating the Skill. ### Attack Path 1. A dependency publisher account, release process, or upstream package is compromised, or a future release introduces a security vulnerability. 2. The attacker publishes a version higher than the minimum accepted by `requirements.txt`. 3. A user installs or rebuilds the Skill without a reviewed lockfile or hash verification. 4. The resolver selects the newer permitted version. 5. Malicious installation or import-time code executes, or the Skill becomes exposed to the vulnerability introduced by that release. This attack requires compromise or insecurity in an upstream release or package-distribution path; the version constraints alone do not directly execute attacker-controlled code. ### Impact Assessment A malicious dependency could run with the privileges of the user installing or invoking the Skill. Depending on the compromised ...[truncated 477 chars]
Remediation
View remediation
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 (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A skill claiming read-only blockchain access should not silently manage credentials, modify environment variables, or write secrets to local files unless this is explicitly declared and justified. This mismatch is dangerous because it can trick users into providing and persisting sensitive API keys for an unrelated service under the guise of harmless blockchain querying.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A skill claiming read-only blockchain access should not silently manage credentials, modify environment variables, or write secrets to local files unless this is explicitly declared and justified. This mismatch is dangerous because it can trick users into providing and persisting sensitive API keys for an unrelated service under the guise of harmless blockchain querying.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The workflow example instructs use of an unrelated school-search function inside a blockchain skill, showing that routing instructions may send data to the wrong backend or tool family. In an agent setting, misleading invocation guidance can cause unintended remote calls, cross-domain data leakage, or execution against tools outside the user's expected trust scope.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/config.py (reported line 13)May include surrounding context.

python
model_config = SettingsConfigDict(
        env_prefix="XBY_GAOKAO_",
        env_file=".env",
        env_file_encoding="utf-8",
        extra="ignore",
    )

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/config.py (reported line 32)May include surrounding context.

python
model_config = SettingsConfigDict(
        env_prefix="XBY_GAOKAO_",
        env_file=".env",
        env_file_encoding="utf-8",
        extra="ignore",
    )

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/config.py (reported line 31)May include surrounding context.

python
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")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/config.py (reported line 39)May include surrounding context.

python
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")

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module can persist, update, and expose an API key via .env and process environment mutation even though the advertised service is read-only blockchain data access. This expands the skill’s authority from passive configuration loading to local credential storage and modification, increasing the risk of accidental secret leakage, unauthorized persistence on shared hosts, and confusing trust boundaries for operators.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

This function initiates writing API keys to a plaintext .env file, creating persistent local secret storage that can be exposed through repository mistakes, backups, host compromise, or shared workspace access. In a read-only blockchain data skill, this capability is broader than necessary and raises the danger of credential mishandling.

Content

Scanner excerpt · scripts/config.py (reported line 48)May include surrounding context.

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

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill requests or implies capabilities to read environment state, write files, and access the network, but it does not declare an explicit tool scope such as allowed-tools or permissions. That makes the effective trust boundary unclear and can let a host agent invoke more capability than a user would reasonably expect from a supposedly read-only blockchain data skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The entire skill description and operating instructions are presented only in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. This can constitute a language/locale policy issue when a skill effectively mandates one language without opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly tells the agent to ask the user for an API key and persist it via configuration, but it does not clearly warn that the secret will be stored locally or explain retention and protection. This can lead to credential exposure, over-collection of secrets, and users providing sensitive keys without informed consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

SKILL.md整体将该技能描述为 Vitruveo 只读区块链数据服务,但项目结构示例却写成 xiaobenyang_gaokao_skill/,并将 tools.py 注释为通用“直接调用”,与前文区块链工具集上下文不一致。这不是单纯信息缺失,而是文档对技能身份的积极性误述,表明文档内容可能从无关项目复制而来。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This client exposes a generic upstream MCP tool invocation path where both the tool name and parameters are passed through to the remote service with no visible allowlist or enforcement that only Vitruveo read-only blockchain operations are permitted. In the context of an agent skill advertised as a read-only blockchain data service, this mismatch expands the effective capability boundary and can let an agent invoke unintended upstream tools or non-read-only actions if the upstream service honors them.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Saving credentials locally to .env is not justified by a read-only data service and creates unnecessary secret-at-rest exposure. On multi-user systems, developer machines, or CI runners, a persisted API key may be unintentionally committed, backed up, or read by other processes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function writes API credentials to a local .env file without any visible warning, confirmation, or indication of persistence. Users or calling code may believe they are setting an in-memory value while actually creating long-lived plaintext credentials on disk, which can later be exposed through source control, backups, or local compromise.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a read-only blockchain service for the Vitruveo network, but the toolset implements generic EVM network discovery and data access, including Ethereum-oriented ERC20/ERC721/ERC1155 functions and explicit support for multiple non-Vitruveo networks such as optimism, arbitrum, base, and polygon. This is still read-only, but the actual behavior is materially broader than the stated Vitruveo-focused scope.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with a lower bound only, so builds may resolve to different future versions over time. This weakens supply-chain control and makes it difficult to verify whether the installed version includes security fixes or newly introduced vulnerabilities, especially for a network-facing package like requests.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); 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) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The manifest does not pin requests, so it is impossible to confirm from this file alone whether deployments will use a version affected by known advisories. In a blockchain data service, requests is likely used for outbound HTTP interactions, which makes dependency uncertainty more relevant even if the service is described as read-only.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

Using an unpinned pydantic version allows non-deterministic installs and makes security posture hard to assess across environments. Even if the minimum version is recent, later resolved versions could introduce vulnerable or breaking releases before they are reviewed.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1

Unverifiable Dependency: pydantic has 4 known advisory(ies) (CVE-2021-29510 (Use of "infinity" as an input to datetime and date fields causes infinite loop i); CVE-2024-3772 (Pydantic regular expression denial of service); CVE-2021-29510 (Pydantic is a data validation and settings management using Python type hinting.) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
92% confidence
Finding

Because pydantic is unpinned, the deployed version cannot be verified against known advisories from the manifest alone. This creates a supply-chain visibility gap and could expose the service to parser or validation flaws if an affected version is resolved.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The package pydantic-settings is not pinned, which leaves installs open to drift and undermines reproducibility. This is particularly relevant for configuration-handling libraries because a vulnerable resolved version could affect secrets or environment loading behavior.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1

Unverifiable Dependency: pydantic-settings has 1 known advisory(ies) (CVE-2026-58203 (pydantic-settings: NestedSecretsSettingsSource follows symlinks outside secrets_)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The file does not constrain pydantic-settings to a fixed safe release, so whether a vulnerable version is installed is unverifiable. Since settings libraries often influence secret loading and runtime configuration, unresolved advisory exposure can have security consequences beyond simple build instability.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

python-dotenv is specified with only a minimum version, so future installations may pull in different releases with unknown security characteristics. Because this library interacts with environment files and configuration data, version uncertainty can increase operational and security risk.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1

Unverifiable Dependency: python-dotenv has 2 known advisory(ies) (CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via ); CVE-2026-28684 (python-dotenv reads key-value pairs from a .env file and can set them as environ)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding

python-dotenv has known advisories, but the manifest leaves the final installed version open-ended, so security status cannot be established from the dependency file. Given that dotenv tooling touches local configuration files, an affected version could matter if the skill uses file-based secret or environment management.

Content

No source excerpt is available for this finding.