Back to skill

Security audit

AI人格服务

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a remote AI persona API client, but it asks users for an API key in chat and saves it to a local plaintext .env file with unclear scoping.

Review before installing. Use a dedicated, low-privilege API key and avoid entering valuable secrets into chat. Expect this skill to contact xiaobenyang.com and to store XBY_APIKEY in a plaintext .env file in the working directory; install only in a workspace where that file will not be committed, shared, or reused for unrelated secrets.

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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill declares no permissions while its documented/project capabilities imply access to environment variables, local file read/write, and outbound network calls. This under-disclosure prevents informed consent and weakens sandboxing/review, especially because the skill also persists secrets locally and contacts a remote API.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The manifest markets the skill as a general-purpose multi-persona MCP collaboration server, but the documented behavior includes collecting and persisting an API key, reading local secrets, and acting as a thin client for a specific remote service. This mismatch can mislead users and reviewers about the true data flows, trust boundaries, and privilege requirements.

Description-Behavior Mismatch

Medium
Confidence
84% confidence
Finding
The documentation for an AI persona service contains unrelated school-admissions workflow/examples, indicating copied or inconsistent instructions. Such drift is dangerous because operators may call unintended tools, misunderstand data handling, or trust documentation that does not match implementation.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The skill claims a constrained set of persona-related tools, but its usage examples instruct the model to call a non-existent school-search function. Contradictory instructions increase the chance of unsafe fallback behavior, hallucinated tool use, and operator confusion during execution.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This code persists the API key into a local .env file without any warning, consent, or file-permission hardening. Storing credentials in plaintext on disk increases the chance of accidental disclosure through source control, backups, logs, shared workspaces, or local compromise.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The `interactive_persona` tool appears designed to use current conversation context to perform analysis, and the wrapper sends a request to an external API without any visible indication of what context may be transmitted. In a multi-persona assistant context, this increases privacy risk because users may unknowingly send prior prompts, code, or sensitive discussion content to a remote service.

Ssd 3

Medium
Confidence
96% confidence
Finding
The skill explicitly instructs the agent to ask the user for an API key in natural language and then save it locally. Collecting secrets through chat creates a phishing-like path for credential capture, exposes users to accidental disclosure in logs/history, and normalizes unsafe secret-handling behavior.

Ssd 3

Medium
Confidence
95% confidence
Finding
The repeated instruction to ask for missing API keys in chat reinforces a credential-collection workflow and increases the likelihood that sensitive tokens are disclosed in prompts, transcripts, or downstream logs. Repetition also makes the behavior seem expected and trustworthy to end users, which elevates social-engineering risk.

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
90% confidence
Finding
The code manually reads the .env file to extract XBY_APIKEY, bypassing the normal settings abstraction and any centralized controls around secret handling. This increases the chance of inconsistent secret sourcing, accidental parsing errors, and unexpected trust in a local file that may be writable by other tooling or users.

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
88% confidence
Finding
Opening and reading .env directly for credential extraction treats a plaintext local file as an authoritative secret store. In the context of an agent skill, this is more dangerous because skills often run in developer environments where .env files are broadly reused, making unintended secret access or leakage more likely.

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 explicitly designed to persist an API key into a plaintext .env file. In an agent-skill setting, local plaintext credential storage raises the risk of disclosure via repository commits, workspace sharing, support bundles, or compromise of the host environment.

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
91% confidence
Finding
The public setter advertises that it will persist the API key to .env, making insecure credential storage part of the intended API surface. That normalizes plaintext secret persistence and increases the probability of accidental long-term exposure in developer and shared agent environments.

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
96% confidence
Finding
The dependency is specified with a lower bound only (`requests>=2.31.0`), which allows installation of any future version and reduces build reproducibility. In a server-side MCP skill, this increases supply-chain risk because unexpected upstream releases or compromised packages could be pulled into production without review.

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
`pydantic>=2.7.0` is unpinned, so deployments may resolve to different versions over time. For an AI service handling structured inputs and settings, this can introduce unreviewed behavior changes or vulnerable transitive updates, making the environment less predictable and harder to secure.

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-settings>=2.2.0` without an upper bound or exact pin permits arbitrary newer versions to be installed. This is a supply-chain and stability risk, especially for configuration-loading components, because a future release could alter settings parsing or introduce a vulnerable dependency path.

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, allowing future versions to be selected automatically. Because this library interacts with environment/configuration files, unreviewed upgrades can have security consequences and undermine reproducible builds for the MCP server.

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
92% confidence
Finding
The requirement permits `requests` 2.31.0, and the scanner identifies that version as affected by multiple advisories. In an AI/MCP server that likely performs outbound HTTP requests, a vulnerable `requests` version can expose credentials, weaken request verification behavior, or trigger unsafe file-handling paths depending on how the library is used.

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
88% confidence
Finding
The dependency range allows `python-dotenv` 1.0.1, which is flagged for a symlink-following arbitrary file overwrite issue in `set_key`. If this MCP service or its tooling modifies `.env` files programmatically, an attacker could potentially abuse symlinks to overwrite unintended files, making the configuration component more security-sensitive than a passive library.

Static analysis

No suspicious patterns detected.