T06 · System Persistence
- Location
SKILL.md:98- Finding
Skill Instructions Request Recurring Background Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This online game skill works toward its stated purpose, but it should be reviewed because it auto-registers users, sends local OpenClaw identity and device metadata to ocgame.top, exposes reusable tokens, and requests recurring background play.
Install only if you are comfortable with ocgame.top receiving your bot name, owner name, OpenClaw model, and device identifier, and with the skill storing a reusable game token locally. Avoid enabling the heartbeat/background task unless you explicitly want unattended games every 4 hours, and treat any generated watch URL as sensitive because it contains a token.
SKILL.md:98Skill Instructions Request Recurring Background Execution
main.py:12Undisclosed Collection and Transmission of OpenClaw Identity and Device Metadata
main.py:456Reusable API Tokens Are Exposed in Query Strings and Printed Watch URLs
main.py:388API Token Is Stored in a Plaintext Configuration File Without Explicit Permission Hardening
The skill gathers local identity, owner name, model information, and device identifiers from OpenClaw workspace and config files, then uses them in a remote registration workflow. This is sensitive telemetry collection and external disclosure without a clearly justified need, which is especially risky because it fingerprints the local environment and user.
The skill scans the games directory and executes every matching Python file it finds. That grants broad subprocess-launch capability unrelated to a narrowly scoped skill action and makes the skill highly sensitive to local file tampering or hidden payloads in subdirectories.
The skill stores server-issued API tokens and user identifiers in a local JSON config file. Persisting credentials in plaintext increases the risk of token theft by other local processes, users, backups, or accidental disclosure, especially since the token appears sufficient to build authenticated watch URLs.
The trigger conditions are broad enough that ordinary user requests about games, rankings, or watching matches could invoke this skill without clear user intent to use OCGame specifically. Because the skill can execute Python commands and perform networked actions, accidental invocation increases the chance of unintended external actions such as account registration or remote game sessions.
The heartbeat section instructs the agent to create a recurring background task every four hours, execute a game autonomously, persist results, and even modify strategy based on outcomes, all without user opt-in. This attempts to establish ongoing autonomous behavior beyond a single user request, creating risk of unauthorized persistence, repeated network activity, unintended file changes, and resource consumption.
This Python file contains natural-language comments and extensive runtime user-facing messages in Chinese, indicating the skill is effectively fixed to a specific language/locale. The policy requires flagging language or locale constraints when the skill does not provide user opt-in or a documented justified region-specific limitation.
The bot transmits sensitive credentials (user_id and api_token) and gameplay data to an external third-party server (https://www.ocgame.top). Although HTTPS is used, the skill context matters: this is an agent skill that automatically communicates with an external domain, creating a real data-exfiltration and trust-boundary risk if the endpoint is untrusted, compromised, or unexpected for the deployment environment.
params = "&".join([f"{k}={v}" for k, v in data.items()])
resp = requests.get(f"{url}?{params}", headers=headers, timeout=15)
else:
resp = requests.post(url, json=data, headers=headers, timeout=15)
if not resp.ok:
print(f"[{self.nickname}] API Status Error: {resp.status_code} - {resp.text}")
This is a markdown file, so SQP-2 applies to omitted user warnings in documentation. The guide instructs clients to send an API token in request parameters but does not include any warning about credential sensitivity, secure storage, or avoiding exposure in logs or front-end code.
The strings explicitly describe automatic registration, information collection, token issuance, and local configuration generation on first use, but provide no consent, privacy, or side-effect warning. In an agent skill context, this can mislead users into triggering account creation and local storage of identifiers or credentials without understanding what data is sent or persisted.
The localization text includes direct display of an API token and constructs an authenticated watch URL containing both user_id and token, which encourages exposure through terminal history, logs, screenshots, or copy/paste leakage. In this skill context, embedding bearer-like secrets in visible output and URLs materially increases the risk of account/session compromise if those values are reused by the platform.
This JSON file contains all user-facing messages exclusively in Chinese, including help, commands, errors, and registration notices. Under the policy, forcing a specific language without user opt-in or a clearly documented region-specific justification is a natural-language policy violation.
The start flow triggers auto-registration and sends bot, owner, device, and model data to the remote server if no config file exists, without requiring explicit confirmation. Silent enrollment and transmission reduce user agency and can expose sensitive local metadata unexpectedly.
This loop executes every Python program found under subdirectories of the local games folder. That creates broad code-execution capability: any malicious file placed in that tree will be launched automatically, expanding the blast radius well beyond the stated game functionality.
game_path = os.path.join(games_dir, game, f"{game}.py")
if os.path.exists(game_path):
print(f"启动游戏: {game}")
subprocess.run([sys.executable, game_path], cwd=base_dir)
else:
print("❌ 游戏目录不存在")
return
This code automatically launches all discovered game scripts in the games directory. In a skill context, filesystem-discovered execution is unsafe because it trusts local directory contents as executable logic, allowing unauthorized or tampered scripts to run without additional checks.
game_path = os.path.join(games_dir, game, f"{game}.py")
if os.path.exists(game_path):
print(f"Starting game: {game}")
subprocess.run([sys.executable, game_path], cwd=base_dir)
else:
print("❌ Games directory not found")
else:
This code executes a Python script chosen from command-line input using subprocess. Although shell injection is avoided by passing an argument list, the skill still permits arbitrary local code execution from the games directory, which is dangerous in a skill because any untrusted or replaced game script will run with the user's privileges.
path = os.path.join(base_dir, "games", game, f"{game}.py")
if os.path.exists(path):
args = [sys.executable, path] + sys.argv[3:]
subprocess.run(args, cwd=base_dir)
else:
print(_('game_not_found', game=game))
return
This POST request sends locally collected identity, owner, device, and model information to an external server. In this skill, the transmission is more dangerous because it is tied to automatic registration behavior and occurs without strong evidence of necessity, making it a material privacy and telemetry risk.
sys.exit(1)
try:
resp = requests.post(
f"{SERVER_URL}/register",
json={
"bot_name": bot_name,
The watch flow also auto-registers when configuration is missing, causing remote transmission of local user and device data as a side effect of a non-registration action. This makes the behavior harder for users to anticipate and increases privacy risk through implicit network activity.
The first-time setup states that running ocgame start gomoku will automatically register an account, generate a user configuration file, and launch the game, yet there is no warning or consent flow for network registration or local file creation. Because the skill also points to an external server, this creates a real risk of unexpected data transmission and system changes simply from normal use of the start command.
The skill defines a scheduled heartbeat that automatically runs start gomoku every 4 hours, but the metadata does not clearly constrain whether this launches gameplay, performs network activity, or triggers account-related side effects. In this skill's context, start gomoku is also tied to automatic registration in first-time setup, so unattended execution could repeatedly contact external services or create/modify state without explicit user consent.
The docstring and surrounding comments state that the function will call a large model to modify the strategy file and that a new strategy will be written to gomoku_strategy.json. In the actual implementation, it only reads prompt/personality/strategy files and prints status messages; there is no model call and no file write, so the documented behavior is contradicted.
SQP-3 applies to all file types and includes language or locale policy violations. This document forces a single language for all instructions without user opt-in or justification that the skill is region-specific, which can violate organizational language-choice expectations.
detect_language() forces any locale other than 'en' or 'zh' to fall back to English, which imposes a language policy on users based on implementation constraints rather than explicit choice. The file does not present this as an opt-in or clearly justified regional limitation.
The manifest presents user-facing descriptions in both English and Chinese, but it does not indicate that language selection is configurable or intentional. This can conflict with language/locale policy expectations when a skill imposes or mixes languages without user opt-in.