T06 · System Persistence
- Location
SKILL.md:52- Finding
Persistent Autonomous Execution Through a Recurring Scheduled Task
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed autonomous palace-roleplay bot, but it creates persistent external activity and handles access keys in ways users should review carefully before installing.
Review this skill before installing if you are comfortable with a bot that contacts palace.botplot.net, creates or uses a Palace account, stores a bearer access key in local workspace memory, and may run every 2 minutes until disabled. Avoid using it in shared workspaces or environments where memory files or logs may be exposed, and rotate/delete any Palace key that has been printed or stored insecurely.
SKILL.md:52Persistent Autonomous Execution Through a Recurring Scheduled Task
turn.py:226Untrusted Remote Content Is Written Into Persistent Agent Memory
turn.py:97Bearer Access Key Is Stored in Plaintext and Printed to Logs
turn.py:79Execution Automatically Registers an External Account Without the Documented Consent Flow
The skill claims periodic autonomous behavior and owner interaction, but the implementation instructions additionally create remote identity state, store access keys locally, and rely on local memory files without clearly declaring those side effects. Hidden stateful behaviors are security-relevant because they can create persistent accounts, leave sensitive artifacts on disk, and operate beyond the user's mental model of a simple chat/RP skill.
The skill claims periodic autonomous behavior and owner interaction, but the implementation instructions additionally create remote identity state, store access keys locally, and rely on local memory files without clearly declaring those side effects. Hidden stateful behaviors are security-relevant because they can create persistent accounts, leave sensitive artifacts on disk, and operate beyond the user's mental model of a simple chat/RP skill.
The skill automatically registers a user with the external service and writes newly issued credentials locally without explicit approval. This creates remote accounts and credentials on behalf of the user, which is a significant capability expansion beyond simple in-game action automation and can lead to unauthorized external enrollment and secret sprawl.
The skill uses network access, filesystem reads/writes, and persistent state management but does not declare any explicit tool scope or permissions. This increases the risk of overbroad execution because users and the platform cannot easily understand or constrain what the skill is allowed to do before it runs.
The skill instructs the agent to store a bearer-style access key in MEMORY.md, a general-purpose local memory file that may be readable by other skills, sessions, or users depending on the platform. Storing reusable credentials in broadly accessible plaintext creates a direct risk of account takeover or unauthorized API actions if that file is exposed.
The skill directs setup of a cron job every 2 minutes, creating continuous autonomous activity with external API calls and local state changes. Even though the text mentions owner confirmation, the recurring behavior is easy to underestimate and can cause unexpected resource use, noisy notifications, excessive logging, or unintended long-lived automation if not prominently disclosed and controlled.
The skill performs external account registration and persists the returned access credential locally, which is a materially different behavior from a simple in-platform character skill. This creates an undisclosed trust boundary: user metadata is sent to a third-party service and a long-lived credential is established outside the host platform.
The script sends user-supplied data to an external HTTPS endpoint to register/join a third-party service. Even though only the name is transmitted here, this is still an external data transfer and account creation action that can surprise users and expands exposure to remote service compromise, tracking, or abuse.
def init_palace(name, personality):
try:
response = requests.post(f"{ENDPOINT}/join", json={"name": name}, timeout=10)
if response.status_code == 201:
access_key = response.json().get("access_key")
os.makedirs(os.path.dirname(get_user_palace_path()), exist_ok=True)
The code writes the returned PALACE_ACCESS_KEY directly into a plaintext file under the workspace memory directory. If other skills, processes, backups, or users can read that workspace, the credential can be stolen and used to impersonate the user or access the external Palace account.
The skill derives identity and filesystem scope from multiple environment variables, including session-related identifiers, despite being presented as a roleplay/autonomous game agent. This expands access to host context and may let the skill bind actions and stored data to sensitive or unintended identifiers, increasing privacy and cross-user mix-up risk.
The script reads and stores a remote access key in a plaintext workspace memory file. Persisting reusable credentials in an application-readable markdown file makes credential theft, accidental disclosure, and lateral misuse much easier if the workspace is shared, indexed, or exposed through logs/tools.
The script transmits user-derived registration data to an external domain to create an account. External transmission itself is expected for networked gameplay, but here it is more dangerous because it happens automatically and is tied to implicit host/user identity without clear consent.
print(f"用户 {user_id} 尚未入宫,自动初始化中...")
response = requests.post(f"{ENDPOINT}/join", json={"name": name})
if response.status_code == 201:
data = response.json()
access_key = data.get("access_key")
The script automatically creates a per-user file containing credentials and profile state without confirmation. Silent persistence of secrets increases the chance of unintended retention, exposure to other tools/processes, and user unawareness about where sensitive data is being stored.
The code prints the issued access key directly to stdout. Console output is often captured by orchestration systems, logs, terminals, or debugging tools, so exposing a bearer credential there can immediately compromise the account.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
if target_id:
action_data["target_id"] = target_id
action_res = requests.post(f"{ENDPOINT}/action", headers=headers, json=action_data)
result = action_res.json()
# 第六步:记录本轮日志
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
if target_id:
action_data["target_id"] = target_id
action_res = requests.post(f"{ENDPOINT}/action", headers=headers, json=action_data)
result = action_res.json()
# 第六步:记录本轮日志
The instructions require the skill to conduct setup prompts, status reports, and persona dialogue in Chinese, including fixed Chinese response templates, with no option for the user to choose another language. This is a natural-language policy issue because it imposes a locale/language constraint without opt-in or justification.
The module docstring and all user-facing messages are written only in Chinese, with no indication that users may select another language. This can violate a language/locale policy when a skill imposes one language by default without opt-in or documented regional justification.
The manifest describes an autonomous palace-role bot that acts periodically and chats with its owner, but this file implements access to host-provided environment variables such as OPENCLAW_WORKSPACE, CLAW_CHAT_ID, and OPENCLAW_SESSION_KEY to derive local storage and tenant identity. While multi-tenant initialization may be an implementation detail, reading orchestration/session environment state is not justified by the user-facing purpose stated in the manifest itself.
The module docstring and all user-facing messages are written exclusively in Chinese, indicating a fixed language experience. There is no visible option for the user to choose another language or any documented region-specific justification in this file.
No suspicious patterns detected.