Back to skill

Security audit

QQBot Multi-Account

Security checks for vulnerabilities and agentic risk

Overview

This QQBot operations skill is mostly purpose-aligned, but its diagnostic script can print sensitive local routing and user data without redaction or explicit opt-in.

Review before installing. Use the inspection script only in a trusted terminal, avoid pasting its output into public tickets or chats, and check or sanitize known-users, appId, binding, service-status, and secret-path details before sharing. Prefer installing a pinned, reviewed QQBot plugin version instead of @latest, and review exported archives before handing them off.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/inspect-qqbot.sh:38
Finding

Diagnostic Script Exposes Sensitive Operational and User Data

Content
View full analysis

Vulnerability Details

File Location: scripts/inspect-qqbot.sh, lines 8-12, 30-34, and 38-41
Vulnerability Type: Sensitive information exposure through diagnostic output
Risk Level: Medium

Vulnerable Code

bash
echo '== openclaw.service =='
if systemctl status openclaw.service --no-pager --lines=20 2>/dev/null; then
  :
else
  echo 'systemd status unavailable in current shell environment'
fi
bash
print('bindings:')
for item in obj.get('bindings', []):
    print(' ', item)
print('accounts:')
for key, value in (obj.get('channels', {}).get('qqbot', {}).get('accounts', {}) or {}).items():
    print(f'  {key}: appId={value.get("appId")} secretFile={value.get("clientSecretFile")}')
bash
if [ -f "$KNOWN" ]; then
  echo '== known users =='
  cat "$KNOWN"
else
  echo "known-users.json missing: $KNOWN"
fi

Technical Analysis

The inspection script prints recent service status output, complete binding objects, QQ application identifiers, credential-file paths, and the entire known-users database. These values are emitted without redaction or filtering.

Although inspecting routing metadata is consistent with the skill's diagnostic purpose, exposing complete records violates data-minimization principles. Service logs and binding objects may contain additional sensitive values depending on the local deployment. The known-users file may disclose QQ user identifiers and account relationships.

The QQBOT_KNOWN_USERS environment variable also controls which file is displayed. A caller that can influence this environment variable can direct the script to print any readable regular file:

bash
KNOWN="${QQBOT_KNOWN_USERS:-$HOME/.openclaw/qqbot/data/known-users.json}"

The script does not transmit this information over the network. Exposure occurs through terminal output, agent transcripts, command logs, CI logs, or support records where the output is subs ...[truncated 1479 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace full known-user output with a record count and redacted identifiers by default.
  • Add an explicit option such as --include-sensitive-details before displaying raw user records or service logs.
  • Print only explicitly approved binding fields rather than complete binding objects.
  • Mask application identifiers and credential paths, showing only a short suffix or whether a configured file exists.
  • Avoid displaying service logs by default; report only service state unless verbose diagnostic output is explicitly requested.
  • Validate and canonicalize QQBOT_KNOWN_USERS, then require it to remain under the expected OpenClaw data directory.
  • Reject symlinks or unexpected file types when reading the known-users file.
  • Warn operators that verbose diagnostic output may contain sensitive information and should be sanitized before sharing.
  • Ensure diagnostic transcripts and CI logs have restricted access and appropriate retention controls.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:20
Finding

Mutable Latest Tag Used for Executable Plugin Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 20; duplicated in README.md, line 10
Vulnerability Type: Unpinned third-party executable dependency
Risk Level: Medium

Vulnerable Code

SKILL.md:

bash
openclaw plugins install @tencent-connect/openclaw-qqbot@latest

README.md:

bash
openclaw plugins install @tencent-connect/openclaw-qqbot@latest

Technical Analysis

The documented prerequisite installs the QQBot plugin using the mutable latest tag. The reviewed project therefore does not define the precise plugin artifact that operators will receive. A future publication, compromised maintainer account, registry compromise, or unexpected upstream release can change the code installed by the same command after this skill has been audited.

The package name is consistent across the project, and the documentation does not specify an unknown registry, typo-squatted package, or remote shell pipeline. The risk arises specifically from installing an executable dependency without pinning an audited version or verifying its integrity.

Attack Path

  1. An attacker compromises the upstream package publisher or package registry, or a later release unintentionally introduces malicious behavior.
  2. The altered release becomes the target of the latest tag.
  3. An operator follows the skill's prerequisite instructions.
  4. OpenClaw downloads and installs the mutable plugin release.
  5. Installation hooks or runtime plugin code execute with the privileges of the OpenClaw operator or service.
  6. The compromised dependency can access resources available to that process, including OpenClaw configuration and QQBot account data.

Impact Assessment

The exact impact depends on the permissions granted to the OpenClaw process and on the behavior of a compromised plugin. Potential scope includes:

  • Execution of dependency-controlled code under the OpenClaw user's privileges
  • Acc ...[truncated 428 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace @latest with an exact version that has been reviewed and tested, for example @tencent-connect/openclaw-qqbot@X.Y.Z.
  • Use a lockfile or equivalent dependency-resolution mechanism where supported.
  • Verify package integrity using a trusted checksum, signature, or registry integrity metadata.
  • Document a controlled upgrade process that includes source review, changelog review, and testing before changing the pinned version.
  • Use an approved package registry and restrict or monitor package-publishing permissions.
  • Run the plugin under a dedicated, least-privileged service account with access only to required configuration and data.
  • Keep the installation instructions in SKILL.md and README.md synchronized so neither reintroduces the mutable tag.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
If one QQ message reaches two agents, do not assume the `bindings` are wrong first. In multi-account deployments, the plugin runtime must isolate account state by `appId`, especially:

- access token cache
- token singleflight promise
- background token refresh controller

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/multi-account-routing.md (reported line 41)May include surrounding context.

md
The following state should be account-scoped, not global:

- access token cache
- token fetch singleflight state
- background refresh controller

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill instructs the operator to run local shell scripts and references filesystem paths and secret files, but it does not declare any explicit tool scope or permission boundaries. In an agent ecosystem, missing scope declarations can cause the skill to be used with broader execution or environment access than intended, increasing the chance of unintended command execution or secret exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill explicitly supports proactively sending QQ messages or files through a specific bot account, but it does not warn about external side effects, privacy concerns, or the risk of sending data to unintended recipients. In a multi-account environment, this is especially risky because operators may target the wrong account or channel and cause data leakage or unauthorized outbound communication.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The export workflow creates a portable archive of the local plugin without warning that locally modified code, configuration, logs, or embedded secrets could be packaged and redistributed. This can lead to accidental exfiltration of proprietary code or sensitive material during handoff or backup operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script explicitly reads the OpenClaw configuration and prints account binding details, including appId values and the path to each client secret file. In an operational troubleshooting skill, this may be intentional, but it still exposes sensitive configuration metadata to whoever can invoke the script or read its output, which can aid lateral movement, targeting of secrets, or accidental disclosure through logs and terminals.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script unconditionally cats known-users.json, which may contain user identifiers, account mappings, or other personal or operational data. Dumping the full file without confirmation, redaction, or warning increases the risk of privacy leakage, console history exposure, and inadvertent inclusion in support transcripts or automation logs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.