Back to skill

Security audit

My MBTI

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Chinese MBTI conversation-style skill, with only a low-risk maintenance script that exposes developer-local paths if inspected or manually run.

Installers should understand that this skill changes response style based on MBTI labels and is mainly Chinese-language. The bundled extraction script should not be run casually; maintainers should remove or parameterize its hardcoded local paths before using it to regenerate references.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Note
Location
scripts/extract_mbti_pdfs.py:4
Finding

Absolute Local Path and Developer Identity Disclosure

Content
View full analysis

Vulnerability Details

File Location: scripts/extract_mbti_pdfs.py, lines 4-5 and 20
Vulnerability Type: Local filesystem metadata disclosure through hard-coded paths and generated artifacts
Risk Level: Low

Vulnerable Code

python
src = Path(r"D:\SOFTWARE\AppData\Desktop\MBTI")
out = Path(r"C:\Users\fuetsui\.openclaw\workspace\skills\my-mbti\references")
python
content = f"# {code}\n\nSource PDF: `{pdf}`\n\nOriginal title: {title}\n\n{body}\n"

Technical Analysis

The script hard-codes workstation-specific absolute paths, including the developer username fuetsui and the local OpenClaw workspace layout. This information is directly exposed to anyone who receives the source package.

In addition, the script inserts the complete source PDF path into every generated Markdown file. Because pdf is obtained from recursive traversal of the absolute source directory, its string representation can include usernames, private directory names, document organization, and other local filesystem metadata.

The second disclosure occurs when generated Markdown files are committed, published, uploaded, or otherwise shared. No network transmission or unauthorized file access is implemented by the script itself.

Attack Path

  1. An attacker obtains the distributed Skill package and inspects scripts/extract_mbti_pdfs.py.
  2. The hard-coded output path immediately reveals a developer username and local workspace structure.
  3. A maintainer runs the extraction script against a local PDF collection.
  4. The script writes each absolute source PDF path into the corresponding generated Markdown file.
  5. The generated files are committed or shared without metadata review.
  6. The attacker inspects the Source PDF fields to identify local usernames, directory structures, document names, or organizational information.

Impact Assessment

The issue exposes local identity and filesystem metadata. It may reveal:

  • The developer username.
  • Loc ...[truncated 413 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace hard-coded paths with explicit command-line parameters:
python
import argparse
from pathlib import Path

parser = argparse.ArgumentParser()
parser.add_argument("source", type=Path)
parser.add_argument("output", type=Path)
args = parser.parse_args()

src = args.source.resolve()
out = args.output.resolve()
  1. Do not include absolute source paths in generated files. Record only a non-sensitive filename when provenance is required:
python
content = (
    f"# {code}\n\n"
    f"Source PDF: `{pdf.name}`\n\n"
    f"Original title: {title}\n\n"
    f"{body}\n"
)
  1. Consider omitting the source field entirely if it is not needed at runtime.

  2. Add a publication check that rejects generated artifacts containing Windows drive paths, home-directory paths, usernames, or other absolute paths.

  3. Keep environment-specific configuration outside the distributed Skill package, such as in ignored local configuration files or command-line arguments.

  4. Regenerate and review all reference files after applying the fix to ensure no historical local path metadata remains.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个面向对话阶段的 MBTI 风格切换技能;而给出的代码并不实现任何对话逻辑、人格识别、风格切换或会话内即时响应。它只是从本地目录读取 PDF 并转换为 Markdown 参考资料,属于内容抽取/构建脚本。虽然该脚本可能是为该技能准备参考数据的支持性步骤,但就该代码片段本身而言,其主要目的与声明的技能功能存在明显偏差,而且包含未声明的本地文件读取与写入能力。

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ENFJ.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ENFP.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ENTJ.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ENTP.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ESFJ.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ESFP.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ESTJ.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ESTP.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/INFJ.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/INFP.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/INTJ.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/INTP.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ISFJ.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ISFP.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ISTJ.md (reported line 1)May include surrounding context.

md
# ISTP

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ISTP.md (reported line 1)May include surrounding context.

md
# ISTP

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire skill specification is written as prescriptive Chinese response guidance, including tone, phrasing, and style, with no indication that the user can opt into another language. This creates a natural-language locale policy concern because it appears to constrain the assistant to a specific language without user choice or an explicit region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file is entirely written as a prescriptive persona/behavior description in Chinese, with no indication that users may choose another language or that the skill is limited to a Chinese-language context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language content of the skill is entirely in Chinese and provides no indication that language choice is optional or user-selectable. Under the language/locale policy rule, this can constitute a locale policy violation because it implicitly enforces a specific language without documented opt-in or region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file defines the skill's persona and operating style exclusively in Chinese, and it does not indicate that the user can opt into another language or that the skill is intentionally limited to a Chinese-speaking context. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file’s headings and response-style guidance are entirely written in Chinese, indicating the skill is designed to respond in Chinese by default. There is no visible opt-in, language-selection mechanism, or justification that this is a region-specific skill, so this can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire skill description is written in Chinese and specifies response style and phrasing only in Chinese, with no indication that the user can choose another language. This creates a natural-language policy concern because it effectively constrains the skill to a specific language without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire skill description is written as prescriptive Chinese-language behavior guidance, including response style and phrasing, with no indication that the user can opt into another language. Under the policy, forcing a specific language or locale without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.