Back to skill

Security audit

Github Trending Daily

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it ships a live DingTalk webhook token and sends scheduled messages to a fixed external destination that users cannot clearly control.

Review before installing. Do not run the default command or cron examples unless you intend to send GitHub Trending summaries to the embedded DingTalk robot. The webhook token should be rotated and replaced with a user-controlled secret, preferably from an environment variable, before publication or use in a real workspace.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
github-trending-daily.py:23
Finding

Hard-Coded DingTalk Webhook Credential

Content
View full analysis

Vulnerability Details

File Location: github-trending-daily.py, line 23
Vulnerability Type: Hard-coded secret / plaintext access token
Risk Level: High

Vulnerable Code

python
DINGTALK_WEBHOOK = "https://oapi.dingtalk.com/robot/send?access_token=0d8da1a9a2f0360d7a4c086bb849127b53ed36984db025c5c649083185ebd8fe"

Technical Analysis

A DingTalk robot webhook URL containing an access token is embedded directly in the source code. Anyone who can read the repository, a distributed Skill package, source archives, logs containing the source, or repository history can recover this credential.

The script uses this URL as an authorization-bearing endpoint when transmitting Markdown messages. Possession of the URL may therefore allow an attacker to submit messages directly to the associated DingTalk robot without running the Skill. A configured DingTalk security keyword could limit accepted payloads, but it is not a substitute for protecting and rotating the webhook credential.

Attack Path

  1. An attacker obtains a copy of the Skill source or accesses its repository history.
  2. The attacker extracts the complete DingTalk webhook URL and access_token from line 23.
  3. The attacker constructs a DingTalk-compatible JSON request, including any required security keyword.
  4. The attacker sends the request directly to the exposed webhook endpoint.
  5. If the credential remains active and server-side controls accept the request, the robot posts the attacker-controlled message to its configured DingTalk destination.

Impact Assessment

Successful exploitation does not provide local operating-system privileges or arbitrary code execution. It may provide unauthorized use of the configured DingTalk robot within the webhook's existing scope.

Potential impact includes:

  • Impersonating the legitimate notification Skill.
  • Sending spam, misleading links, or social-engineering content.
  • Disrupting the integrity and reliability of automated notif ...[truncated 154 chars]
Remediation
View remediation

Remediation Suggestions

  1. Revoke and rotate the exposed DingTalk webhook token immediately; removing it from the current source alone does not invalidate copies or repository history.
  2. Remove the webhook URL from source code and load it from a protected environment variable or secret manager, for example:
python
import os

DINGTALK_WEBHOOK = os.environ.get("DINGTALK_WEBHOOK")
if not DINGTALK_WEBHOOK:
    raise RuntimeError("DINGTALK_WEBHOOK is not configured")
  1. Configure the secret only in the runtime environment. Restrict access to configuration files and ensure they are excluded from version control.
  2. Redact webhook URLs and tokens from application output, exception reporting, CI logs, and diagnostic bundles.
  3. Enable available DingTalk safeguards, such as request signing, keyword restrictions, source IP restrictions, and rate limits. Store signing secrets using the same protected mechanism.
  4. Add automated secret scanning to commits and CI pipelines to prevent future credential disclosure.
  5. If repository history is accessible, remove the credential from historical revisions where practical while still treating rotation as mandatory.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill is explicitly designed to fetch GitHub Trending data and automatically push the results to a DingTalk group, including via scheduled execution. That creates outbound network transmission to a third-party endpoint, but the documentation does not clearly warn users about the automatic external delivery behavior or the data flow involved, which can lead to unintended message transmission in enterprise environments.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

The documentation instructs users to install the skill into crontab for recurring execution, creating persistent automated behavior that continues after the initial invocation. Persistence is not inherently malicious here, but it increases risk because the skill performs periodic network access and external message delivery, so misconfiguration or compromise could cause repeated unintended outbound actions.

Content

Scanner excerpt · SKILL.md (reported line 35)May include surrounding context.

工作日每天早上 9 点推送

bash
# 编辑 crontab
crontab -e

# 添加以下行
0 9 * * 1-5 /usr/bin/python3 ~/.openclaw/workspace/skills/github-trending-daily/github-trending-daily.py

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 75)May include surrounding context.

md
1. **推送失败**: 检查钉钉机器人 Webhook 是否有效
2. **无数据**: 检查网络连接或 GitHub 访问状态
3. **定时任务未执行**: 检查 cron 服务状态 `sudo systemctl status cron`

## 相关技能

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring, CLI help text, and runtime messages are all written in Chinese, with no indication that users can select another language or that the skill is intended only for a Chinese-speaking or region-specific environment. This is a natural-language locale constraint and matches the policy-violation category because it imposes a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

All user-facing documentation and examples are presented only in Chinese, and the file does not indicate that this locale restriction is optional or region-specific. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The module docstring's usage section documents --dry-run as the non-sending preview mode, but the actual CLI also implements --no-push as a separate mode that fetches data and skips sending. This is not just missing detail in function internals; it creates a user-facing intent/documentation divergence about available non-sending behaviors.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.