Back to skill

Security audit

ai日报

Security checks for vulnerabilities and agentic risk

Overview

The skill's AI-news tracking purpose is coherent, but its installer has unsafe local filesystem behavior and an injection-prone validation step that users should review before installing.

Review install.sh before running it. Install only to a normal Claude skills directory you control, do not pass a custom path from untrusted instructions, and avoid running the installer with elevated privileges. Prefer manually copying the skill or fixing the validation block to pass file paths as Python arguments before installation.

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:124
Finding

Arbitrary Python Code Execution Through Installer Path Injection

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 information:') print(f' Name: {data.get(\"name\", \"N/A\")}') print(f' Description: {data.get(\"description\", \"N/A\")[:60]}...') print('') print('✅ Skill format validation passed') else: print('⚠️ SKILL.md format may be invalid') except Exception as e: print(f'⚠️ Validation warning: {e}') " ``` ### Technical Analysis `TARGET_DIR` is attacker-controllable because it is assigned directly from `$1`. Although shell variable expansion occurs inside a double-quoted shell string, the expanded value is inserted into a single-quoted Python string literal inside the `python3 -c` program. Shell quoting therefore does not make the value safe for the Python parser. A target directory containing a single quote and additional Python syntax can terminate the intended string literal and introduce an expression or statement that Python evaluates. For example, a ...[truncated 2438 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (31)

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 55)May include surrounding context.

解决方法:

bash
# 检查文件
cat ~/.claude/skills/ai-tech-tracker/SKILL.md

# 检查权限
chmod -R 755 ~/.claude/skills/ai-tech-tracker

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The guide includes a forceful recursive deletion command in a user-facing uninstall flow with no safeguards. Even though the path is specific, destructive command examples are dangerous in skill documentation because users may execute them verbatim in the wrong environment, with shell expansion issues, or after modifying the target path.

Content

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

Q3: 如何卸载 Skill

bash
rm -rf ~/.claude/skills/ai-tech-tracker

许可证

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The guide includes a forceful recursive deletion command in a user-facing uninstall flow with no safeguards. Even though the path is specific, destructive command examples are dangerous in skill documentation because users may execute them verbatim in the wrong environment, with shell expansion issues, or after modifying the target path.

Content

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

Q3: 如何卸载 Skill

bash
rm -rf ~/.claude/skills/ai-tech-tracker

许可证

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明的用途是内容层面的 AI 行业动态追踪与分析,但代码块实际并未实现任何抓取、分析、评级或国内外市场区分逻辑。相反,它是一个本地安装器,执行系统环境检测、目录查找、复制文件、覆盖已有安装、chmod 修改权限以及格式校验等操作。这些能力属于安装/部署行为,且涉及本地文件系统访问与变更,而声明中既未说明这是安装脚本,也未声明相关权限或资源访问。因此该代码与描述的主要目的存在实质性不一致,应判定为 mismatch。

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The script performs a recursive deletion using a path partly derived from user input: rm -rf "$TARGET_DIR/$SKILL_NAME". Although it prompts before overwriting an existing install, it does not validate that TARGET_DIR is a safe Claude skills path, so a user can be induced to pass a sensitive location and the installer will delete a matching subdirectory there. In an installer context, destructive filesystem operations are more dangerous because users expect convenience and may run the script with 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 "  感谢使用 AI技术动向追踪 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 21)May include surrounding context.

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

# 2. 复制 Skill 到该目录
cp -r /path/to/ai-tech-tracker ~/.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 21)May include surrounding context.

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

# 2. 复制 Skill 到该目录
cp -r /path/to/ai-tech-tracker ~/.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 21)May include surrounding context.

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

# 2. 复制 Skill 到该目录
cp -r /path/to/ai-tech-tracker ~/.claude/skills/

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 55)May include surrounding context.

解决方法:

bash
# 检查文件
cat ~/.claude/skills/ai-tech-tracker/SKILL.md

# 检查权限
chmod -R 755 ~/.claude/skills/ai-tech-tracker

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The uninstall section instructs users to run a recursive force-delete command without any warning, path verification, or confirmation guidance. While the specific target path is narrow, destructive shell commands in documentation can cause accidental data loss if copied incorrectly, variables expand unexpectedly, or users adapt the command unsafely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description, examples, and usage instructions are entirely in Chinese, and there is no indication that users may interact in other languages or opt into Chinese-only operation. Under the language/locale policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

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 metadata sets language: zh-CN, and the skill content and examples are entirely in Chinese, but the document does not state that this is optional or limited to a China-specific compliance or regional use case. This can violate language/locale policy because it implicitly fixes the interaction language without user opt-in.

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 output and suggested usage examples are entirely in Chinese, including the invocation phrases presented to the user. Under the policy, forcing a specific language without opt-in is a locale/language policy issue unless the skill clearly documents that it is intentionally region-specific or offers alternatives.

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

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 111)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 113)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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The installer instructs users to invoke the skill using only Chinese phrases, which implies a required interaction language. Because no language choice or justification is provided in the script, this appears to violate the language/locale policy for natural-language behavior.

Content

No source excerpt is available for this finding.