T01 · Skill Instruction Hijacking
- Location
SKILL.md:128- Finding
Untrusted Remote Tasks Can Redirect Agent Behavior During Heartbeat Processing
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a legitimate task-management client, but its heartbeat workflow can make the agent act on remote tasks without clear validation or user approval.
Install only if you trust the OpenTask service and can restrict it. Do not enable automatic HEARTBEAT execution unless tasks are limited to reviewed, allowed task types with explicit approval for consequential actions. Use a narrowly scoped API key, require HTTPS for non-local hosts, and avoid putting secrets or sensitive personal data in task names, descriptions, parameters, or results.
SKILL.md:128Untrusted Remote Tasks Can Redirect Agent Behavior During Heartbeat Processing
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
配置 OPENTASK_BOT_NAME 环境变量:
# .env 文件
OPENTASK_BOT_NAME=anna
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# 使用 Runtime agent 值
curl -H "X-Bot-Key: $OPENTASK_API_KEY" \
"$OPENTASK_HOST/api/tasks/pending?assigned_to={agent}"
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
BOT_NAME="main"
# 获取待执行任务
TASKS=$(curl -s -H "X-Bot-Key: $OPENTASK_API_KEY" \
"$OPENTASK_HOST/api/tasks/pending?assigned_to=$BOT_NAME")
# 解析任务数量
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
echo "有 $COUNT 条待执行任务"
# 开始执行第一条任务
TASK_ID=$(echo "$TASKS" | python3 -c "import sys,json; print(json.load(sys.stdin)[0]['id'])")
curl -X PUT -H "X-Bot-Key: $OPENTASK_API_KEY" "$OPENTASK_HOST/api/tasks/$TASK_ID/start"
else
echo "HEARTBEAT_OK"
fi
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
echo "有 $COUNT 条待执行任务"
# 开始执行第一条任务
TASK_ID=$(echo "$TASKS" | python3 -c "import sys,json; print(json.load(sys.stdin)[0]['id'])")
curl -X PUT -H "X-Bot-Key: $OPENTASK_API_KEY" "$OPENTASK_HOST/api/tasks/$TASK_ID/start"
else
echo "HEARTBEAT_OK"
fi
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 使用 Runtime agent 值
curl -H "X-Bot-Key: $OPENTASK_API_KEY" \
"$OPENTASK_HOST/api/tasks/pending?assigned_to={agent}"
The skill documents APIs that create tasks and mutate shared task state (start, complete, fail, retry, cancel) but does not instruct the agent to obtain explicit user confirmation before performing those actions. In a shared task system, this can cause unintended task creation or state transitions that affect other operators and automated workers, especially if invoked from natural-language prompts without clear guardrails.
The HEARTBEAT section encourages automatic polling and execution of pending tasks, including starting tasks and then 'executing task logic,' without a warning that this enables unattended actions. If task contents are influenced by external users or other systems, the agent may automatically perform sensitive actions without review, amplifying the risk of prompt injection or unsafe automation.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
echo "有 $COUNT 条待执行任务"
# 开始执行第一条任务
TASK_ID=$(echo "$TASKS" | python3 -c "import sys,json; print(json.load(sys.stdin)[0]['id'])")
curl -X PUT -H "X-Bot-Key: $OPENTASK_API_KEY" "$OPENTASK_HOST/api/tasks/$TASK_ID/start"
else
echo "HEARTBEAT_OK"
fi
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 2. 目标实例开始执行(在其 heartbeat 时)
# 3. 完成任务
curl -X PUT -H "X-Bot-Key: $OPENTASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"result":"问候已发送"}' \
"$OPENTASK_HOST/api/tasks/$TASK_ID/complete"
The documentation instructs users to supply and transmit a live API key via the X-Bot-Key header, but it does not warn about treating the key as a secret, avoiding logs/history exposure, or using secure transport. In an agent skill context, this increases the chance that operators paste secrets into prompts, shells, screenshots, or insecure environments, enabling unauthorized access to the task management API.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
所有 API 请求需要携带 X-Bot-Key 请求头:
curl -H "X-Bot-Key: $OPENTASK_API_KEY" "$OPENTASK_HOST/api/tasks"
The reference documents multiple state-changing endpoints such as create, start, complete, fail, retry, and cancel without clearly warning that these operations mutate remote task state and may trigger real workflow effects. In an agent-integrated environment, this can cause accidental or unauthorized operational changes if a user or model invokes examples as if they were read-only.
The file presents operational instructions entirely in Chinese and does not indicate that the skill or reference is region-specific or provide an alternative language option. Under the stated policy, forcing a specific language without opt-in or justification is a natural-language policy concern.
No suspicious patterns detected.