T09 · Insecure Skill Coding Practices
- Location
modules/export/main.md:105- Finding
Unsafe ZIP Import Instructions Permit Path Traversal Outside the Knowledge-Base Directory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This local knowledge-management skill is mostly purpose-aligned, but it needs Review because hooks, imports, and update checks can persist message content or use network/shell behavior beyond the advertised local-only boundary.
Install only if you are comfortable with a local knowledge manager that writes persistent records and optional hooks. Before enabling hooks, confirm auto_record is explicitly set the way you want, avoid sending secrets in complex-task prompts, and prefer manual review before imports or exports. Treat shared ZIP imports as untrusted unless the importer is updated to validate every archive path, and disable automatic update checks if you need a strict no-network/no-shell setup.
modules/export/main.md:105Unsafe ZIP Import Instructions Permit Path Traversal Outside the Knowledge-Base Directory
hooks/openclaw/handler.ts:17OpenClaw Hook Fails Open and Can Persist Message Content Without Recorded Consent
hooks/openclaw/hook-guide.md:93Documented OpenClaw Hook Template Forwards Full Messages Without Consent or Redaction
hooks/claude/handler.js:67Claude Hook Silently Forwards and Persists Complete User Messages
core/main.md:29Mandatory Background Update Check Violates the Declared No-Network and No-Shell Boundary
README.md:90Unpinned npx Installation Command Executes Mutable Third-Party Package Content
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).
# CodeBuddy
rm -rf ~/.codebuddy/skills/myknowledge
# WorkBuddy
rm -rf ~/.workbuddy/skills/myknowledge
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).
# CodeBuddy
rm -rf ~/.codebuddy/skills/myknowledge
# WorkBuddy
rm -rf ~/.workbuddy/skills/myknowledge
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).
# CodeBuddy
rm -rf ~/.codebuddy/skills/myknowledge
# WorkBuddy
rm -rf ~/.workbuddy/skills/myknowledge
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).
# CodeBuddy
rm -rf ~/.codebuddy/skills/myknowledge
# WorkBuddy
rm -rf ~/.workbuddy/skills/myknowledge
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).
rm -rf ~/.codebuddy/skills/myknowledge
# WorkBuddy
rm -rf ~/.workbuddy/skills/myknowledge
# OpenClaw
rm -rf ~/.openclaw/skills/myknowledge
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).
rm -rf ~/.workbuddy/skills/myknowledge
rm -rf ~/.openclaw/skills/myknowledge
---
Referenced artifact was not completely inspected
| `SKILL.md` | 本文件,Skill 主入口 |
The skill states that it does not perform networking or call external APIs, yet its update-check design instructs loading source-based update-check logic that may require external version checks. This contradiction is dangerous because users may trust a no-network guarantee while the skill still contains a pathway for outbound access or externally influenced behavior.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
采用 JWT + Refresh Token 双令牌方案:
- 客户端 → Nginx → Auth Service → Redis(Token 存储)
- 客户端 → Nginx → Auth Service → PostgreSQL(用户数据)
- 会话管理:Access Token(15min)+ Refresh Token(7d)
### 1.2 模块划分
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
采用 JWT + Refresh Token 双令牌方案:
- 客户端 → Nginx → Auth Service → Redis(Token 存储)
- 客户端 → Nginx → Auth Service → PostgreSQL(用户数据)
- 会话管理:Access Token(15min)+ Refresh Token(7d)
### 1.2 模块划分
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
采用 JWT + Refresh Token 双令牌方案:
- 客户端 → Nginx → Auth Service → Redis(Token 存储)
- 客户端 → Nginx → Auth Service → PostgreSQL(用户数据)
- 会话管理:Access Token(15min)+ Refresh Token(7d)
### 1.2 模块划分
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
采用 JWT + Refresh Token 双令牌方案:
- 客户端 → Nginx → Auth Service → Redis(Token 存储)
- 客户端 → Nginx → Auth Service → PostgreSQL(用户数据)
- 会话管理:Access Token(15min)+ Refresh Token(7d)
### 1.2 模块划分
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
采用 JWT + Refresh Token 双令牌方案:
- 客户端 → Nginx → Auth Service → Redis(Token 存储)
- 客户端 → Nginx → Auth Service → PostgreSQL(用户数据)
- 会话管理:Access Token(15min)+ Refresh Token(7d)
### 1.2 模块划分
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
采用 JWT + Refresh Token 双令牌方案:
- 客户端 → Nginx → Auth Service → Redis(Token 存储)
- 客户端 → Nginx → Auth Service → PostgreSQL(用户数据)
- 会话管理:Access Token(15min)+ Refresh Token(7d)
### 1.2 模块划分
The documentation recommends a destructive command that deletes the configuration file. Even though this is presented as recovery guidance, destructive file operations triggered through agent-assisted workflows are risky because users may execute them without understanding scope, and similar patterns can normalize unsafe deletion-based remediation.
✅ 恢复方法:
cp ~/.myknowledge/config/skill-state.yaml ~/.myknowledge/config/skill-state.yaml.bak
rm ~/.myknowledge/config/skill-state.yaml
# 重新加载 Skill,会触发首次引导重建配置
The provided skill context says this skill creates knowledge bases, manages project documents, tracks requirements, and organizes personal knowledge. However, the manifest description states it is a 'path list / single source of truth' used by lint-paths.sh to validate documentation and configuration path references, which describes a developer-facing path-validation manifest rather than the declared end-user knowledge-management behavior.
Allowing '修' or '1' to trigger automatic repair is highly ambiguous and can be misfired by routine user replies, especially in multilingual or numbered-option conversations. Because the skill promises to '自动执行修复', an accidental trigger could lead to file or config changes without informed user intent.
The skill includes a destructive shell command that deletes a local configuration file. Even though the path is user-scoped, embedding raw 'rm' commands in a skill increases the risk of unsafe execution, copy-paste errors, or automated invocation without adequate validation.
cp ~/.myknowledge/config/skill-state.yaml ~/.myknowledge/config/skill-state.yaml.bak
2. 删除损坏文件:
rm ~/.myknowledge/config/skill-state.yaml
rm ~/.myknowledge/config/install-source
3. 重新触发 Skill,执行首次引导重建配置
This command deletes another configuration marker file and is paired with guidance to rebuild configuration afterward, making it an operationally destructive action. In context, the danger is elevated because the same module also promotes lightweight repair triggers, increasing the chance that destructive recovery flows are entered too easily.
删除损坏文件: rm ~/.myknowledge/config/skill-state.yaml rm ~/.myknowledge/config/install-source
重新触发 Skill,执行首次引导重建配置
This markdown file is natural-language content, so language-policy review applies. The changelog content is consistently Chinese and does not indicate that users or developers may choose another language, nor does it justify the locale restriction as region-specific, which can violate the rule against forcing a specific language without opt-in.
The changelog states that exports include detailed requirements and session content, which may contain sensitive project or personal information, but there is no adjacent privacy warning. In this skill's context, exporting knowledge bases for sharing materially raises the chance of accidental data disclosure if users are not clearly warned about what content is bundled.
The changelog documents ZIP import with automatic extraction into a user directory, which signals filesystem-modifying behavior without nearby warning about archive safety boundaries. In a knowledge-management skill, importing shared ZIPs increases risk of unsafe extraction behavior such as overwriting files, path traversal if implementation is weak, or surprising writes into the user's home directory.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
审计评分:95 → **98+**
- `chmod 755` 改为引导性表述
- `console.log` 改为条件日志 + 脱敏
- 测试场景文件加安全警告
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
审计评分:95 → **98+**
- `chmod 755` 改为引导性表述
- `console.log` 改为条件日志 + 脱敏
- 测试场景文件加安全警告
This markdown file is entirely written in Chinese and repeatedly instructs users to issue commands to the AI in Chinese, such as the examples at L155, L189-L191, L205, L273, L315, L320, and L353. There is no indication that language selection is optional or that the skill supports other locales, which can violate a language/locale policy requiring user choice or opt-in.
Detected: suspicious.destructive_delete_command