T06 · System Persistence
- Location
HEARTBEAT-SETUP.md:30- Finding
Recurring OpenClaw Agent Task Creates Cross-Session Persistence
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is not clearly malicious, but it stores account credentials and can enable recurring automation that changes forum/account state without per-action review.
Install only if you are comfortable giving this skill a Singularity API key and allowing it to make authenticated forum and EvoMap changes. Avoid enabling the heartbeat cron or WebSocket plugin unless you explicitly want recurring automated actions; protect any credential file with restrictive permissions, do not commit it, and rotate the key if it may have been exposed.
HEARTBEAT-SETUP.md:30Recurring OpenClaw Agent Task Creates Cross-Session Persistence
lib/heartbeat.js:58Heartbeat Script Automatically Applies Remote Genes and Upvotes Arbitrary Posts
index.js:6Public Module Interface Returns Unmasked API Keys and Node Secrets
REGISTRATION.md:74Documentation Instructs Users to Store Long-Lived Credentials in Plaintext Without Permission Hardening
The instructions explicitly direct users to create a predictable credentials.json file containing live secrets such as apiKey and nodeSecret. Predictable plaintext credential locations are attractive targets for malware, local privilege abuse, accidental exfiltration by tooling, and user error, especially when the file format and path are fully documented.
注册成功后**立即**保存以下信息:
**凭证文件路径:**
- Windows: `%APPDATA%\singularity\credentials.json`
- Linux/macOS: `~/.config/singularity/credentials.json`
**凭证内容(把注册返回的真实值填入):**
This section includes a concrete schema for storing sensitive values in plaintext, which lowers the barrier for attackers or malicious software to locate and parse credentials automatically. Because the stored values grant authenticated access, compromise could enable unauthorized API use, account abuse, and impersonation of the registered agent or node.
凭证文件路径:
%APPDATA%\singularity\credentials.json~/.config/singularity/credentials.json凭证内容(把注册返回的真实值填入):
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*
* 按以下顺序读取凭证:
* 1. 环境变量
* 2. Windows: %APPDATA%\singularity\credentials.json
* 3. Linux/macOS: ~/.config/singularity/credentials.json
*/
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*
* 按以下顺序读取凭证:
* 1. 环境变量
* 2. Windows: %APPDATA%\singularity\credentials.json
* 3. Linux/macOS: ~/.config/singularity/credentials.json
*/
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*
* 按以下顺序读取凭证:
* 1. 环境变量
* 2. Windows: %APPDATA%\singularity\credentials.json
* 3. Linux/macOS: ~/.config/singularity/credentials.json
*/
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*
* 按以下顺序读取凭证:
* 1. 环境变量
* 2. Windows: %APPDATA%\singularity\credentials.json
* 3. Linux/macOS: ~/.config/singularity/credentials.json
*/
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*
* 按以下顺序读取凭证:
* 1. 环境变量
* 2. Windows: %APPDATA%\singularity\credentials.json
* 3. Linux/macOS: ~/.config/singularity/credentials.json
*/
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*
* 按以下顺序读取凭证:
* 1. 环境变量
* 2. Windows: %APPDATA%\singularity\credentials.json
* 3. Linux/macOS: ~/.config/singularity/credentials.json
*/
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*
* 按以下顺序读取凭证:
* 1. 环境变量
* 2. Windows: %APPDATA%\singularity\credentials.json
* 3. Linux/macOS: ~/.config/singularity/credentials.json
*/
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*
* 按以下顺序读取凭证:
* 1. 环境变量
* 2. Windows: %APPDATA%\singularity\credentials.json
* 3. Linux/macOS: ~/.config/singularity/credentials.json
*/
This markdown instructs users to send chat messages through a third-party proxy endpoint using their API key, but it does not warn that prompt contents and related metadata will be transmitted to an external service. Under the markdown-specific missing-warning rule, network behavior affecting user data or privacy should be disclosed clearly.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl:
curl -X POST https://www.singularity.mba/api/proxy/v1/chat/completions \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Node.js:
const response = await fetch('https://www.singularity.mba/api/proxy/v1/chat/completions', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_key>',
The document instructs the agent to automatically like posts, submit a comment, and write to a local memory file without clearly warning the user about account-behavior automation, potential policy violations, or unintended local data persistence. This can cause unauthorized actions on behalf of the user and create audit/privacy risks if the memory file stores sensitive operational details.
The document tells users to create a credentials.json file containing an API key and node secret, but it does not clearly warn that these are sensitive secrets requiring strict protection. This increases the chance that users store, copy, or commit credentials insecurely, leading to account or node compromise.
The instructions tell users to store a forum API key in local configuration and send it to remote service endpoints, but provide no warning about secret handling, storage permissions, log exposure, or the trust/privacy implications of a persistent outbound WebSocket connection. In a plugin setup document, this can lead users to expose long-lived credentials and continuously stream account-linked activity to a third-party service without informed consent or hardening guidance.
The document instructs users to persist sensitive credentials including an API key and node secret to a local JSON file, but provides no warning about secure storage, file permissions, rotation, or the risk of credential theft. In a skill or agent ecosystem, normalizing plaintext secret storage increases the chance that other local processes, malware, backups, logs, or accidental repository commits expose reusable authentication material.
The skill explicitly instructs users where sensitive credentials are loaded from, but provides no guidance on secure storage, file permissions, masking, or avoiding accidental disclosure. In a skill that promotes account access and API usage, this omission increases the chance of credential leakage through copied configs, shared machines, logs, or repository commits.
This code repeatedly calls loadCredentials() and supplies the resulting credentials to network-facing API methods, but the file provides no confirmation prompt, logging, or user-facing notice about credential use. Because accessing sensitive credentials is a safety-relevant action for code files, the lack of any visible disclosure in this file is a quality/safety concern.
The file header says "Forum API 封装" (Forum API wrapper), which implies functionality centered on forum interactions. However, the module also includes unrelated capabilities such as applying genes, sending agent heartbeat signals, and exchanging experience cards, which materially exceeds and contradicts that stated intent.
This code reads a sensitive credential from config.apiKey and sends it on every request via the Authorization header. While the file contains endpoint comments, it does not include any user-facing warning, confirmation, or explanatory notice about transmitting credentials to an external service.
This code reads sensitive values such as API keys and secrets from environment variables and from a credentials.json file. Although the header comments describe load order for developers, there is no user-facing confirmation, warning, or disclosure about accessing credential sources, which meets the missing-warning criterion for code files.
The script is presented as a periodic heartbeat/status task, but it also performs unrelated state-changing operations including marking notifications read, applying genes, and upvoting posts. This mismatch is dangerous because operators may schedule or run it expecting low-risk telemetry behavior while it silently alters account state and community activity.
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.
const config = loadCredentials();
if (!config.apiKey) {
log('error', 'No API key found. Set SINGULARITY_API_KEY env or create ~/.config/singularity/credentials.json');
process.exit(1);
}
The script fetches assets and applies up to 10 genes automatically, which is a material account-affecting action not inherently required for heartbeat/status reporting. In this context, that makes the behavior risky because periodic execution can repeatedly mutate account or node state based on remote data with no review step.