Back to skill

Security audit

细胞系知识资源服务

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended for Cellosaurus lookups, but it routes through an unrelated third-party API service and persistently stores that service's API key in a local plaintext file.

Review before installing. Only use this skill if you trust xiaobenyang.com as a gateway for Cellosaurus queries, are comfortable sending your query parameters there, and are willing to manage an XBY_APIKEY that may be saved in plaintext to .env. Prefer a version that uses a secure secret store, documents the third-party data flow, pins dependencies, and removes the Gaokao/Xiaobenyang identity mismatch or explains it clearly.

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:44
Finding

API Key Persisted in a Plaintext Working-Directory 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 ``` ### Technical Analysis The function persistently stores the user-supplied API key in a plaintext `.env` file. The file path is relative to the process's current working directory rather than a dedicated private configuration directory. The implementation does not: - Explicitly create the file with restrictive permissions such as `0600`. - Verify that an existing `.env` is a regular file rather than a symbolic link. - Use atomic file replacement. - Ensure that `.env` is excluded from source control, backups, or artifact collection. - Use an operating-system credential store or another protected secret-management mechanism. Permissions for a newly created file are consequently determined by the process umask. In a permissive or shared environment, other local accounts or processes may be able to read the credential. The relative path also makes it possible to save the key into an unintended repository or shared directory. ### Attack Path 1. A user supplies an API key as required by t ...[truncated 1158 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded Dependency Versions Allow Unreviewed Future Releases

Content
View full analysis
=2.31.0 pydantic>=2.7.0 pydantic-settings>=2.2.0 python-dotenv>=1.0.1 ``` ### Technical Analysis All dependencies use lower-bound-only version constraints. A future installation may therefore resolve to versions that did not exist and were not reviewed when this Skill was audited. No lock file or package hashes are present to verify that the installed artifacts match approved packages. The package names shown are established packages, and the reviewed files contain no evidence that any currently specified dependency is malicious. The risk arises from permitting arbitrary future releases and from the absence of integrity pinning, which makes builds non-reproducible and increases exposure to upstream compromise or unexpected incompatible behavior. ### Attack Path 1. A maintainer, deployment system, or user installs the project dependencies at a later date. 2. The package resolver selects newer releases because the requirements specify only minimum versions. 3. An upstream account compromise, malicious release, or otherwise unsafe future package version enters the permitted version range. 4. The package is downloaded and installed without hash verification. 5. Package-controlled installation or imported runtime code executes with the privileges of the environment installing or running the Skill. This path depends on a compromised or unsafe upstream release; the existing requirements do not independently provide arbitrary code execution. ### Impact Assessment If an allowed dependency release is compromised, its code may execute with the privileges of the user, container, or service running the installation or Skill. Potential effects include reading the plaintext API key and other accessible files, modifying application behavior, trans ...[truncated 275 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

The documented behavior includes reading an API key from .env, writing it back to local storage, and using configuration for a different domain than the stated Cellosaurus purpose. Persisting user-supplied secrets locally for an unrelated service increases the risk of credential misuse, accidental leakage, and privilege creep beyond what users would expect from a read-only knowledge lookup skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior includes reading an API key from .env, writing it back to local storage, and using configuration for a different domain than the stated Cellosaurus purpose. Persisting user-supplied secrets locally for an unrelated service increases the risk of credential misuse, accidental leakage, and privilege creep beyond what users would expect from a read-only knowledge lookup skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file’s behavior is materially inconsistent with the declared Cellosaurus skill: it configures an unrelated XBY_GAOKAO endpoint and manages a separate API key. In an agent skill, this mismatch is dangerous because it can redirect traffic and credential handling to an unexpected external service, creating supply-chain, data exfiltration, and user-deception risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The class docstring identifies the code as a Gaokao skill configuration, directly contradicting the manifest claiming a Cellosaurus resource service. This strong identity mismatch is a red flag for repackaged or mislabeled code and makes any credential handling or network configuration in the file more suspicious.

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
90% confidence
Finding

The code explicitly reads .env and extracts XBY_APIKEY outside normal settings handling, specifically to force-load an unrelated credential. In the context of a mislabeled Cellosaurus skill, this is dangerous because it deliberately accesses and operationalizes a secret for a different service than the one disclosed to users.

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
90% confidence
Finding

Reading the full .env file contents directly increases exposure of all locally stored secrets and bypasses safer, scoped configuration access patterns. In a skill already showing service-identity mismatch, this broad secret-file access heightens the risk of unauthorized credential use or future exfiltration changes.

Content

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

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

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
if line.startswith("XBY_APIKEY="):
                    self.api_key = line.split("=", 1)[1].strip()
                    break
        # 如果环境变量有值,覆盖 .env 的值
        env_val = os.getenv("XBY_APIKEY", "")
        if env_val:
            self.api_key = env_val

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

Persisting an API key into .env at runtime creates a durable local secret copy that may be accidentally committed, exposed to other processes, or retained longer than intended. Because the key belongs to an unrelated external service, this behavior is especially suspicious and increases the likelihood of hidden service access and credential leakage.

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
95% confidence
Finding

The skill declares no explicit tool scope or permissions even though its documented behavior implies access to environment variables, local file read/write, and network calls. In an agent environment, missing scope declarations reduce transparency and can let a seemingly simple data lookup skill access credentials, persist secrets, and contact external services without clear user consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Directing users to obtain an API key from an unrelated external site conflicts with the claimed Cellosaurus purpose and may steer them to trust and authenticate with a third party they did not intend to use. This increases phishing-like risk and undermines informed consent around where credentials and request data are sent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The presence of unrelated gaokao/schools examples and project structure in a Cellosaurus skill indicates copy-paste inconsistency and weak provenance control. Such inconsistencies make it harder to verify what the skill actually does and increase the chance that hidden or unintended behavior, including calls to unrelated backends, will be overlooked.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code implements a generic proxy to an external MCP endpoint using caller-controlled tool_name, mcp_id, and params, rather than enforcing access only to Cellosaurus resources. In the context of a skill advertised as a Cellosaurus knowledge service, this creates capability overreach and can enable unintended remote tool execution, data exfiltration, or use of the stored API key against broader upstream functionality.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The request headers and body are built from dynamic inputs and sent to a generic /api endpoint, giving this skill broader remote invocation power than its stated purpose justifies. Because the skill context is limited to a biological reference resource, exposing a general upstream tool-calling primitive is especially risky: any component that can reach call_api may invoke unrelated upstream capabilities under this skill's credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code reads an API key and sends it along with the user-supplied params in an outbound HTTP POST request. While internal logging exists for success and error cases, there is no user-facing prompt, print, comment, or docstring warning that the skill transmits data and credentials to an external service.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code persists an unrelated API key to .env and exposes helper functions to set and retrieve it, despite the skill being presented as a Cellosaurus lookup service. Storing and managing unnecessary credentials increases the attack surface and can facilitate unauthorized outbound access or hidden coupling to a different service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file presents core operating instructions primarily in Chinese while also containing embedded English tool descriptions, but it does not state that the user can choose their preferred language. That creates a natural-language policy concern because the skill effectively imposes a default language/locale experience without explicit opt-in or documented justification.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency specification uses a lower-bound only constraint for requests, which makes builds non-reproducible and can allow installation of unexpected or newly vulnerable releases. In a server component that performs network access, this increases supply-chain and patch-management risk because the actual installed version may vary across environments.

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
88% confidence
Finding

Requests has multiple known advisories, and because the manifest does not pin an exact version, it is impossible to verify whether deployed environments are using a fixed or vulnerable release. In an MCP server that likely performs outbound HTTP requests, this uncertainty is more relevant because request-handling flaws can directly affect network security behavior.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The pydantic dependency is not pinned to a specific vetted release, so installations may resolve to different versions over time. This weakens reproducibility and can expose deployments to newly introduced vulnerabilities or incompatible behavior in validation logic.

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
83% confidence
Finding

Pydantic has known advisories, but the current dependency declaration does not identify the exact installed version, leaving vulnerability status unverifiable. While this file alone does not prove exploitation, it creates a real supply-chain risk because vulnerable versions may be selected during installation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

Using pydantic-settings with only a minimum version allows dependency drift and makes it unclear which release is actually deployed. Because configuration-loading libraries often touch secrets and environment data, uncontrolled upgrades can create avoidable security and stability risk.

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
82% confidence
Finding

The pydantic-settings package has at least one known advisory, and the unpinned requirement prevents determining whether the deployed version is affected. Given this library may process settings and secrets, uncertainty around the exact version increases operational security risk.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The python-dotenv package is specified with a floating lower bound, which can result in different versions being installed in different environments. Since dotenv tooling may read or modify environment configuration files, lack of version pinning increases exposure to supply-chain and configuration-handling flaws.

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
84% confidence
Finding

Python-dotenv has known advisories, and without a pinned version the project cannot demonstrate that installations avoid affected releases. Because dotenv libraries interact with environment files and configuration data, ambiguous version resolution can translate into file-handling or secret-management exposure.

Content

No source excerpt is available for this finding.