T09 · Insecure Skill Coding Practices
- Location
SKILL.md:90- Finding
Unsafe Guidance to Copy Existing SSH Private Keys Between Devices
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a disclosed Git/SSH sync workflow, but it asks users to sync sensitive Claude configuration through a fixed root SSH relay and gives unsafe credential-storage guidance.
Install only if you own or explicitly trust the configured relay server and GitHub account, and review every file before pushing. Replace root SSH access with a restricted Git user, generate a unique SSH key per device, do not copy private keys between machines, avoid PATs in URLs or plaintext credential stores, and use stronger secret scanning before syncing Claude configuration, hooks, skills, or memory.
SKILL.md:90Unsafe Guidance to Copy Existing SSH Private Keys Between Devices
SKILL.md:437GitHub Personal Access Tokens Are Persisted in Plaintext
SKILL.md:696Repository Synchronization Uses an Overprivileged Root SSH Account
SKILL.md:281Broad Git Staging Can Upload Secrets Missed by an Inadequate Scanner
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
# 然后手动将公钥添加到服务器 ~/.ssh/authorized_keys
# 或从旧电脑上 scp 已有密钥对
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
# 然后手动将公钥添加到服务器 ~/.ssh/authorized_keys
# 或从旧电脑上 scp 已有密钥对
The workflow normalizes handling GitHub credentials in insecure ways, including embedding personal access tokens in URLs and storing them server-side. In the context of a sync skill that operates across multiple machines and a relay server, this expands the credential exposure surface and can lead to repository compromise if the token is leaked.
This duplicate finding refers to the same personal access token guidance and is valid for the same reason: the documentation operationalizes high-privilege credential use in a way that can expose the token. In a multi-host sync architecture, compromise of one endpoint or the relay can leak access to archived repositories.
获取 GitHub Personal Access Token:GitHub Settings → Developer settings → Personal access tokens → 创建,勾选 `repo` 权限。
**步骤 5:验证归档**
This duplicate finding refers to the same personal access token guidance and is valid for the same reason: the documentation operationalizes high-privilege credential use in a way that can expose the token. In a multi-host sync architecture, compromise of one endpoint or the relay can leak access to archived repositories.
获取 GitHub Personal Access Token:GitHub Settings → Developer settings → Personal access tokens → 创建,勾选 `repo` 权限。
**步骤 5:验证归档**
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).
### 1. 绝不删除本地文件
- 所有 git 操作使用安全模式(`--ff-only`、不使用 `--force`)
- pull 冲突时报告给用户,不自动覆盖
- **禁止的命令**:`git reset --hard`、`git clean -f`、`git checkout .`、`git push --force`
### 2. 增量优先
- git 天然增量传输,日常同步通常 < 1 MB
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).
### 1. 绝不删除本地文件
- 所有 git 操作使用安全模式(`--ff-only`、不使用 `--force`)
- pull 冲突时报告给用户,不自动覆盖
- **禁止的命令**:`git reset --hard`、`git clean -f`、`git checkout .`、`git push --force`
### 2. 增量优先
- git 天然增量传输,日常同步通常 < 1 MB
The skill states GitHub tokens are never written to tracked files, but its backup workflow instructs users to place a token in a remote URL stored in git config. That persists credentials on disk in plaintext-like form and increases the risk of token disclosure through config inspection, logs, shell history, backups, or accidental sharing.
L003 的自然语言描述完全以中文呈现,且全文未说明该技能仅面向特定中文环境,也未提供语言/locale 选择机制。按照该规则,若技能隐含强制特定语言而无用户选择或明确、合理的区域限定,应视为语言/locale 政策问题。
The skill claims local data is always safe and that operations are only additive, but later instructions recommend stash/pop and rebase or merge-based pulls. Those workflows can rewrite working state, create conflicts, or drop unapplied local edits if handled incorrectly, so the safety guarantee is materially misleading.
L041 将“同步数据”“拉取同步”“推送同步”“数据备份”“同步状态”作为触发词,其中“同步数据”“数据备份”“同步状态”等表述较宽泛,容易与普通对话或其他同步/备份任务重叠。文档虽列出示例触发词,但未提供排除条件或限定必须指向 Claude Code 配置同步场景。
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.
claude-config 变更:
修改: skills/ai-auto-dev/skill.md
新增: skills/data-sync/SKILL.md
共 2 个文件
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.
claude-config 变更:
修改: skills/ai-auto-dev/skill.md
新增: skills/data-sync/SKILL.md
共 2 个文件
knowledge-base 变更:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
如果有 GitHub token 可用,额外通过 API 验证:
curl -s -H "Authorization: token <token>" \
https://api.github.com/repos/mwangxiang/<仓库>/tags | head -20
步骤 6:生成归档报告
The file instructs users to perform root-level server operations and to add a remote targeting a root SSH account on a public IP, but it provides no warning about the risks of modifying privileged repositories or operating as root. In the context of a sync tool for sensitive Claude configuration, this increases the chance of accidental destructive changes or compromise of all synchronized data if the root account or relay server is misused.
The document uses Chinese throughout and does not offer any language choice or note that the skill is intentionally region- or team-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.
No suspicious patterns detected.