T09 · Insecure Skill Coding Practices
- Location
scripts/daily-news.sh:12- Finding
Hard-Coded Tavily API Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The core task-tracking skill is understandable, but it bundles and recommends scripts with under-disclosed external messaging, a hardcoded API key, broad local logging, and unsafe file handling.
Review before installing. Do not run scripts/daily-news.sh as-is: it contains a hardcoded Tavily key and can send a generated newsletter to an embedded Feishu user using the local account. Use this only after removing fixed credentials/recipients, making external sends opt-in, validating task IDs, and deciding what task data may be logged and retained.
scripts/daily-news.sh:12Hard-Coded Tavily API Credential
scripts/daily-news.sh:143Outbound Message Sent to a Hard-Coded Feishu Recipient
scripts/task-utils.sh:14Task ID Path Traversal and File Overwrite
scripts/task-utils.sh:22Unescaped Input Interpolation Corrupts JSON State Files
docs/task-trigger-criteria.md:90Excessive Plaintext Retention of Task and Error Data
If the referenced skill behavior really includes external news/weather fetching, a hardcoded API key, file generation, and sending messages to a specific Feishu user while presenting itself as a generic task-management framework, that concealment materially increases risk. Hidden outbound network access, embedded secrets, and fixed-recipient messaging can enable data exfiltration, unauthorized communications, or abuse under the cover of an unrelated skill purpose.
If the referenced skill behavior really includes external news/weather fetching, a hardcoded API key, file generation, and sending messages to a specific Feishu user while presenting itself as a generic task-management framework, that concealment materially increases risk. Hidden outbound network access, embedded secrets, and fixed-recipient messaging can enable data exfiltration, unauthorized communications, or abuse under the cover of an unrelated skill purpose.
If the referenced skill behavior really includes external news/weather fetching, a hardcoded API key, file generation, and sending messages to a specific Feishu user while presenting itself as a generic task-management framework, that concealment materially increases risk. Hidden outbound network access, embedded secrets, and fixed-recipient messaging can enable data exfiltration, unauthorized communications, or abuse under the cover of an unrelated skill purpose.
If the referenced skill behavior really includes external news/weather fetching, a hardcoded API key, file generation, and sending messages to a specific Feishu user while presenting itself as a generic task-management framework, that concealment materially increases risk. Hidden outbound network access, embedded secrets, and fixed-recipient messaging can enable data exfiltration, unauthorized communications, or abuse under the cover of an unrelated skill purpose.
Referenced artifact was not completely inspected
- **快速上手**:`docs/QUICKSTART.md`
A Tavily API key is hardcoded directly in the script and then used in outbound requests. Anyone with read access to the repository or deployed file can extract and abuse the credential, causing unauthorized API usage, billing exposure, and possible compromise of linked service data or quotas.
This file is supposed to provide generic task-protection functionality, but it embeds concrete business logic for pulling third-party news and sending outbound messages to a fixed Feishu recipient. In a reusable agent skill, hidden side-effecting logic increases the chance of unexpected external actions and data flows outside the user's intended task scope.
The README prominently describes the skill in Chinese and the rest of the document continues with Chinese-only user-facing guidance, but it does not state that the skill is region-specific or give users an option to choose another language. This creates a natural-language policy concern because the skill appears to impose a specific language without user opt-in.
The skill documents and encourages shell-based execution (source, bash scripts, system commands, file writes) but does not declare any explicit tool scope such as permitted shell access. In an agent environment, undeclared execution capability weakens policy enforcement and increases the chance the skill is invoked with broader command execution privileges than reviewers or runtime controls expect.
The skill's activation guidance is broad enough to cover many ordinary tasks, including critical operations, external interactions, and user-delegated work. In an agent setting, overly broad triggers can cause the skill to be applied inappropriately, expanding shell/file handling into contexts where tracking code, status-file writes, or auxiliary scripts are unnecessary and potentially risky.
The document is written entirely in Chinese and instructs the AI to present task registration and completion messages in Chinese, but it does not mention that language is optional or user-selectable. This can violate language/locale policy if the user has not opted into Chinese output.
Ambiguous trigger conditions such as 'important tasks,' 'critical operations,' and 'external interactions' leave too much room for autonomous interpretation. That can lead an agent to invoke the skill in sensitive scenarios, increasing exposure to unintended file writes, shell usage, and persistence of task metadata for actions the user did not expect to be tracked.
The document is entirely written in Chinese and presents the task-registration workflow, examples, and operator feedback in that language without indicating that language selection should follow the user's preference. In an agent skill, this can cause the assistant to respond or generate task artifacts in an unexpected locale, leading to user confusion, mishandling of operational tasks, and reduced human review effectiveness for logs and status messages.
The trigger criteria classify almost any explicit user-delegated request as requiring activation of the task-management skill, including ordinary requests like writing an article or analyzing a file. In an agentic system, this broad scope can cause the skill to attach itself to routine conversations and file-analysis tasks unnecessarily, increasing the chance of over-collection, unintended persistence, and execution of side-effecting workflows where the user did not explicitly ask for task tracking.
The script’s natural-language comments, generated newsletter content, Chinese weather language parameter, and Beijing-specific framing indicate a fixed Chinese locale/output. There is no opt-in, user choice, or documented justification that this skill is intentionally region-specific, so it violates the language/locale policy rule.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 阶段 1: 获取国际时事
task_stage "$TASK_ID" "获取国际时事" "running"
log "🌍 获取国际时事..."
INTERNATIONAL=$(curl -s "https://api.tavily.com/search" \
-H "Content-Type: application/json" \
-d "{\"api_key\": \"$TAVILY_API_KEY\", \"query\": \"国际热点新闻 时事政治\", \"topic\": \"news\", \"time_range\": \"day\", \"max_results\": 5}" \
| jq -r '.results[:3] | map("• " + .title) | join("\n")' 2>/dev/null)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 阶段 1: 获取国际时事
task_stage "$TASK_ID" "获取国际时事" "running"
log "🌍 获取国际时事..."
INTERNATIONAL=$(curl -s "https://api.tavily.com/search" \
-H "Content-Type: application/json" \
-d "{\"api_key\": \"$TAVILY_API_KEY\", \"query\": \"国际热点新闻 时事政治\", \"topic\": \"news\", \"time_range\": \"day\", \"max_results\": 5}" \
| jq -r '.results[:3] | map("• " + .title) | join("\n")' 2>/dev/null)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 阶段 1: 获取国际时事
task_stage "$TASK_ID" "获取国际时事" "running"
log "🌍 获取国际时事..."
INTERNATIONAL=$(curl -s "https://api.tavily.com/search" \
-H "Content-Type: application/json" \
-d "{\"api_key\": \"$TAVILY_API_KEY\", \"query\": \"国际热点新闻 时事政治\", \"topic\": \"news\", \"time_range\": \"day\", \"max_results\": 5}" \
| jq -r '.results[:3] | map("• " + .title) | join("\n")' 2>/dev/null)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 阶段 1: 获取国际时事
task_stage "$TASK_ID" "获取国际时事" "running"
log "🌍 获取国际时事..."
INTERNATIONAL=$(curl -s "https://api.tavily.com/search" \
-H "Content-Type: application/json" \
-d "{\"api_key\": \"$TAVILY_API_KEY\", \"query\": \"国际热点新闻 时事政治\", \"topic\": \"news\", \"time_range\": \"day\", \"max_results\": 5}" \
| jq -r '.results[:3] | map("• " + .title) | join("\n")' 2>/dev/null)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 阶段 1: 获取国际时事
task_stage "$TASK_ID" "获取国际时事" "running"
log "🌍 获取国际时事..."
INTERNATIONAL=$(curl -s "https://api.tavily.com/search" \
-H "Content-Type: application/json" \
-d "{\"api_key\": \"$TAVILY_API_KEY\", \"query\": \"国际热点新闻 时事政治\", \"topic\": \"news\", \"time_range\": \"day\", \"max_results\": 5}" \
| jq -r '.results[:3] | map("• " + .title) | join("\n")' 2>/dev/null)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 阶段 1: 获取国际时事
task_stage "$TASK_ID" "获取国际时事" "running"
log "🌍 获取国际时事..."
INTERNATIONAL=$(curl -s "https://api.tavily.com/search" \
-H "Content-Type: application/json" \
-d "{\"api_key\": \"$TAVILY_API_KEY\", \"query\": \"国际热点新闻 时事政治\", \"topic\": \"news\", \"time_range\": \"day\", \"max_results\": 5}" \
| jq -r '.results[:3] | map("• " + .title) | join("\n")' 2>/dev/null)
The script fetches data from external endpoints via curl and later attempts to send the assembled newsletter to Feishu using a CLI. While the actions are logged operationally, the file lacks any user-oriented disclosure that content will be transmitted to third-party services, which is the type of warning required for network operations in code files.
The comments at L148-L149 state that actual delivery is performed by an AI using a built-in message tool, implying this script only records status. However, L153 directly invokes an openclaw message send command to send the newsletter to a specific Feishu user. This is an active contradiction between the inline documentation and the implemented behavior.
The script's user-facing comments, task titles, log messages, warnings, and recommendations are all written in Chinese, including operational output shown to users. This creates a language/locale constraint without any opt-in or documented justification, which matches the policy-violation category for forced language selection.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
task_stage "$TASK_ID" "检查定时任务" "running"
log "📌 检查定时任务状态..."
CRON_JOBS=$(crontab -l 2>/dev/null | wc -l)
log "⏰ 定时任务数量:${CRON_JOBS}"
if [ "$CRON_JOBS" -gt 0 ]; then