T01 · Skill Instruction Hijacking
- Location
SKILL.md:71- Finding
Mandatory Loading of Unreviewed External Skill Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This coding workflow skill is broad and partly coherent, but it needs Review because it force-loads unreviewed external skill files, includes unsafe command execution paths, and persists task/log data beyond a narrow coding task.
Install only after review and hardening. Before use, remove or replace absolute-path external skill loading with packaged pinned dependencies, disable permissive external-agent modes, fix shell=True gate execution, restrict file reads to the project, redact or disable command logging, and make memory/archives/auto-commit behavior explicit and opt-in.
SKILL.md:71Mandatory Loading of Unreviewed External Skill Instructions
scripts/instinct-manager.py:147Persistent Behavioral-Rule Injection with Global Promotion
scripts/loop-controller.py:808Arbitrary Command Execution Through Unsanitized Gate File Arguments
hooks/post-exec-log.sh:12Persistent Audit Logging of Unredacted Command-Line Secrets
hooks/pre-exec-check.sh:34Documented Security Pattern Database Is Not Enforced by the Pre-Execution Hook
scripts/loop-controller.py:206Automatic Git Snapshot Commits Stage the Entire Repository
scripts/review-orchestrator.py:202Review Orchestrator Can Read and Delegate Arbitrary Local Files
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
---
name: coding-framework
description: "Orchestrate the complete coding workflow with multiple development modes (TDD/incremental/spec-dr..."
tags: [coding, backend, multi-agent, iterative, template-based]
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).
# 完整三层验证
python D:\Users\yindb2\AppData\Roaming\mx\openclaw-home\yindb2\.openclaw\workspace\skills\coding-framework\scripts\layered_validate.py src/main.py
# 跳过测试(仅语法+语义�?python D:\Users\yindb2\AppData\Roaming\mx\openclaw-home\yindb2\.openclaw\workspace\skills\coding-framework\scripts\layered_validate.py src/main.py --skip-tests
# JSON 输出
python D:\Users\yindb2\AppData\Roaming\mx\openclaw-home\yindb2\.openclaw\workspace\skills\coding-framework\scripts\layered_validate.py src/main.py --format json
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).
gh pr create --head fix/issue-78 --title "fix: ..." --body "..."
git worktree remove /tmp/issue-78
### Worktree 冲突处理(v10.1 新增)
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-8)
1. **危险命令** (critical) — rm -rf /, format, diskpart, mkfs
2. **注册表操作** (critical) — reg add/delete, Set-ItemProperty HKLM
3. **账户管理** (critical) — net user, useradd, Add-LocalGroupMember
4. **服务管理** (high) — sc delete/config, systemctl, net start/stop
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-8)
1. **危险命令** (critical) — rm -rf /, format, diskpart, mkfs
2. **注册表操作** (critical) — reg add/delete, Set-ItemProperty HKLM
3. **账户管理** (critical) — net user, useradd, Add-LocalGroupMember
4. **服务管理** (high) — sc delete/config, systemctl, net start/stop
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-8)
1. **危险命令** (critical) — rm -rf /, format, diskpart, mkfs
2. **注册表操作** (critical) — reg add/delete, Set-ItemProperty HKLM
3. **账户管理** (critical) — net user, useradd, Add-LocalGroupMember
4. **服务管理** (high) — sc delete/config, systemctl, net start/stop
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-8)
1. **危险命令** (critical) — rm -rf /, format, diskpart, mkfs
2. **注册表操作** (critical) — reg add/delete, Set-ItemProperty HKLM
3. **账户管理** (critical) — net user, useradd, Add-LocalGroupMember
4. **服务管理** (high) — sc delete/config, systemctl, net start/stop
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
9. **敏感数据传输** (high) — scp .ssh/.env, curl -d password
10. **代码执行风险** (high) — eval(拼接), exec(拼接), subprocess shell=True
11. **敏感信息泄露** (high) — 硬编码 API key, Bearer token
12. **路径遍历** (high) — ../../, %2e%2e, /etc/passwd
### 注入攻击(13-15)
rm src/main.py is a direct destructive command that deletes a source file, and in a skill/reference document it may be copied and executed without scrutiny. In this context the command is more dangerous because it is presented as a recommended corrective step, which can lead to accidental data loss, disruption of a working tree, or deletion of uncommitted work.
# }
# 纠正:删除代码,先写测试
rm src/main.py
# 先写 tests/test_main.py
python scripts/tdd_runner.py red tests/test_main.py # 确认红灯
# 再写 src/main.py
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 /tmp/build
coding-framework 处理流程:
1. PreExec hook 触发
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
severity: high pattern: ((password|passwd|pwd|secret|private_key|access_key)\s*=\s*['"][^'"]{4,}|(username|user|uid)\s*=\s*['"]admin['"]) message: "检测到硬编码凭证:凭证应存储在安全位置" suggestion: "使用环境变量、.env 文件或密钥管理服务" cwe: CWE-798
The documentation says only deletions affecting more than 50 files require manual approval, but the configured rule blocks matching bulk-delete patterns unconditionally. This policy/implementation mismatch can cause operators to misunderstand what is permitted, leading to unsafe workarounds, rule bypass attempts, or unexpected denial of legitimate maintenance operations.
The script concatenates command fragments and file names into a single string and executes it with shell=True in the gate runner. In the context of an agent skill that may process externally influenced filenames or arguments, this substantially increases danger because a crafted filename like '; curl ... | sh' could execute arbitrary shell commands with the agent's privileges.
full_cmd = f"{command} {' '.join(str(f) for f in files)}"
try:
result = subprocess.run(
full_cmd, shell=True, capture_output=True, text=True,
timeout=timeout, encoding="utf-8", errors="replace"
)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
AGENT_SELECTION_RULES = {
"security-auditor": {
"patterns": [r"password", r"secret", r"token", r"auth", r"login", r"encrypt", r"credential"],
"extensions": [".env", ".pem", ".key", ".cert"],
"keywords": ["security", "安全", "漏洞", "audit"],
},
"test-engineer": {
The skill instructions are written almost entirely in Chinese and present the operating guidance in that language without offering the user a language choice or documenting a justified locale restriction. This creates a natural-language policy issue because it effectively imposes a language/locale on users by default.
The trigger keywords are extremely broad and overlap with normal software conversation, making it easy for unrelated prompts to activate expansive workflow behavior automatically. In this skill, that matters because activation can cascade into reading other files, invoking tools, and applying rigid process rules without clear user intent.
The skill hard-codes absolute host paths under the user's home directories and instructs the agent to read them directly, including archived and workspace skill stores. That expands access beyond the current project boundary and can expose unrelated local files, private prompts, credentials, or sensitive operational data if the agent follows these instructions.
The design-gate triggers are broad enough that many ordinary implementation requests would force additional workflow steps and file reads. While not directly exfiltrating data, overbroad activation increases the chance of unnecessary tool use and unauthorized access to external skill documents in this skill's context.
The archival instructions direct the agent to persist execution logs, learnings, changes, and conversation-derived task history into local files. That creates broad, durable retention of potentially sensitive user requests, codebase details, secrets present in logs, and operational context beyond what is necessary to complete the task.
The hard rule in L0249-L0267 forbids file paths in plan/task/spec documents. Yet the Plan Mode format in L1148-L1166 defines '相关文件' with path lists and task checklist items like 创建数据模型 models/user.py, which is an active contradiction rather than a mere omission.
Lines L0249-L0253 state a hard rule that task specs, plans, and delegated briefs must not reference specific file paths or line numbers, only behavior. However, the examples and templates in L1148-L1166 include concrete paths such as models/user.py, api/auth.py, and pages/Login.tsx, directly contradicting that stated rule for plan content.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| 优先�?| 方式 | 适用场景 | 示例 |
|--------|------|----------|------|
| 1 | **Failing Test** | 有测试框架的项目 | `pytest tests/test_bug.py -v` / `npm test -- --grep "bug"` |
| 2 | **Curl/HTTP Script** | API/服务�?bug | `curl -X POST localhost:3000/api/bug-endpoint -d '{}'` |
| 3 | **CLI Invocation + Fixture** | CLI 工具 bug | `python cli.py process --input fixture.json` |
| 4 | **Throwaway Harness** | 无测试框架的函数/模块 | 临时 Python/JS 脚本调用目标函数 |
| 5 | **HITL Bash Script** | 需要人工验证的 UI/视觉 bug | `bash verify.sh`(最后手段,需人工确认�?|
The progress-ledger and recovery workflow is designed to preserve task and session context across compaction and later continuation, including commit ranges and prior work state. Durable cross-session memory like this can retain sensitive project details and user instructions longer than expected, increasing exposure if the workspace is shared or later compromised.
The CoreCoder submode's instruction to record all fixes into memory logs creates unnecessary persistence of task-derived information. Depending on implementation, those logs may capture sensitive code changes, user requests, or debugging context that should not be broadly retained.
In L1873-L1875, the CoreCoder safety rules say 'do not delete files, only move to bak'. Elsewhere, the workflow instructs deleting originals such as removing task files after archiving (L0411) and deleting debug-log lines with sed -i (L1373-L1377), which conflicts with that purported safety rule.
No suspicious patterns detected.