T09 · Insecure Skill Coding Practices
- Location
SKILL.md:338- Finding
Anthropic API Key Exposed Through Troubleshooting Command
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a broad personal-assistant wrapper that may run an unaudited local CLI with access to API keys, activity logs, calendar/task data, and network services.
Review this skill carefully before installing. Only use it if you trust the separate `lee-cli` executable and can verify exactly which package/version is installed. Avoid running the troubleshooting commands that print API keys, and do not use summary or todo features unless you are comfortable with local activity logs and calendar/work data being processed and possibly sent to configured APIs.
SKILL.md:338Anthropic API Key Exposed Through Troubleshooting Command
publish-to-clawhub.sh:75Publication Script Recursively Packages Unapproved Files
SKILL.md:190Runtime Delegated to an Unpinned and Unauditable PATH-Resolved CLI
The declared description presents an end-user AI assistant skill focused on weather jokes, news, summaries, learning resources, and todo management. The supplied code does none of those tasks. Instead, it is a developer-oriented release script for preparing and packaging the skill for publication, including file checks, Git inspection, directory copying, cleanup, ZIP creation, and publication instructions. This is a materially different primary purpose with undeclared filesystem and repository access, so the description does not accurately represent the code.
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).
mkdir -p "$PUBLISH_DIR"
cp -r "$SKILL_DIR" "$PUBLISH_DIR/lee-cli" 2>/dev/null || true
rm -rf "$PUBLISH_DIR/lee-cli/.git" 2>/dev/null || true
rm -rf "$PUBLISH_DIR/lee-cli/node_modules" 2>/dev/null || true
echo -e " ${GREEN}✓${NC} 发布包已生成: $PUBLISH_DIR/lee-cli"
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).
cp -r "$SKILL_DIR" "$PUBLISH_DIR/lee-cli" 2>/dev/null || true
rm -rf "$PUBLISH_DIR/lee-cli/.git" 2>/dev/null || true
rm -rf "$PUBLISH_DIR/lee-cli/node_modules" 2>/dev/null || true
echo -e " ${GREEN}✓${NC} 发布包已生成: $PUBLISH_DIR/lee-cli"
The example trigger phrases are extremely broad natural-language requests such as asking for a joke, today's news, or a work summary. In a skill-routing system, such generic phrases can overlap heavily with ordinary conversation and cause unintended invocation of this skill, leading to surprising command execution, network access, or access to activity logs when the user did not explicitly intend to use lee-cli.
This markdown file is written entirely in Chinese and presents all user-facing instructions, status text, and publication guidance in that language. Under the policy rule, a skill should not impose a specific language or locale unless it offers user opt-in or clearly documents a justified regional constraint, neither of which appears here.
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.
| 文档 | 位置 | 用途 |
|------|------|------|
| **SKILL.md** | `~/.claude/skills/lee-cli/SKILL.md` | Skill定义和使用指南 |
| **README.md** | `~/.claude/skills/lee-cli/README.md` | 项目介绍 |
| **SECURITY.md** | `~/.claude/skills/lee-cli/SECURITY.md` | 安全审查 |
| **CLAWHUB_SUBMISSION.md** | `~/.claude/skills/lee-cli/CLAWHUB_SUBMISSION.md` | 提交信息 |
The description highlights work-summary convenience but does not prominently warn that the feature analyzes Claude Code activity logs. Users may invoke the skill through casual language without realizing local behavioral data will be parsed, which creates a transparency and privacy issue.
Claiming 'No external data exfiltration' conflicts with the stated use of external weather/news APIs and cloud-backed generation. Even if the transfers are expected for functionality, presenting them as nonexistent undermines informed consent and can hide privacy risk from users and reviewers.
The document states that no data is sent to third-party servers while also declaring network access for weather/news APIs and AI-powered features. This mismatch can mislead users about privacy boundaries, causing them to expose prompts, activity data, or API-linked metadata under false assumptions about local-only processing.
The natural-language invocation examples are broad everyday phrases such as asking for a joke, news, work summary, or todo items. In agent environments, overly generic triggers can cause unintended execution of the skill, including network access or analysis of local activity logs without the user deliberately selecting this tool.
The README states that the skill will '自动分析 Claude Code 活动记录' to generate work summaries, but it does not warn users that activity records may contain sensitive prompts, file names, code fragments, secrets, or other private workspace context. Without a privacy notice and consent boundary, users may unknowingly authorize processing of sensitive data.
The README suggests very broad natural-language triggers such as '讲个笑话' or '今天有什么新闻?' that are common in ordinary conversation. In an agent/skill-routing environment, such generic phrases can cause unintended invocation of this skill, leading users to disclose data or trigger external actions without clearly intending to use lee-cli.
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
## What This Skill Does NOT Do
❌ Does not execute arbitrary code from external sources
❌ Does not modify system files without permission
❌ Does not send user data to third-party servers
❌ Does not install backdoors or persistent services
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
## What This Skill Does NOT Do
❌ Does not execute arbitrary code from external sources
❌ Does not modify system files without permission
❌ Does not send user data to third-party servers
❌ Does not install backdoors or persistent services
❌ Does not access sensitive credentials (except user-provided API key)
Very broad triggers like requests for a joke, weather, or general help can cause the skill to activate during ordinary conversation without the user understanding that local commands or data-backed operations may run. In this skill, accidental activation is more concerning because some features may inspect work activity or calendar/task sources.
The invocation examples remain generic and overlap with normal assistant conversation, which increases the chance of unintended command execution. Because this skill can trigger CLI actions and potentially touch personal productivity data, ambiguous routing materially increases privacy and safety risk.
The work-summary feature says it will analyze Claude Code activity records, file operations, tool usage, generated code, and completed tasks, but it does not prominently warn that personal work history may be inspected. This can expose sensitive project names, files, prompts, or behavioral metadata without informed consent.
The todo feature combines calendar events and ongoing work-task data to generate priorities, but it does not clearly disclose that potentially sensitive scheduling and task information will be accessed. Calendar metadata can reveal meetings, contacts, project names, deadlines, and patterns of activity, making silent access privacy-sensitive.
The skill instructs the agent to run commands like echo $ANTHROPIC_API_KEY and env | grep ANTHROPIC, which expose sensitive environment-variable values into command output. Even for troubleshooting, revealing API keys is unnecessary and increases the chance of secret disclosure through logs, transcripts, or downstream tool outputs.
The script's interactive output is primarily in Chinese, including status messages, checklist items, and next-step instructions. This imposes a specific language on users without any opt-in, fallback, or documented justification for a locale-specific audience, which matches the language/locale policy violation criteria.
SQP-3 适用于所有文件。该发布指南及示例整体强制以中文呈现,但未说明这是面向特定中文受众的区域化文档,或是否允许用户按偏好选择其他语言;这可能构成语言/locale 约束未获用户选择的政策问题。
The skill is presented as a personal assistant CLI for weather, news, summaries, learning resources, and todos. The troubleshooting section instructs changing directories into a local source tree and running npm link, which is a developer environment/package management action not justified by the skill’s stated functional scope.
The natural-language description is entirely in Chinese and presents the skill as a general-purpose AI assistant CLI, but there is no indication that the language is optional or that the tool is intended only for a Chinese-speaking context. Under the language/locale policy, forcing a specific language without opt-in can be a policy concern.