Back to skill

Security audit

文档导航服务

Security checks for vulnerabilities and agentic risk

Overview

This skill should be reviewed before install because it collects and stores an API key while routing documentation requests through an under-disclosed third-party service with unrelated gaokao remnants.

Install only if you trust the Xiaobenyang service and are comfortable giving it an API key and Fluent documentation queries. Treat returned links as untrusted until verified, avoid using a high-privilege or reusable API key, and prefer a version that does not persist secrets in plaintext .env files.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/config.py:45
Finding

Plaintext API Key Persistence with Unsafe File Handling

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 persistence behavior is explicitly required by `SKILL.md:16-18`, which directs the Agent to collect the key and call `scripts.config.set_api_key(api_key)`. ### Technical Analysis The Skill stores the user-supplied API key as plaintext in a relative `.env` file. It does not: - Set restrictive permissions such as `0600`. - Verify the owner or current permissions of an existing file. - Reject symbolic links. - Use a dedicated, trusted configuration directory. - Write the updated file atomically. - Use an operating-system credential store. Because the path is resolved relative to the process working directory, the destination may not be controlled exclusively by the Skill. An attacker with access to that directory could pre-create `.env` with permissive permissions or make it a symbolic link to another writable file. The API key is also copied into the process environment. This may expose it to child processes or diagnostic tools, depending on th ...[truncated 1364 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:48
Finding

Unvalidated Upstream URLs Are Delegated to WebFetch

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded Third-Party Dependency Versions

Content
View full analysis
=2.31.0 pydantic>=2.7.0 pydantic-settings>=2.2.0 python-dotenv>=1.0.1 ``` ### Technical Analysis Every dependency uses only a minimum-version constraint. A new installation can therefore select any future compatible version from the configured package index. The exact dependency graph is not reproducible and can change without any modification to the Skill. No malicious or typosquatted package was identified in the reviewed requirements. The risk is that future, unaudited releases—or transitive dependencies selected by them—will automatically become eligible for installation. This increases exposure to upstream package compromise, regressions, or behavior changes. ### Attack Path 1. A future eligible release of one of the listed packages or a transitive dependency is compromised or introduces unsafe behavior. 2. A user installs the Skill in a fresh environment. 3. The package resolver selects the newer release because the requirement specifies no upper bound or exact version. 4. Installation or import executes code from a dependency version that was not reviewed with the Skill. 5. The dependency acts with the permissions of the user or service running the Skill. This is a supply-chain hardening issue; the audit found no evidence that the currently named packages are malicious. ### Impact Assessment A compromised dependency can execute Python code with the same operating-system privileges as the Skill process. Depending on runtime permissions, this could expose API keys, user queries, files accessible to the process, and network access. The likelihood is lower than the other findings because exploitation requires an upstream package compromise, unsafe future release, or compromised package index. However, the potential i ...[truncated 86 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 (27)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims to support Fluent documentation, but the documented configuration references gaokao-related infrastructure, XBY_APIKEY, mcp.xiaobenyang.com, mcp_id, and business defaults unrelated to documentation links. This strongly suggests deceptive repackaging of another service, creating risk of credential harvesting, unauthorized outbound requests, and misuse of user trust.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims to support Fluent documentation, but the documented configuration references gaokao-related infrastructure, XBY_APIKEY, mcp.xiaobenyang.com, mcp_id, and business defaults unrelated to documentation links. This strongly suggests deceptive repackaging of another service, creating risk of credential harvesting, unauthorized outbound requests, and misuse of user trust.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill's core workflow requires obtaining and storing an external API key for a service that is not meaningfully tied to documentation-link navigation. That discrepancy makes the skill context more dangerous because users would reasonably expect harmless documentation assistance, not credential collection and transmission to a third-party API.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The example invocation references school-search behavior unrelated to Fluent documentation, showing that the skill instructions were copied from another domain or are routing to a different backend than claimed. In a credential-collecting skill, such contradictions are a serious integrity signal because they indicate hidden functionality or careless reuse that could misroute user data.

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 post-init hook forcefully reads .env to extract a specific API key, bypassing normal minimal configuration use and embedding custom secret-harvesting logic in a documentation skill. In context, this broadens secret access beyond what is expected and makes the component more dangerous because it actively parses local credential storage.

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

Creating a Path('.env') and reading its contents is part of bespoke credential access logic aimed at obtaining an API key from local storage. In this skill context, that behavior is unnecessary and suspicious because a document-navigation service should not need direct filesystem parsing of secret files.

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

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code writes the API key directly to a local .env file, creating plaintext at-rest secret storage in the project directory. In a skill whose stated purpose is document navigation, this is unjustified and dangerous because local files are commonly exposed through backups, logs, source control mistakes, multi-user systems, or other tools with filesystem access.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

This function explicitly persists API credentials into .env, creating local plaintext secret storage and expanding the attack surface to any process or user able to read the workspace. In the context of a documentation-navigation skill, this is especially dangerous because secret persistence is outside the expected feature set and therefore harder for operators to anticipate and monitor.

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

The skill declares no explicit tool scope or permission boundaries even though it clearly implies capabilities to read environment variables, read/write files, and make network requests. In a skill that asks for credentials and persists them, missing scope declarations increase the chance of overbroad access and make user review and platform enforcement much harder.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill metadata and operational instructions are entirely written in Chinese and present the workflow as mandatory, with no indication that users may choose another language. Under the language/locale policy, forcing a specific language without opt-in can be a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs the model to collect a user-provided API key and persist it via configuration without warning about retention, storage location, access controls, or reuse. This is dangerous because sensitive credentials may be stored on disk unexpectedly, exposed to other processes or users, and transmitted to a third-party service without informed consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented project structure is gaokao-related rather than Fluent-documentation-related, which undermines trust in the stated purpose and suggests the skill is repurposed from a different application. While not exploit code by itself, in context it materially increases the likelihood of hidden or unintended behavior, especially when combined with API-key handling and external network access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code sends request parameters to a remote API and includes a credential in the request headers. While the file has internal logging for success and error cases, it does not provide a user-facing warning, confirmation, or explanatory comment/docstring disclosing that user-supplied data and an API key will be transmitted upstream.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The class docstring describes a completely different skill purpose ('高考Skill配置') than the declared documentation-navigation service. This inconsistency is a supply-chain red flag because it suggests code reuse from an unrelated project or concealed functionality, making the secret-handling behavior more suspicious in context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This module implements persistent API credential management even though the advertised skill is only a documentation-navigation service. That mismatch expands the skill's trust boundary and creates unnecessary secret-handling capability, increasing the risk of credential exposure, unauthorized reuse, or future abuse if other code paths access the stored key.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function persists an API key to .env without any user-facing disclosure, confirmation, or warning that the credential will be stored on disk. This undermines informed consent and can lead operators to expose long-lived secrets unintentionally in environments where local files are not adequately protected.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency specifier requests>=2.31.0 is unpinned, so builds may resolve to different versions over time, reducing reproducibility and making it harder to ensure vulnerable releases are excluded. In a network-facing documentation navigation service, requests is especially relevant because HTTP client behavior can directly affect SSRF, credential handling, and TLS-related exposure if a bad version is installed.

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

The manifest does not pin requests, so it is impossible to verify from this file alone whether deployment will use a version affected by known advisories. This increases risk in this skill because the service is described as providing intelligent URL navigation and likely performs outbound HTTP requests, making requests a security-sensitive dependency.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

pydantic>=2.7.0 is unpinned, which allows uncontrolled upgrades and makes the deployed version unverifiable during review. This is a supply-chain hygiene weakness because validation libraries are security-relevant, and a future or transitive incompatible release could introduce denial-of-service or parsing issues.

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

Because pydantic is not pinned, reviewers cannot determine whether the installed version is affected by any of its known advisories. While this file alone does not prove an exploitable condition, it does represent a real supply-chain assurance gap around a core input-validation component.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

pydantic-settings>=2.2.0 is unpinned, so the actual installed version may vary across environments and may include unknown vulnerable releases. Because settings loaders often interact with environment variables, files, and secrets sources, version drift can create security and operational 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
87% confidence
Finding

pydantic-settings has known advisories, and without exact version pinning there is no way to verify whether a vulnerable release will be installed. Given this package may process settings and secrets sources, uncertain version selection creates avoidable exposure even if no exploit is demonstrated here.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

python-dotenv>=1.0.1 is unpinned, making dependency resolution nondeterministic and preventing reviewers from confirming whether the installed version is affected by known issues. Since dotenv tooling reads and may write environment files, unexpected version changes can affect secrets handling and filesystem safety.

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