Back to skill

Security audit

DeFi收益分析服务

Security checks across malware telemetry and agentic risk

Overview

This DeFi analysis skill is not clearly malicious, but it needs Review because it stores API keys locally and contains mismatched leftover instructions that make its real data flow unclear.

Review before installing. Only use a low-privilege API key, assume it may be written to a local .env file, and inspect or remove the gaokao/search_schools leftovers before trusting the skill with credentials or financial workflow context.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill advertises no explicit permissions, yet the documented behavior requires environment access, local file reads/writes, and network access. This weakens security review because users and hosting platforms are not clearly informed that the skill can persist secrets locally and make outbound requests.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The documented purpose is narrow DeFi yield analysis, but the behavior includes collecting and persisting API keys, reading local configuration, and calling a third-party platform instead of directly querying DefiLlama. This mismatch is dangerous because it obscures data flows and expands trust to an undisclosed remote service that may receive user inputs and credentials.

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
The workflow example instructs the model to call an unrelated 'search_schools' function for gaokao queries, which is inconsistent with the stated DeFi purpose. Such cross-domain leftovers are a strong sign of copy-paste errors or repurposed tooling, increasing the risk that the skill may invoke unintended functions or route user data to the wrong backend.

Intent-Code Divergence

Low
Confidence
79% confidence
Finding
The documented project directory is named like a gaokao skill rather than a DeFi analysis service, which reinforces that the package may have been repurposed without a full cleanup. While not directly exploitable on its own, this inconsistency undermines provenance and makes hidden behavioral mismatches more likely.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The skill includes functionality to persist, update, and globally mutate an API key in a local .env file and process environment, which exceeds the stated read-only DeFi yield analysis purpose. This broadens the skill from passive analytics into credential-management behavior, increasing the attack surface and creating opportunities for secret mishandling or unwanted persistence.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
The code implements local credential storage by writing the API key into .env, despite the skill being described as a DeFi analytics service rather than a credential manager. Storing secrets locally can expose them through filesystem access, backups, repo accidents, or later code execution in the same environment.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs collecting a user API key and persisting it via local configuration without warning about sensitivity, storage location, retention, or access controls. In the context of an agent skill, this is risky because users may provide secrets without informed consent, and local persistence increases the chance of later disclosure or misuse.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The function silently persists the API key to .env and also mirrors it into the process environment without any user-facing disclosure or confirmation. This is dangerous because users or calling agents may assume the key is transient, while it actually becomes a durable local secret that may be exposed to other tooling, logs, backups, or future sessions.

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
86% confidence
Finding
The code forcibly reads .env during post-init and extracts XBY_APIKEY manually, bypassing the normal settings abstraction and increasing secret-handling complexity. This creates unnecessary credential access behavior for a DeFi analytics skill and raises the chance of secret leakage, misuse, or hidden coupling to local files.

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
86% confidence
Finding
Checking for and reading a local .env file to pull an API key is credential-access behavior that is broader than expected for a read-only analytics skill. In this context, unnecessary local secret access increases the blast radius if the skill or runtime is compromised and makes secret provenance harder to audit.

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
91% confidence
Finding
This function is explicitly dedicated to saving an API key into .env, creating durable local credential storage. In the context of a DeFi analytics skill, this is dangerous because it introduces secret persistence and file-based exposure without clear necessity or built-in protections.

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 setter persists the API key to .env as part of normal operation, turning a simple configuration action into a credential-storage side effect. That is risky because callers may not expect durable storage, and the plain-text secret can be exposed through the filesystem, backups, or accidental commits.

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
93% confidence
Finding
The dependency is specified with a lower bound only (`requests>=2.31.0`), which allows future unreviewed versions to be installed and can also permit resolution to a version with known advisories if lockfiles are absent. In a security-sensitive agent skill that fetches external DeFi data, uncontrolled dependency resolution increases supply-chain risk and reduces reproducibility.

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
91% confidence
Finding
`pydantic>=2.7.0` is unpinned, so installations may pull different versions over time, creating supply-chain and reliability risk. While not an immediate code-execution flaw by itself, this is a real dependency hygiene weakness that matters for agent services handling remote data.

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
91% confidence
Finding
`pydantic-settings>=2.2.0` is not pinned to a specific version, so the runtime environment may change unexpectedly as new releases appear. This weakens build reproducibility and increases exposure to malicious or flawed upstream releases.

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
92% confidence
Finding
`python-dotenv>=1.0.1` is unpinned, which creates non-deterministic installs and supply-chain exposure. In an MCP-style service likely loading environment configuration, dependency control is especially important because config-handling libraries may influence secrets management.

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
97% confidence
Finding
The findings indicate `requests` 2.31.0 has multiple published advisories, including credential leakage via malicious URLs and TLS/session verification-related issues. Because this skill explicitly retrieves external DeFi data, it likely makes outbound HTTP(S) requests, making vulnerable HTTP client behavior more relevant than in a purely local utility.

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
`python-dotenv` 1.0.1 is flagged for a symlink-following arbitrary file overwrite issue in `set_key`. This is only exploitable if the skill uses the affected functionality on attacker-influenced paths, which is not shown here, but as a dependency risk it is still real and more concerning in services that manage environment files or local configuration.

VirusTotal

54/54 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

No suspicious patterns detected.