Back to skill

Security audit

MbtiClaude

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned but should be reviewed carefully because it automatically reads and aggregates private prompt histories from several local AI tools.

Install only if you are comfortable letting it read AI prompt histories that may contain secrets, code, personal notes, or business data. Prefer reviewing the file first, using a pinned release or commit, and limiting or cleaning local history files before running it.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:88
Finding
Automatic Cross-Tool Collection of Sensitive Conversation Histories<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:88-176` **Vulnerability Type**: Automatic access to private conversation histories without per-source consent or data minimization **Risk Level**: Medium ### Vulnerable Code ```python def extract_claude_code_prompts(limit=100): """提取 Claude Code 用户提示词""" history_file = Path.home() / ".claude" / "history.jsonl" prompts = [] if history_file.exists(): with open(history_file, 'r') as f: for line in f: try: data = json.loads(line) if data.get('display'): prompts.append(data['display']) except: continue return prompts[-limit:] if prompts else [] def extract_codex_prompts(limit=100): """提取 Codex 用户提示词""" history_file = Path.home() / ".codex" / "history.jsonl" prompts = [] if history_file.exists(): with open(history_file, 'r') as f: for line in f: try: data = json.loads(line) if data.get('text'): prompts.append(data['text']) except: continue return prompts[-limit:] if prompts else [] def extract_gemini_prompts(limit=100): """提取 Gemini 用户提示词""" gemini_dir = Path.home() / ".gemini" / "tmp" prompts = [] if gemini_dir.exists(): for session_file in gemini_dir.rglob("session-*.json"): try: with open(session_file, 'r') as f: data = json.load(f) messages = data.get('messages', []) for msg in messages: if msg.get('role') == 'user': content = msg.get('content', '') if content: prompts.append(content) except: continue return prompts[-limit:] if prompt ...[truncated 4178 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require explicit confirmation before accessing any history files. 2. Present each supported data source separately and default all sources to disabled. 3. Display the resolved file paths and estimated record counts before reading content. 4. Allow users to select a specific tool, session, file, and date range. 5. Avoid recursive directory enumeration unless the user explicitly authorizes it. 6. Process only the minimum features needed for analysis, such as local length and keyword counts, rather than retaining complete prompt text. 7. Add local secret and personal-data redaction before aggregation. 8. Clear raw prompts from memory as soon as derived metrics are calculated. 9. Document the local processing trust boundary and all files that may be accessed. 10. Fail closed on malformed files and log only paths or counts, never raw prompt content. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:32
Finding
Unpinned Remote Package Execution and Mutable Skill Installation<![CDATA[ ## Vulnerability Details **File Location**: `README.md:32-56` **Additional Location**: `mbticlaude/SKILL.md:66-75` **Vulnerability Type**: Unpinned remote dependency and mutable supply-chain installation **Risk Level**: Medium ### Vulnerable Code ```bash # Install from GitHub npx skills add xmanrui/mbtiClaude # Or use full URL npx skills add https://github.com/xmanrui/mbtiClaude ``` ```bash # One-click install npx github:xmanrui/mbtiClaude # View help npx github:xmanrui/mbtiClaude --help ``` ```bash # Using curl curl -fsSL https://raw.githubusercontent.com/xmanrui/mbtiClaude/main/SKILL.md -o ~/.claude/skills/mbticlaude.md # Or using git clone git clone https://github.com/xmanrui/mbtiClaude.git /tmp/mbtiClaude cp /tmp/mbtiClaude/SKILL.md ~/.claude/skills/mbticlaude.md rm -rf /tmp/mbtiClaude ``` The secondary Skill file repeats the unsafe installation patterns: ```bash npx skills add xmanrui/mbtiClaude ``` ```bash curl -fsSL https://raw.githubusercontent.com/xmanrui/mbtiClaude/main/SKILL.md -o ~/.claude/skills/mbticlaude.md ``` ### Technical Analysis The documented `npx` commands resolve and execute content from external package or GitHub sources without pinning an immutable version, commit hash, or integrity digest. Consequently, the code executed at installation time can differ from the content reviewed during this audit. The `curl` and `git clone` alternatives obtain content from the mutable `main` branch. Although the `curl` response is written to a file rather than executed directly by the shell, that file is installed as a Skill and can control later Agent behavior. The clone-and-copy workflow has the same mutability problem. HTTPS protects transport integrity but does not protect against repository takeover, compromised maintainer credentials, malicious upstream changes, or altered package publication. No checksum, signature, lockfile, release pin, or manual verification step is provided. ### Attack Path 1. An attacker compromise ...[truncated 1151 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin installations to a signed release and an immutable Git commit. 2. Avoid `npx github:` for direct execution of mutable repository content. 3. Publish versioned packages through a controlled registry and use exact versions rather than floating tags. 4. Publish SHA-256 checksums for release artifacts and require verification before installation. 5. Sign release artifacts and document signature verification procedures. 6. Replace references to the mutable `main` branch with immutable release URLs or commit-specific raw URLs. 7. Download artifacts to a temporary location, verify integrity, and show their contents before installing them. 8. Disable or carefully audit package lifecycle scripts. 9. Add automated release provenance, such as signed tags and build attestations. 10. Document how users can verify that the installed Skill matches the reviewed release. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (37)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Or using git clone
git clone https://github.com/xmanrui/mbtiClaude.git /tmp/mbtiClaude
cp /tmp/mbtiClaude/SKILL.md ~/.claude/skills/mbticlaude.md
rm -rf /tmp/mbtiClaude
```

### Usage
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Or using git clone
git clone https://github.com/xmanrui/mbtiClaude.git /tmp/mbtiClaude
cp /tmp/mbtiClaude/SKILL.md ~/.claude/skills/mbticlaude.md
rm -rf /tmp/mbtiClaude
```

### Usage
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Or using git clone
git clone https://github.com/xmanrui/mbtiClaude.git /tmp/mbtiClaude
cp /tmp/mbtiClaude/SKILL.md ~/.claude/skills/mbticlaude.md
rm -rf /tmp/mbtiClaude
```

### Usage
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Or using git clone
git clone https://github.com/xmanrui/mbtiClaude.git /tmp/mbtiClaude
cp /tmp/mbtiClaude/SKILL.md ~/.claude/skills/mbticlaude.md
rm -rf /tmp/mbtiClaude
```

### Usage
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Ssd 3

High
Confidence
99% confidence
Finding
The skill is explicitly designed to collect and aggregate prompt history from five separate AI tools, which are likely to contain sensitive personal, business, credential, and project information. Aggregating private logs across tools substantially increases privacy risk and expands the blast radius of any accidental disclosure or downstream misuse.

Missing User Warnings

High
Confidence
97% confidence
Finding
The notes discuss MBTI validity but omit a prominent warning that the skill reads private prompt history from multiple local applications. That prevents informed consent and can mislead users into invoking a data-harvesting workflow without understanding the scope of collection.

Ssd 3

High
Confidence
99% confidence
Finding
The implementation directly reads local files containing entire user prompt histories from multiple applications. Even if only used for MBTI inference, this behavior creates bulk access to highly sensitive content and could expose secrets, proprietary data, or personal communications far beyond what is necessary for the stated purpose.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
except:
                    continue
    
    return prompts[-limit:] if prompts else []

def extract_codex_prompts(limit=100):
    """提取 Codex 用户提示词"""
Confidence
99% confidence
Finding
This function returns extracted Claude Code prompt history, which is direct access to private user inputs. Prompt histories often contain credentials, API keys, internal code, customer data, and personal information, so exposing them for secondary analysis is dangerous and disproportionate to the MBTI use case.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
except:
                    continue
    
    return prompts[-limit:] if prompts else []

def extract_gemini_prompts(limit=100):
    """提取 Gemini 用户提示词"""
Confidence
99% confidence
Finding
This function returns extracted Codex prompt history, enabling direct reuse of private user interactions for an unrelated purpose. Cross-context reuse of prompt logs can reveal confidential development work and sensitive instructions that users never intended to be mined for profiling.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
except:
                continue
    
    return prompts[-limit:] if prompts else []

def extract_opencode_prompts(limit=100):
    """提取 OpenCode 用户提示词"""
Confidence
99% confidence
Finding
This function collects and returns Gemini user message content from local session files, constituting direct harvesting of conversational history. Because these messages may include sensitive personal or organizational information, bulk extraction creates a significant privacy and data leakage risk.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
except:
                    continue
    
    return prompts[-limit:] if prompts else []

def extract_openclaw_prompts(limit=100):
    """提取 OpenClaw 用户提示词"""
Confidence
99% confidence
Finding
This function returns OpenCode prompt history from a local state file, exposing raw user prompts for secondary analysis. The issue is not just reading local files, but returning a corpus of sensitive natural-language data that may contain secrets or regulated information.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
except:
                continue
    
    return prompts[-limit:] if prompts else []

def analyze_communication_style(prompts):
    """分析沟通风格 (E vs I) - 优化版"""
Confidence
99% confidence
Finding
This function returns OpenClaw prompt history after filtering some system messages, but it still retains user text verbatim. Filtering out system strings does nothing to mitigate the main risk: direct collection of potentially sensitive prompts from prior sessions for profiling purposes.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The README advertises automatic extraction of local AI prompt history from multiple tools but does not prominently warn, up front, that this may include sensitive prompts, secrets, proprietary code, or personal data. Because the skill’s purpose is to aggregate and analyze conversation history across tools, weak disclosure materially increases the risk of users exposing highly sensitive local data unintentionally.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The README instructs users to run `npx skills add xmanrui/mbtiClaude` without pinning a specific version or commit. This allows whatever code is current at install time to be fetched and executed, creating a supply-chain risk if the package, resolver, or referenced repository is compromised or changed unexpectedly.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
Using `npx skills add https://github.com/xmanrui/mbtiClaude` fetches live remote content without a pinned revision. A later repository change or compromise could cause users to install different code than the author originally documented.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
The repeated `npx skills` usage still relies on an unpinned tool/package path, which can resolve to changing code over time. In a skill-installation context, that means users may execute unreviewed updates implicitly.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
`npx github:xmanrui/mbtiClaude` pulls and executes code from a GitHub repository without pinning a commit or release. This is a classic supply-chain risk because repository contents can change or be hijacked after the README is published.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
The help command still invokes the same unpinned `npx github:` target, which requires resolving and running remote code first. Even a seemingly harmless `--help` can execute package lifecycle or bootstrap logic from compromised upstream content.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The usage section tells users to run `/mbticlaude` or `python3 mbti_analyzer.py` without clearly stating that doing so will read historical prompts from multiple local AI tools. In this context, the omission is significant because prompt histories often contain secrets, credentials, confidential work content, and personal information, making accidental over-collection more likely.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This is the Chinese duplicate of the same unpinned `npx skills add` installation instruction. It carries the same supply-chain exposure because users are directed to install mutable remote content.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This line again points users to install from a floating GitHub URL through `npx skills add`, making the installed content dependent on future repository state. In a security-sensitive agent skill ecosystem, mutable install targets are risky.

Static analysis

No suspicious patterns detected.