Back to skill

Security audit

命理分析服务

Security checks for vulnerabilities and agentic risk

Overview

This looks like a real fortune-analysis API wrapper, but it should be reviewed because it stores an API key locally and sends sensitive birth details to a third-party service without enough privacy framing.

Install only if you are comfortable giving this skill a xiaobenyang API key and sending birth-related details, possibly including precise time and coordinates, to that external service. Treat the saved .env key as a plaintext secret: avoid committing or syncing it, restrict access to the workspace, and remove it when no longer needed.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill clearly describes capabilities to read environment/config, persist an API key, and call an external API, yet no explicit permission declaration is present. This weakens user and platform visibility into sensitive operations and can cause the agent to perform network and local state actions without clear consent boundaries.

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
The project structure names the directory `xiaobenyang_gaokao_skill`, which is inconsistent with the rest of the file describing a fortune-analysis service. Such identity mismatch is a supply-chain red flag because it suggests the skill may have been repurposed, copied from another project, or wired to code whose real behavior differs from the stated function.

Description-Behavior Mismatch

Medium
Confidence
87% confidence
Finding
The skill includes code to set, persist, and retrieve an external API key even though the manifest describes a fate-analysis/query service, creating scope mismatch and hidden credential-handling behavior. This expands the trust boundary and can surprise users by storing secrets locally for a capability not clearly disclosed.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The code writes the API key directly into a local .env file, creating plaintext secret persistence on disk. If the working directory is shared, backed up, committed, or readable by other local users/processes, the credential can be exposed and reused.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
This skill collects highly sensitive personal data such as birth date, time, gender, and potentially location, then sends it to a third-party API, but it does not provide a clear upfront privacy warning or consent notice. In this context, these data points are especially sensitive because they are sufficient to profile a user and are more intrusive than ordinary application inputs.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The function persists an API key to .env with no user-facing warning, confirmation, or indication that the secret will be stored beyond the current session. Silent persistence can lead users to disclose credentials under the assumption they are transient, increasing the chance of later leakage through local files or source control.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
This wrapper collects sensitive personal data including birth date, gender, and potentially precise location and time, then forwards it to an external API via call_api without any visible disclosure, consent flow, or minimization in this file. In an AI-tool context, users may reasonably assume data is processed locally, so silent network transmission creates a privacy and compliance risk even if the remote service is legitimate.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The function sends birth data and fortune query parameters to an external service without any indication in the wrapper that personal data leaves the local environment. Because birth data is personally sensitive and can be combined with other context, undisclosed transfer can violate user expectations and privacy requirements.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This palace-analysis helper forwards personal birth information to a remote backend with no explicit warning in the tool interface. The risk is amplified in agent settings because users may provide personal details conversationally and not realize the data is being sent off-platform.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The Bazi chart wrapper transmits personal birth details to an external API without disclosing the network transfer or privacy implications. Even absent obvious code execution risk, silent exfiltration of personal data to a third party is a real security/privacy issue for an AI skill.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This function sends birth and query-date information to a remote service without any clear user-facing disclosure. In context, the data pertains to a highly personal profile and may be unexpectedly shared with a third party, creating confidentiality and trust concerns.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
Five-element analysis forwards personal birth information externally without clear disclosure in the wrapper. The absence of transparency and consent is the core issue: users may not expect remote transmission of sensitive personal attributes when interacting with a local-seeming tool.

Ssd 3

Medium
Confidence
94% confidence
Finding
The skill instructs the model to ask for a user API key and then save it via `set_api_key()` for later use, creating an unnecessary credential retention path. Persisting user-supplied secrets increases the blast radius of compromise, especially in a skill that also has file and environment capabilities and may store the key in plaintext or in a reusable shared context.

Ssd 3

Medium
Confidence
91% confidence
Finding
The instruction to directly format and display `result["raw"]` exposes users to unfiltered backend output, which may include echoed personal data, internal metadata, error traces, or other sensitive fields. Because this skill handles intimate personal attributes and communicates with an external API, raw-response passthrough materially increases the chance of oversharing sensitive information.

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
75% confidence
Finding
The code manually parses .env and force-reads XBY_APIKEY instead of relying solely on standard settings loading, which is unusual and broadens secret-handling logic. In this skill context, that makes credential access less transparent and harder to audit, especially given the mismatch between declared purpose and implemented secret persistence.

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
75% confidence
Finding
Opening and reading the .env file to extract a specific API key is direct credential access logic. While not necessarily malicious, it is an unnecessary custom secret-reading path that increases risk of mishandling and is more dangerous here because the skill’s stated purpose does not clearly justify such local credential management behavior.

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
94% confidence
Finding
This function is explicitly designed to save an API key into .env, creating plaintext at-rest storage of a secret. In practice this can expose the credential through repository inclusion, backups, debugging artifacts, or local file access by other users and tools.

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 set_api_key function both accepts a secret and persists it, making local credential storage a first-class feature of the skill. Given the declared domain is命理分析 rather than credential management, this capability is more sensitive because users may not expect their secret to be stored long term.

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
98% 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 make builds non-reproducible across environments. In a network-facing MCP service, this increases supply-chain risk because dependency resolution may unexpectedly pull a vulnerable or breaking release.

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
97% confidence
Finding
`pydantic>=2.7.0` is unpinned, so installations are not deterministic and may consume later releases without review. While not an exploit by itself, this weakens supply-chain control and can introduce vulnerable or incompatible versions into the service.

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
97% confidence
Finding
`pydantic-settings>=2.2.0` is not pinned to an exact version, which permits unvetted upgrades during install time. This creates a low-severity supply-chain and reproducibility issue, especially for a service that may process user-supplied data and configuration.

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
98% confidence
Finding
`python-dotenv>=1.0.1` is unpinned and therefore may resolve to unexpected versions across deployments. For configuration-loading libraries, this can introduce subtle security regressions or pull a release with known issues if versions are not tightly managed.

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
93% confidence
Finding
The requirements allow `requests` 2.31.0, and the finding identifies known advisories affecting that version. Because this skill is an MCP server that likely performs outbound HTTP requests, a vulnerable HTTP client library is relevant and could expose credentials, weaken request verification behavior, or trigger unsafe helper-function behavior depending on code paths.

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
85% confidence
Finding
The dependency range permits installation of `python-dotenv` 1.0.1, which is reported to have a symlink-following issue in `set_key` that can lead to arbitrary file overwrite in affected usage. This is only exploitable if the application invokes the vulnerable write path on attacker-influenced files, so the direct risk from this file alone is limited but still real as a dependency hygiene issue.

Static analysis

No suspicious patterns detected.