Back to skill

Security audit

热梗百科

Security checks for vulnerabilities and agentic risk

Overview

The skill's meme-research behavior is coherent, but its installer has a real unsafe path-handling issue that could execute unintended Python code if a crafted install path is used.

Review the installer before running it. Prefer manual installation or only run install.sh with the default detected skills directory from a trusted local path; do not pass an install path supplied by someone else. The skill's runtime behavior appears limited to public meme research, but the install script should be fixed before broad distribution.

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

Error
Location
install.sh:60
Finding

Arbitrary Python Code Injection Through the Installation Path

Content
View full analysis
/dev/null; then python3 -c " import yaml import sys try: with open('$TARGET_DIR/$SKILL_NAME/SKILL.md', 'r', encoding='utf-8') as f: content = f.read() if content.startswith('---'): _, frontmatter, _ = content.split('---', 2) data = yaml.safe_load(frontmatter) print('📋 Skill 信息:') print(f' 名称: {data.get(\"name\", \"N/A\")}') print(f' 描述: {data.get(\"description\", \"N/A\")[:60]}...') print('') print('✅ Skill 格式验证通过') else: print('⚠️ SKILL.md 格式可能不正确') except Exception as e: print(f'⚠️ 验证警告: {e}') " else echo "⚠️ 未检测到 Python3,跳过格式验证" fi ``` ### Technical Analysis `TARGET_DIR` is derived directly from attacker-influenced command-line input. Although the shell variable is expanded inside a shell double-quoted string, its value is ultimately embedded inside a single-quoted Python string literal: ```python with open('$TARGET_DIR/$SKILL_NAME/SKILL.md', ...) ``` Shell quoting does not escape the value for the Python language. A target directory containing a single quote, newline, and crafted Python statements can terminate or restructure the Python string and insert arbitrary statements into the program passed to `python3 -c`. The preceding filesystem commands quote ` ...[truncated 2300 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (33)

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 98)May include surrounding context.

解决方法:

bash
# 检查文件
cat ~/.claude/skills/trending-meme-encyclopedia/SKILL.md

# 检查权限
chmod -R 755 ~/.claude/skills/trending-meme-encyclopedia

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This command is a true risky pattern because it instructs irreversible deletion using force and recursion in a shell context. The skill context makes it somewhat less dangerous than a hidden or obfuscated command, but install guides are frequently copy-pasted verbatim, increasing the chance of accidental destructive execution.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 116)May include surrounding context.

Q3: 如何卸载 Skill

bash
rm -rf ~/.claude/skills/trending-meme-encyclopedia

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This command is a true risky pattern because it instructs irreversible deletion using force and recursion in a shell context. The skill context makes it somewhat less dangerous than a hidden or obfuscated command, but install guides are frequently copy-pasted verbatim, increasing the chance of accidental destructive execution.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 116)May include surrounding context.

Q3: 如何卸载 Skill

bash
rm -rf ~/.claude/skills/trending-meme-encyclopedia

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The script accepts a user-supplied TARGET_DIR and later performs rm -rf on $TARGET_DIR/$SKILL_NAME after only an existence check and overwrite prompt. If a user supplies an unexpected path, or if the resolved target is a symlinked or sensitive location, the installer can delete arbitrary directories recursively, causing destructive data loss. In skill-installation context this is more dangerous because installers are commonly run with high trust and sometimes elevated privileges.

Content

Scanner excerpt · install.sh (reported line 83)May include surrounding context.

sh
echo "安装已取消"
        exit 0
    fi
    rm -rf "$TARGET_DIR/$SKILL_NAME"
fi

# 创建目录

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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).

Content

Scanner excerpt · install.sh (reported line 166)May include surrounding context.

sh
echo ""
echo "🗑️  如需卸载,请运行:"
echo "  rm -rf $TARGET_DIR/$SKILL_NAME"
echo ""
echo "========================================"
echo "  感谢使用热梗百科 Skill! 🔥"

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 25)May include surrounding context.

bash
# 1. 创建 Claude Code skills 目录
mkdir -p ~/.claude/skills

# 2. 复制 Skill 到该目录
cp -r /path/to/trending-meme-encyclopedia ~/.claude/skills/

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 41)May include surrounding context.

bash
# 1. 创建 Claude Code skills 目录
mkdir -p ~/.claude/skills

# 2. 复制 Skill 到该目录
cp -r /path/to/trending-meme-encyclopedia ~/.claude/skills/

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 25)May include surrounding context.

bash
# 1. 创建 Claude Code skills 目录
mkdir -p ~/.claude/skills

# 2. 复制 Skill 到该目录
cp -r /path/to/trending-meme-encyclopedia ~/.claude/skills/

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 25)May include surrounding context.

bash
# 1. 创建 Claude Code skills 目录
mkdir -p ~/.claude/skills

# 2. 复制 Skill 到该目录
cp -r /path/to/trending-meme-encyclopedia ~/.claude/skills/

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 47)May include surrounding context.

cp -r trending-meme-encyclopedia ~/.claude/skills/

验证安装

ls ~/.claude/skills/trending-meme-encyclopedia/SKILL.md

text

### 方法二:项目级安装

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 47)May include surrounding context.

cp -r trending-meme-encyclopedia ~/.claude/skills/

验证安装

ls ~/.claude/skills/trending-meme-encyclopedia/SKILL.md

text

### 方法二:项目级安装

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 98)May include surrounding context.

cp -r trending-meme-encyclopedia ~/.claude/skills/

验证安装

ls ~/.claude/skills/trending-meme-encyclopedia/SKILL.md

text

### 方法二:项目级安装

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 54)May include surrounding context.

bash
# 在项目根目录
mkdir -p your-project/.claude/skills
cp -r trending-meme-encyclopedia your-project/.claude/skills/

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file includes an rm -rf ~/.claude/skills/trending-meme-encyclopedia uninstall instruction, which permanently deletes files from the user's system. The guide does not include any warning, confirmation note, or cautionary text about the destructive nature of this command.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · INSTALL_GUIDE.md (reported line 138)May include surrounding context.

bash
# 设置全局 skills 目录
claude config set skillsDir ~/.claude/skills

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
95% confidence
Finding

The manifest sets language: zh-CN, and the document consistently frames the skill as operating in Chinese without stating that users may choose another language. This is a natural-language locale policy concern because it imposes a specific language setting rather than offering an explicit opt-in or alternative.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document title and the entire template are written as a fixed Chinese output format, which imposes a specific language/locale by default. Under the policy, language constraints should either be user-selectable or explicitly justified; this template provides neither.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 105)May include surrounding context.

sh
# 设置权限
echo "🔧 设置文件权限..."
chmod 755 "$TARGET_DIR/$SKILL_NAME"
chmod 644 "$TARGET_DIR/$SKILL_NAME"/*.md
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts" 2>/dev/null || true
chmod 644 "$TARGET_DIR/$SKILL_NAME/scripts/"* 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 107)May include surrounding context.

sh
# 设置权限
echo "🔧 设置文件权限..."
chmod 755 "$TARGET_DIR/$SKILL_NAME"
chmod 644 "$TARGET_DIR/$SKILL_NAME"/*.md
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts" 2>/dev/null || true
chmod 644 "$TARGET_DIR/$SKILL_NAME/scripts/"* 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 109)May include surrounding context.

sh
# 设置权限
echo "🔧 设置文件权限..."
chmod 755 "$TARGET_DIR/$SKILL_NAME"
chmod 644 "$TARGET_DIR/$SKILL_NAME"/*.md
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts" 2>/dev/null || true
chmod 644 "$TARGET_DIR/$SKILL_NAME/scripts/"* 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 110)May include surrounding context.

sh
# 设置权限
echo "🔧 设置文件权限..."
chmod 755 "$TARGET_DIR/$SKILL_NAME"
chmod 644 "$TARGET_DIR/$SKILL_NAME"/*.md
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts" 2>/dev/null || true
chmod 644 "$TARGET_DIR/$SKILL_NAME/scripts/"* 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 112)May include surrounding context.

sh
# 设置权限
echo "🔧 设置文件权限..."
chmod 755 "$TARGET_DIR/$SKILL_NAME"
chmod 644 "$TARGET_DIR/$SKILL_NAME"/*.md
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts" 2>/dev/null || true
chmod 644 "$TARGET_DIR/$SKILL_NAME/scripts/"* 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 106)May include surrounding context.

sh
# 设置权限
echo "🔧 设置文件权限..."
chmod 755 "$TARGET_DIR/$SKILL_NAME"
chmod 644 "$TARGET_DIR/$SKILL_NAME"/*.md
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts" 2>/dev/null || true
chmod 644 "$TARGET_DIR/$SKILL_NAME/scripts/"* 2>/dev/null || true
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts/"*.py 2>/dev/null || true

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · install.sh (reported line 108)May include surrounding context.

sh
# 设置权限
echo "🔧 设置文件权限..."
chmod 755 "$TARGET_DIR/$SKILL_NAME"
chmod 644 "$TARGET_DIR/$SKILL_NAME"/*.md
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts" 2>/dev/null || true
chmod 644 "$TARGET_DIR/$SKILL_NAME/scripts/"* 2>/dev/null || true
chmod 755 "$TARGET_DIR/$SKILL_NAME/scripts/"*.py 2>/dev/null || true