Back to skill

Security audit

mbti-from-ai

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent with its MBTI-history purpose, but it broadly collects and keeps private chat history and sends the derived profile to third-party page code for visualization.

Install only if you are comfortable letting the skill read broad OpenClaw chat history, store extracted messages locally in _mbti_work, process those messages through your configured LLM backend, and open a third-party visualization page containing the derived profile and short quotes. Prefer running it only in a private workspace, reviewing/deleting _mbti_work afterward, and avoiding it on accounts that contain secrets, work data, or sensitive personal conversations.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/discover-sessions.sh:33
Finding

Excessive Collection and LLM Processing of Private Conversation History

Content
View full analysis
/dev/null >> "$SESSION_LIST" || true fi # Scan agents/ directory, including subdirectories such as agents/main/sessions/ if [ -d "$OPENCLAW_DIR/agents" ]; then echo " Scanning agents/ ..." find "$OPENCLAW_DIR/agents" -type f \( -name "*.jsonl" -o -name "*.jsonl.reset.*" \) 2>/dev/null >> "$SESSION_LIST" || true fi # If nothing was found, recursively search the entire OpenClaw directory LINE_COUNT=$(wc -l < "$SESSION_LIST" | tr -d ' ') if [ "$LINE_COUNT" -eq 0 ]; then echo " No JSONL files found in sessions/ or agents/; trying recursive search..." find "$OPENCLAW_DIR" -type f \( -name "*.jsonl" -o -name "*.jsonl.reset.*" \) 2>/dev/null >> "$SESSION_LIST" || true find "$OPENCLAW_DIR" -name "*.json" -type f ! -name "sessions.json" ! -name "config.json" ! -name "package.json" ! -name "skill.json" 2>/dev/null >> "$SESSION_LIST" || true fi ``` ```python MAX_MESSAGES = 10000 all_messages = [] for filepath in filepaths: if not os.path.exists(filepath): print(f" ⚠️ File does not exist: {filepath}") continue basename = os.path.basename(filepath) if '.jsonl' in basename: msgs = extract_from_jsonl(filepath) elif filepath.endswith('.json'): msgs = extract_from_json(filepath) else: continue all_messages.extend(msgs) if len(all_messages) >= MAX_MESSAGES: all_messages = all_messages[:MAX_MESSAGES] break ``` The Skill instructions subsequently direct the agent to read the extracted file and p ...[truncated 2921 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/extract_messages.py:245
Finding

Extracted Conversation History Is Persisted as Unprotected Plaintext

Content
View full analysis
Remediation
View remediation

other

Warning
Location
scripts/encode-and-open.sh:15
Finding

MBTI Profile and Conversation Quotations Are Exposed to Mutable Third-Party Page Code

Content
View full analysis
/dev/null || cat "$RESULT_FILE" | tr -d '\n' | tr -d '\r' | base64 2>/dev/null) # Use a fragment instead of a query parameter URL="${BASE_URL}#data=${BASE64}" ``` ```bash # Try to open a browser if command -v open &>/dev/null; then open "$URL" 2>/dev/null && echo "Opened in browser" || echo "Automatic opening failed" elif command -v xdg-open &>/dev/null; then xdg-open "$URL" 2>/dev/null && echo "Opened in browser" || echo "Automatic opening failed" elif command -v start &>/dev/null; then start "$URL" 2>/dev/null && echo "Opened in browser" || echo "Automatic opening failed" else echo "Unable to open a browser automatically" fi ``` ### Technical Analysis A URL fragment is not transmitted as part of the initial HTTP request, but it is fully accessible to JavaScript executing in the loaded document through `location.hash`. The intended renderer must read the fragment to decode and display the profile. The target document is hosted on `www.mingxi.tech`, while its HTML and JavaScript are not included or cryptographically pinned in the audited project. Therefore, the repository cannot substantiate claims that the page is permanently static, that analytics never reads the fragment, or that future page code will not transmit profile data elsewhere. Base64 is an encoding rather than encryption. The fragment reportedly contains the complete `result.json`, including personality inferences and short quotations from private conversations. Once the remote page is loaded, any first-party script, third-p ...[truncated 1496 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill description centers on local analysis and visualization, but the workflow depends on opening a third-party website and embedding analysis output into an external URL hash. Even if the author claims hashes are not sent server-side, this still introduces an external browsing step and trust dependency that should be clearly disclosed as part of the primary behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description centers on local analysis and visualization, but the workflow depends on opening a third-party website and embedding analysis output into an external URL hash. Even if the author claims hashes are not sent server-side, this still introduces an external browsing step and trust dependency that should be clearly disclosed as part of the primary behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description centers on local analysis and visualization, but the workflow depends on opening a third-party website and embedding analysis output into an external URL hash. Even if the author claims hashes are not sent server-side, this still introduces an external browsing step and trust dependency that should be clearly disclosed as part of the primary behavior.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The duplicate RA2 finding is substantively valid for the same reason: the workflow persists aggregated user-message corpora and derived personality analysis to disk. Because the stored data comes from broad historical chat collection, the context makes routine local persistence more sensitive than ordinary temp-file use.

Content

Scanner excerpt · SKILL.md (reported line 5)May include surrounding context.

md
name: mbti-from-ai
version: 0.2.0
description: 分析用户与 AI 的聊天历史,根据沟通方式和思维模式推断 MBTI 人格类型,生成结构化 JSON 并在网页上展示可视化画像。
allowed-tools: Bash, Read, Glob, Grep, Write
---

# mbti-from-ai

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The duplicate RA2 finding is substantively valid for the same reason: the workflow persists aggregated user-message corpora and derived personality analysis to disk. Because the stored data comes from broad historical chat collection, the context makes routine local persistence more sensitive than ordinary temp-file use.

Content

Scanner excerpt · SKILL.md (reported line 5)May include surrounding context.

md
name: mbti-from-ai
version: 0.2.0
description: 分析用户与 AI 的聊天历史,根据沟通方式和思维模式推断 MBTI 人格类型,生成结构化 JSON 并在网页上展示可视化画像。
allowed-tools: Bash, Read, Glob, Grep, Write
---

# mbti-from-ai

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill directs aggregation of the user’s entire chat history and inclusion of verbatim excerpts in generated outputs. This is dangerous because it centralizes sensitive historical conversations into a new derived dataset and increases the chance of exposing confidential, identifying, or irrelevant personal information beyond the minimum needed for the requested task.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The privacy notice says the output is desensitized and does not contain sensitive conversation content, yet the required JSON includes direct user quotes as evidence. Even short excerpts can contain identifying or confidential details, making the privacy claim misleading and increasing risk of inadvertent disclosure.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The extraction step explicitly instructs the agent to search all sessions and collect all user messages into a local corpus. Broad collection across all sessions magnifies privacy risk, especially when unrelated conversations, secrets, workplace content, or personal data are swept in without granular selection or consent.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Requiring direct quotations from past conversations as evidence creates a concrete disclosure channel for sensitive historic content. Even when limited to 50 characters, excerpts can still reveal names, projects, health details, credentials, or distinctive phrasing that identifies the user.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction to infer and output ‘1-2’ real or fictional people the user may know goes beyond MBTI classification and encourages speculative profiling about the user’s social/cultural context. This expands sensitive inference without a clear necessity for the feature and can expose personal associations or create creepy, overreaching output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The instruction says the skill must detect the user's primary language and output in that language automatically. This is a locale/language policy issue because it removes user choice and does not offer an explicit opt-in or override for the output language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script scans a user-private data directory and persists a list of discovered session file paths into a working directory without any privacy notice or consent prompt. Even if only paths are stored, filenames and directory structure can reveal sensitive usage patterns, projects, or agent activity, which is risky in a personality-analysis skill processing chat history.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The fallback logic recursively searches the entire ~/.openclaw tree and also includes generic .json files beyond obvious session paths. For an MBTI skill, this broad discovery scope can collect unrelated agent data and metadata, increasing unnecessary access to user data and creating privacy exposure if later processing or exfiltration occurs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script's natural-language comments and user-facing messages are entirely in Chinese, including operational guidance and status/error output. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script extracts user chat content from session archives and writes the raw messages to _mbti_work/user_messages.txt and a count file without any consent prompt, warning, minimization, or access-control step. Because this skill is explicitly processing personal conversation history for personality inference, the stored output is likely to contain sensitive or identifying information, increasing privacy and data-retention risk if the workspace is shared, synced, logged, or later reused.

Content

No source excerpt is available for this finding.

Ssd 3

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Inferring ‘similar people’ the user may know adds speculative disclosure about their likely social or cultural familiarity, which is unnecessary for MBTI analysis. While lower impact than whole-history collection, it still broadens the profile produced from private conversations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's natural-language comments and console output are in Chinese throughout, with no option to select another language or indication that the skill is intentionally region-specific. This can violate language/locale policy when users are not given a choice or prior notice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file's natural-language comments are written only in Chinese, describing the script's behavior without offering any language choice or stating that the skill is intended for a Chinese-only audience. This can conflict with language/locale policy requirements when users have not opted into that language.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.