Back to skill

Security audit

MBTI测试服务

Security checks for vulnerabilities and agentic risk

Overview

This MBTI skill appears to call the advertised remote test API, but it automatically stores an API key in a local .env file and contains stale gaokao-related references that make its scope unclear.

Review this before installing. Only provide an API key you are comfortable storing locally in plaintext, preferably a limited or revocable key. Expect your MBTI answers and session state to be sent to the XiaoBenYang remote API. The gaokao-related leftovers should be cleaned up by the publisher before this is treated as a well-scoped MBTI skill.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill documentation indicates capabilities to read environment variables, read/write local files, and make network requests, yet it declares no permissions. This creates a transparency and trust problem: users and hosts cannot accurately assess what the skill may access, especially since it also collects and stores API credentials locally.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The documented purpose is an MBTI testing service, but the behavior includes collecting and persisting an external API key, acting as a remote API proxy, and reusing gaokao/school-related configuration artifacts. This mismatch is dangerous because it obscures the true data flows and execution model, making users more likely to disclose credentials to a skill whose implementation and scope are unclear.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill claims to provide MBTI testing, but the workflow introduces an external API key collection requirement and contains unrelated functionality references. Such inconsistency is a security concern because it can be used to normalize unnecessary credential collection and hide unexpected backend behavior under an innocuous description.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The documentation says the code only routes MBTI tool calls, yet the example shows an unrelated 'search_schools' function. This contradiction undermines trust in the declared behavior and suggests the skill may contain copied or stale logic that could invoke unintended tools or external services.

Intent-Code Divergence

Low
Confidence
90% confidence
Finding
The project structure is labeled as a gaokao-related skill rather than an MBTI service, indicating copy-paste residue or incomplete repurposing. While lower severity on its own, this increases the chance of hidden unrelated code paths, incorrect API endpoints, or accidental data handling that users would not expect from an MBTI test tool.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file claims to belong to an MBTI testing skill, but the configuration actually targets a different external service namespace (XBY_GAOKAO_) and persists an unrelated API key. This mismatch is a strong indicator of hidden capability or repurposed code that could capture and store credentials unrelated to the advertised function, violating user trust and expanding the attack surface.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The skill writes an unrelated API key into .env and exposes helper functions to persist it, despite no clear need for such credentials in an MBTI testing service. Persisting secrets for an off-purpose integration creates a covert credential collection/storage path that could be abused for unauthorized service access or later exfiltration.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The docstring and configuration identifiers reference a different product/domain than the advertised MBTI skill, indicating deceptive packaging or code reuse without validation. In a security review context, this inconsistency materially increases the likelihood that the skill contains hidden or unauthorized behavior beyond its stated purpose.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill instructs the agent to ask the user for an API key and store it via local configuration without warning about storage, retention, scope, or exposure risks. Credential collection is especially sensitive here because the surrounding documentation is inconsistent, increasing the risk that users provide secrets to a skill with unclear provenance and behavior.

Missing User Warnings

Low
Confidence
88% confidence
Finding
Instructing the agent to directly display raw API response data can expose sensitive, malformed, or unexpected content to the user without filtering. Even for a benign MBTI service, raw responses may include internal metadata, error traces, or fields not intended for end-user display.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The code persists an API key to a plaintext .env file and sets it in process environment state without any user-facing warning, consent, or disclosure. This creates a secret-handling risk because users may unknowingly leave reusable credentials on disk where other local processes, backups, or repository mistakes could expose them.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The tool functions send MBTI session state and user answers to a remote API via call_api, but this file provides no user-facing disclosure, consent flow, or data-handling notice. While MBTI data is not typically as sensitive as credentials, it is still personal profiling information, and silent transmission can create privacy and compliance risks if users do not understand that their responses leave the local assistant context.

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
94% confidence
Finding
The code explicitly and forcibly reads .env to extract XBY_APIKEY outside the normal settings abstraction, targeting a credential unrelated to the MBTI skill. In this context, direct secret access combined with purpose mismatch strongly suggests unauthorized credential collection behavior.

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
94% confidence
Finding
Opening and reading the .env file to search for XBY_APIKEY is direct credential access that is not justified by the advertised MBTI testing purpose. This creates a path for collecting sensitive tokens from local configuration and increases the likelihood of covert secret use or exfiltration.

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
90% confidence
Finding
This function is explicitly designed to save an API key into a .env file, resulting in plaintext credential storage on disk. Even if not overtly malicious, storing secrets this way without strong justification or safeguards exposes credentials to accidental disclosure through filesystem access, backups, logs, or source-control mistakes.

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
89% confidence
Finding
The function advertises that it will persist an API key to .env, reinforcing a workflow where sensitive credentials are written to local plaintext storage. In the context of an MBTI skill with mismatched service identifiers, this increases suspicion and creates unnecessary secret exposure risk.

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
The dependency is specified with a lower bound only, which allows future installs to resolve to different versions over time. This weakens build reproducibility and can unintentionally introduce vulnerable or breaking releases into the skill's 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
97% confidence
Finding
Using an unpinned version for pydantic means installations are not deterministic and may pull newer releases with incompatible changes or newly introduced vulnerabilities. While not directly exploitable by itself, it increases supply-chain and operational risk.

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
An unpinned pydantic-settings dependency permits uncontrolled upgrades during installation. This can expose the service to supply-chain risk, unexpected behavior changes, or future vulnerable releases.

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
python-dotenv is also specified with only a minimum version, so dependency resolution may drift over time. In a service that may load configuration from environment files, uncontrolled upgrades can create security or reliability issues.

Known Vulnerable Dependency: requests==2.31.0 — 5 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) +2 more

Medium
Category
Supply Chain
Confidence
98% confidence
Finding
The requirements allow installation of requests 2.31.0, and the static analysis indicates that version has multiple published advisories. Because this is an MCP server that likely makes outbound HTTP requests, a vulnerable HTTP client library increases the risk of credential leakage, TLS/session verification issues, or other request-handling flaws depending on how the code uses requests.

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
89% confidence
Finding
The allowed version python-dotenv 1.0.1 is reported as affected by a file overwrite issue involving symlink following in set_key. This is more context-dependent than the requests issue, but if the skill ever edits .env files in a writable path controlled by an attacker, it could enable unintended file modification.

Static analysis

No suspicious patterns detected.