T09 · Insecure Skill Coding Practices
- Location
config.example.json:3- Finding
Credential-Like QQ Bot Secret Committed in Example Configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears to be a legitimate QQ bot/OpenClaw integration, but it ships a credential-like secret and stores chat messages and user identifiers in plaintext without enough disclosure or safeguards.
Review before installing. Replace and rotate any QQ AppSecret that matches the packaged example, keep bot secrets out of source-controlled files, and run the bot only in an account/workspace where plaintext QQ messages and logs are acceptable. Consider adding restrictive file permissions, log redaction/rotation, dependency pinning, and explicit consent before processing private or group chat content.
config.example.json:3Credential-Like QQ Bot Secret Committed in Example Configuration
install.sh:10Unpinned Python Dependencies Installed at Runtime
qq_official_bot.py:247QQ Message Contents and User Identifiers Stored in Plaintext Queue Files
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
tail -20 "$LOG_FILE"
else
echo "⚠️ QQ Bot 未运行"
[ -f "$PID_FILE" ] && rm -f "$PID_FILE"
fi
;;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
self.heartbeat_task = None
def get_access_token(self):
"""获取 Access Token"""
payload = {
"appId": APP_ID,
"clientSecret": APP_SECRET
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
self.heartbeat_task = None
def get_access_token(self):
"""获取 Access Token"""
payload = {
"appId": APP_ID,
"clientSecret": APP_SECRET
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
self.heartbeat_task = None
def get_access_token(self):
"""获取 Access Token"""
payload = {
"appId": APP_ID,
"clientSecret": APP_SECRET
The guide instructs users to place the QQ AppSecret directly into JSON and Python files under a local workspace, which encourages long-lived plaintext credential storage in locations that may be backed up, logged, synced, or accidentally committed to version control. In the context of a bot integration skill, this increases the chance of credential disclosure and unauthorized use of the QQ bot account/API.
This plain-text guide instructs the publisher to use Chinese-language metadata and description content throughout, including fixed text to paste into the listing. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly justified, which it is not here.
This code contains multiple user-facing console messages and form content entirely in Chinese, which effectively forces a specific language for operation. The file does not provide any opt-in, fallback, or justification that the skill is intended only for a Chinese-language or region-specific audience.
The script automatically selects and uploads a local ZIP file from the user's Desktop to an external website without an explicit confirmation step at the moment of exfiltration. Even though the target path is hard-coded and the site is visible in the browser, this still creates a data-transfer risk because a local file is sent off-device based solely on script logic, and users may not realize exactly which file is being uploaded.
All user-facing messages and instructions in the script are presented only in Chinese, with no indication that another language is available or that Chinese is required for a documented regional reason. This can violate language/locale policy when a skill imposes a language without user opt-in.
The script's console messages and the prefilled published description are written in Chinese, which imposes a specific language on the user and on the generated listing content. The file does not offer any user opt-in, language selection, or documented justification that this skill is intended only for a Chinese-language environment.
The script directs the user to upload a local ZIP archive to an external site and provides no warning to verify the archive contents, sensitivity of included data, or trustworthiness of the destination. In a skill distribution context, this can lead to accidental disclosure of source code, secrets, private data, or proprietary artifacts if the ZIP was prepared incorrectly or the publication target is inappropriate.
The script's prompts, instructions, and labels are consistently presented in Chinese, including all user interaction text. This creates a language/locale policy concern because the skill does not offer an opt-in choice or explain that it is intended only for Chinese-speaking or region-specific users.
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.
echo "🚀 启动 QQ 官方机器人 (后台运行)..."
echo "📄 日志文件: $LOG_FILE"
nohup python3 -u qq_official_bot.py > "$LOG_FILE" 2>&1 &
echo $! > "$PID_FILE"
sleep 2
The top-level docstring presents the file as a QQ official bot WebSocket connection example with complete functionality. However, the implementation additionally persists incoming user content under ~/.openclaw/workspace/qq_queue and integrates with a separate OpenClaw AI response mechanism, which is a materially different behavior from a pure connection example.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# API 地址
TOKEN_URL = "https://bots.qq.com/app/getAppAccessToken"
GATEWAY_URL = "https://api.sgroup.qq.com/gateway"
API_BASE = "https://api.sgroup.qq.com"
# 订阅的事件意图 (INTENTS)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"clientSecret": APP_SECRET
}
try:
response = requests.post(TOKEN_URL, json=payload, timeout=10)
if response.status_code == 200:
data = response.json()
self.token = data.get("access_token")
Incoming user messages, usernames, and user IDs are written to disk for downstream processing without any user notice, consent, or minimization. In a chat bot context this creates a privacy and data-governance issue because potentially sensitive private or group conversations are persisted locally and may be accessible to other local processes or users.
The bot persists natural-language messages plus identifiers into predictable files under the user's home directory for another component to consume. This creates a clear data leakage path: private message contents and metadata can be exposed to other local users, malware, backups, logs, or unintended downstream consumers, especially because the data is stored unencrypted and cleanup is best-effort only.
This plain-text skill instruction file presents all operational guidance and copied metadata in Chinese, and does not indicate that the user can choose another language or locale. Under the policy for natural-language violations, forcing a specific language without user opt-in is reportable unless the locale restriction is explicitly documented and justified.
The script's console output and form content are written entirely in Chinese, and there is no option for the user to choose a language or locale. This can violate language/locale policy when a skill imposes one language by default without opt-in.
The script's console messages are written in Chinese, starting with the launch message on L006, and this continues throughout the file. For a general-purpose publishing automation script, this imposes a specific language on users without any documented opt-in or locale selection.
The script automatically runs pip3 install requests aiohttp websockets --user -q when imports fail, without prompting the user or clearly disclosing that it will modify the local Python environment. This is risky because it performs network-based package installation during setup, which can surprise users, affect reproducibility, and expose them to dependency or supply-chain risk if package resolution is compromised.
The description states the skill/package includes configuration steps and troubleshooting in Chinese, with no indication that users can choose another language or that the package is intentionally limited to a Chinese-speaking context. This is a natural-language locale policy concern because it appears to impose a specific language without opt-in.
Using a caret range for Playwright allows newer minor/patch releases to be installed, which can make builds non-reproducible and may unexpectedly pull in a vulnerable or breaking version. In a skill context that automates browser actions, dependency drift increases supply-chain risk because the installed browser automation stack may change over time without review.
"license": "ISC",
"type": "commonjs",
"dependencies": {
"playwright": "^1.58.2"
}
}
The manifest includes Playwright while static analysis notes a known advisory affecting some releases, and the version is not pinned exactly, so it is unclear whether installation will resolve to an affected version. Because Playwright downloads browser binaries as part of its workflow, an authenticity-verification weakness can expand supply-chain exposure beyond a typical library dependency.
No suspicious patterns detected.