Back to skill

Security audit

Telegram → QQ 自动转发

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent Telegram-to-QQ forwarding purpose, but its implementation can expose private agent-session content and lets Telegram message text reach a shell command unsafely.

Review this carefully before installing. Use it only for Telegram groups and QQ recipients where you have explicit permission to relay messages. Do not run it against arbitrary OpenClaw session files, and do not deploy the current index.js with untrusted Telegram senders until the shell command construction is replaced with execFile/spawn argument arrays and strict validation of account, target, group, and session path.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
index.js:86
Finding

Remotely Triggerable Operating System Command Injection

Content
View full analysis
100) { processedMessages.clear(); } console.log(`[telegram-qq-bridge] Forwarding to QQ: ${cleanText.substring(0, 100)}`); // Invoke openclaw message send const cmd = `openclaw message send --channel qqbot --account ${CONFIG.qqAccount} --target "${CONFIG.qqTarget}" --message "[Telegram] ${cleanText}"`; try { const result = require('child_process').execSync(cmd, { encoding: 'utf-8', timeout: 30000 }); ``` ### Technical Analysis The Skill places `cleanText`, `CONFIG.qqAccount`, and `CONFIG.qqTarget` directly into a shell command and executes the result with `child_process.execSync()`. `execSync()` invokes a system shell when given a command string, so shell metacharacters, substitutions, redirections, and command separators are interpreted. Removing the Telegram bot mention does not sanitize shell syntax. The message and target are enclosed in double quotes, but an attacker can inject a double quote to terminate the argument and then append shell commands. The account value is not quoted at all and can also be dangerous if an attacker can influence the process environment. The 30-second timeout limits execution duration but does not prevent arbitrary commands from running. ### Attack Path 1. The bridge runs with access to an OpenClaw agent session. 2. An attacker sends a Telegram message that includes the required `@ollama_openclaw_at_dzt_bot` mention. 3. The message is recorded as a user message in ...[truncated 1453 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
index.js:17
Finding

Unrestricted Agent Session Transcript Access and Cross-Session Disclosure

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
PUBLISH.md:31
Finding

Unpinned and Inconsistent Global CLI Installation Instructions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
UPLOAD_TO_CLAWHUB.sh:80
Finding

Predictable Shared Temporary File Permits Symlink Clobbering

Content
View full analysis
/tmp/clawhub-metadata.json <=2026.5.2", "node": ">=14.0.0" } } EOF # Upload RESPONSE=$(curl -s -X POST \ -F "metadata=@/tmp/clawhub-metadata.json" \ -F "file=@$TARBALL" \ -F "description=Telegram group messages forwarded automatically to QQ, event-driven, Node.js implementation" \ "https://clawhub.ai/api/skills" \ -w "\nHTTP_CODE: %{http_code}") echo "ClawHub response:" echo "$RESPONSE" # Clean up rm -f /tmp/clawhub-metadata.json ``` ### Technical Analysis The script writes metadata to a fixed, predictable path under the shared `/tmp` directory. Shell redirection follows symbolic links. The script does not create the file exclusively, verify that it is a regular file, set restrictive permissions, or use a private temporary directory. A local attacker who can write to `/tmp` can pre-create `/tmp/clawhub-metadata.json` as a symbolic link to another file writable by the script user. Running the upload helper then truncates and overwrites the symlink target. The final `rm -f` removes the symlink itself rather than restoring the overwritten target. ### Attack Path 1. A local attacker predicts that the publisher will run `UPLOAD_TO_CLAWHUB.sh`. 2. The attacker creates `/tmp/clawhub-metadata.json` as a symbolic link to a file writable by the publisher. 3. The publisher runs the helper script. 4. The `cat > /tmp/clawhub-metadata.json` redirection follows the symbolic link. 5. The target file is truncat ...[truncated 641 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
QUICKSTART.md:41
Finding

Overbroad Process Termination in Restart Instructions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (26)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · FINAL_STATUS.md (reported line 135)May include surrounding context.

2. 测试安装

bash
# 清除本地版本
rm -rf ~/.openclaw/skills/telegram-qq-bridge/

# 从 ClawHub 安装
openclaw skill install telegram-qq-bridge

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · PUBLISH_INSTRUCTIONS.md (reported line 153)May include surrounding context.

2. 测试安装

bash
# 清除本地版本
rm -rf ~/.openclaw/skills/telegram-qq-bridge/

# 从 ClawHub 安装
openclaw skill install telegram-qq-bridge

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · FINAL_STATUS.md (reported line 135)May include surrounding context.

2. 测试安装

bash
# 清除本地版本
rm -rf ~/.openclaw/skills/telegram-qq-bridge/

# 从 ClawHub 安装
openclaw skill install telegram-qq-bridge

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · PUBLISH_INSTRUCTIONS.md (reported line 153)May include surrounding context.

2. 测试安装

bash
# 清除本地版本
rm -rf ~/.openclaw/skills/telegram-qq-bridge/

# 从 ClawHub 安装
openclaw skill install telegram-qq-bridge

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

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).

Content

Scanner excerpt · UPLOAD_TO_CLAWHUB.sh (reported line 108)May include surrounding context.

sh
echo "$RESPONSE"
    
    # 清理
    rm -f /tmp/clawhub-metadata.json
    ;;
    
  *)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The report asserts that security review, testing, and release approval were completed, but the document itself provides only checklist-style claims and no verifiable evidence, methodology, logs, or links to supporting artifacts. In a security-sensitive skill distribution context, such unsupported approval language can mislead reviewers or users into trusting a package that has not actually been validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file states that the skill automatically listens to Telegram group messages and forwards them to QQ, which affects user data and transmits message content across platforms. The document does not include any warning about privacy, consent, message visibility, or the risk of relaying third-party content.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · FINAL_STATUS.md (reported line 141)May include surrounding context.

openclaw skill install telegram-qq-bridge

验证安装

ls -la ~/.openclaw/skills/telegram-qq-bridge/

text

### 使用测试

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · PUBLISH.md (reported line 139)May include surrounding context.

openclaw skill install telegram-qq-bridge

验证安装

ls -la ~/.openclaw/skills/telegram-qq-bridge/

text

### 使用测试

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · PUBLISH_INSTRUCTIONS.md (reported line 159)May include surrounding context.

openclaw skill install telegram-qq-bridge

验证安装

ls -la ~/.openclaw/skills/telegram-qq-bridge/

text

### 使用测试

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The publication instructions promote automatic forwarding of Telegram group messages to QQ but do not disclose the privacy and data-sharing implications to users or administrators. This can lead to unintended cross-platform disclosure of personal, confidential, or regulated information because messages are copied into a different service with different retention, access, and compliance properties.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The quickstart explicitly describes automatic forwarding of Telegram group messages to QQ but provides no warning, consent guidance, or privacy notice about cross-platform transfer. This can lead operators to deploy message mirroring that exposes group content, metadata, or mentions to a different audience or account without participants understanding that their messages are being relayed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The configuration section names a specific QQ account and destination OPENID pattern for direct delivery, but does not warn that messages may be routed to an individual recipient or the wrong account if misconfigured. In a bridge skill, this increases the chance of unintended disclosure of Telegram content to a personally identifiable destination.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README promotes automatic forwarding of Telegram group messages into QQ without any privacy, consent, or data-handling warning. In practice this can cause unauthorized cross-platform disclosure of private or sensitive group content, especially because the forwarding is automatic and persistent once enabled.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly advertises '事件驱动' and '无轮询' in the feature list, but the documented working principle later states the plugin '轮询监听 Telegram session 文件'. These statements directly contradict each other about how the skill operates.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation instructs users to point the skill at a Telegram session file on disk but provides no warning that session files may contain sensitive authentication material and message data. Encouraging disk monitoring of such files without discussing permissions, storage security, or credential exposure increases the risk of account compromise or leakage of private communications.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The changelog states '支持配置文件和环境变量' and specifically '事件驱动,无轮询', but the main '工作原理' section says the plugin uses polling to watch the Telegram session file. This is an active contradiction in the skill's own documentation about its runtime behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly automates forwarding Telegram group messages into a QQ private chat, but the documentation does not clearly warn users or message participants about the privacy implications of cross-platform redistribution. This can expose group content, usernames, and potentially sensitive discussions to unintended recipients, especially because the forwarding is automatic and event-driven.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

md
| `~/.openclaw/plugins/telegram-qq-bridge/index.js` | 主程序(Node.js) |
| `~/.openclaw/plugins/telegram-qq-bridge/package.json` | 包配置 |
| `~/.openclaw/plugins/telegram-qq-bridge/openclaw.plugin.json` | 插件配置 |
| `~/.openclaw/skills/telegram-qq-bridge/SKILL.md` | 本文件 |
| `~/.openclaw/workspace-coding/telegramqq_bridge/` | 项目文档和测试脚本 |

## 依赖

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file contains user-facing instructions and prompts exclusively in Chinese, including usage guidance and later interactive messages. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This skill automatically reads user-originated Telegram content from a session file and forwards matching messages to QQ without any consent, warning, or confirmation flow. That creates a cross-platform privacy/data-leak risk because sensitive content, identifiers, or commands may be silently transmitted to a different service and recipient.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The plugin constructs a shell command by interpolating untrusted data into --message and also includes configurable account/target values, then executes it with execSync. Telegram message content can contain shell metacharacters such as quotes or command substitutions, enabling command injection and arbitrary command execution in the OpenClaw host context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file uses Chinese throughout, including headings, status labels, and recommendations, with no indication that users may choose another language or that the skill is intended only for a Chinese-speaking audience. Under the stated policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Natural-language policy requires flagging skills that force a specific language without user opt-in. This file presents all instructions in Chinese and does not indicate that the locale is region-specific or provide an alternative language option.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language instructions throughout the skill file are presented only in Chinese, with no indication that users can choose another language. Under SQP-3, forcing a specific language without user opt-in is a policy concern unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.destructive_delete_command

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
index.js:106

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
FINAL_STATUS.md:135

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
PUBLISH_INSTRUCTIONS.md:153