Back to skill

Security audit

学术文献检索与引用工具

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be an academic search helper, but its artifacts show under-disclosed local credential handling and inconsistent references to unrelated gaokao/XBY functionality.

Install only if you are comfortable with the skill storing an API key in a local .env file and writing export files to paths you provide. Prefer using a throwaway or restricted API key, review the actual destination path before exports, and remove the local credential after use if persistence is not intended.

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
92% confidence
Finding
The skill advertises no declared permissions, yet its documented workflow clearly involves environment access, local file reads/writes, and network calls. This creates a transparency and consent problem: users and hosting platforms may authorize or trust the skill under a narrower capability model than it actually requires, increasing the chance of unexpected credential handling and filesystem modification.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill claims to be a DBLP literature search and citation tool, but the documentation also instructs it to collect, persist, and use a proprietary third-party API key and to modify local configuration files. This mismatch can mislead users about what service is really being contacted and what sensitive actions occur, which is especially dangerous because users may disclose credentials under false assumptions.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The document presents the skill as a DBLP academic search tool, but the embedded example workflow references a school/gaokao search function instead. This strong semantic inconsistency is a red flag for prompt or skill repurposing, and it undermines trust in the declared behavior because the actual routing logic may target unrelated data sources or operations.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The project structure names the package as a gaokao-related skill while the document claims DBLP literature functionality. Such repository-identity mismatch suggests code reuse or incomplete retargeting, which raises the risk that hidden behaviors, endpoints, or data handling semantics do not match the user-visible description.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The module implements persistent API key storage and update logic in a skill whose stated purpose is literature retrieval and citation formatting. This expands the skill's capabilities into local credential handling, increasing the risk of accidental secret exposure, misuse by other components, or unsafe persistence on disk.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The code writes credentials to a local .env file and mutates process environment variables at runtime, which exceeds the reasonable scope of a read-only academic search tool. This creates unnecessary secret-handling behavior that can leak credentials to local files, logs, backups, or other code running in the same process.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs the model to ask the user for an API key and then persist it via configuration storage, but it does not disclose retention, scope, or storage location to the user. This is dangerous because users may provide sensitive credentials without informed consent, and persisted secrets can later be exposed through local compromise, logs, backups, or unintended reuse.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill supports exporting BibTeX to an absolute path and creating parent directories, but it does not warn the user that this modifies the local filesystem. In an agent setting, silent file creation can surprise users, overwrite expected locations, or be abused to place artifacts in sensitive directories if path handling is not tightly constrained.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
Persisting an API key to .env without explicit user disclosure is unsafe because users may assume the credential is transient while it is actually written to disk. Secrets stored this way can be exposed through source-control mistakes, local backups, shared workspaces, or permissive file access.

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
91% confidence
Finding
The code explicitly reads .env and parses out a specific API key, bypassing the normal settings abstraction and directly handling credentials. In the context of a literature search skill, this is unnecessarily invasive secret access and increases the chance of mishandling or extending credential access beyond intended scope.

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
91% confidence
Finding
Opening and reading the .env file to extract credentials gives the skill direct access to locally stored secrets. This broadens the component's authority and creates avoidable exposure risk, especially since the advertised functionality does not require local secret-file inspection.

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
93% confidence
Finding
This function is dedicated to saving an API key into a .env file, creating persistent local secret storage within the skill. That is dangerous because plaintext credentials can be recovered from the filesystem, backups, shared directories, or accidental repository commits.

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 API key setter explicitly persists the credential to .env as part of normal operation. This bakes insecure secret storage into the public interface of the module, making accidental long-term exposure of credentials more likely.

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
95% confidence
Finding
The dependency is specified with a lower-bound only (`requests>=2.31.0`), which allows future unreviewed versions to be installed and undermines reproducible builds. In a network-facing literature retrieval tool, dependency drift can introduce unexpected vulnerable or breaking versions into the runtime environment.

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
95% confidence
Finding
Using `pydantic>=2.7.0` permits installation of any later version, reducing build reproducibility and increasing supply-chain risk if a later release contains a security flaw or incompatible behavior. Although not an immediate exploit by itself, it is a genuine hardening 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
94% confidence
Finding
`pydantic-settings>=2.2.0` is unpinned, so deployments may resolve to different versions over time. That creates avoidable supply-chain and stability risk, especially for a service that may load configuration from environment sources in automated deployments.

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
95% confidence
Finding
`python-dotenv>=1.0.1` is also unpinned, which allows uncontrolled upgrades and weakens reproducibility. Because this package interacts with environment/configuration management, adopting an unreviewed future version could affect secrets handling or configuration parsing behavior.

Known Vulnerable Dependency: requests==2.31.0 — 3 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)

Low
Category
Supply Chain
Confidence
91% confidence
Finding
The requirement allows installation of `requests` 2.31.0, a version with published advisories including credential leakage via malicious URLs and session verification issues. This skill's purpose involves outbound HTTP access to a literature database, so a vulnerable HTTP client is more relevant than it would be in an offline-only tool.

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
81% confidence
Finding
The requirement permits `python-dotenv` 1.0.1, which is flagged for a symlink-following arbitrary overwrite issue in `set_key`. This is only exploitable if the skill actually invokes dotenv file-writing functionality on attacker-influenced paths, so the risk is contextual but still real at the dependency level.

Static analysis

No suspicious patterns detected.