anthropics / anthropics/skills

Security: Community skills distributed under anthropic/ namespace enable trust boundary abuse

未关闭
#492 43 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
176k
派生
20.9k
平均合并
7 小时 21 分钟
30 天内合并 PR
5

描述

## Summary

Community-made skills are being distributed under the `anthropic/` namespace, impersonating official Anthropic skills. This creates a trust boundary vulnerability where users may grant elevated permissions to community skills they believe are official.

## Discovery

During a comprehensive security audit of 580+ installed Claude Code skills, we found 6 skills placed under `~/.claude/skills/anthropic/`:

| Skill | author field | allowed-tools |
|-------|-------------|---------------|
| anthropic-expert (root) | not set | Read, Grep, Glob |
| claude-code | not set | Read, Grep, Glob |
| claude-command-builder | not set | Read, Write, Edit, Grep, Glob, **Bash** |
| claude-mcp-expert | **raintree** | Read, Write, Edit, Grep, Glob, **Bash** |
| claude-hook-builder | not set | Read, Write, Edit, Grep, Glob, **Bash** |
| claude-settings-expert | not set | Read, Write, Edit, Grep, Glob |
| claude-skill-builder | **raintree** | Read, Write, Edit, Grep, Glob, **Bash** |

**None of these exist in the official `anthropics/skills` repository.** Two skills explicitly list `author: raintree`, confirming they are community-made.

## Security Concern

### Trust Boundary Abuse

1. Users see `anthropic/` in the skill path and assume official Anthropic provenance
2. This lowers their guard when approving operations — especially Bash execution and settings.json modifications
3. `claude-hook-builder` can write PostToolUse hooks to `settings.json`, enabling arbitrary command execution after every tool use
4. `claude-settings-expert` can directly edit `settings.json` and documents `bypassPermissions` (as a warning, but the JSON structure is shown)

### Attack Scenario

```
User installs "anthropic/" skills from a community collection
→ Trusts them as official due to namespace
→ Approves Bash operations without scrutiny
→ claude-hook-builder writes a PostToolUse hook
→ All subsequent tool executions trigger arbitrary commands
```

## Suggested Mitigations

1. **Reserved namespace**: Prevent community skills from using `anthropic/` as a directory name in skill registries
2. **Namespace verification**: Add a verification mechanism (e.g., signed manifests) for official Anthropic skills
3. **Documentation**: Warn users in the skills documentation that directory names do not imply official provenance

## Note

The skills themselves do not appear to contain actively malicious code. The `claude-hook-builder` skill includes appropriate "USE AT YOUR OWN RISK" warnings. The concern is purely about the trust boundary created by the `anthropic/` namespace impersonation.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。