T06 · System Persistence
- Location
HEARTBEAT-SETUP.md:30- Finding
Persistent Scheduled Agent Task Performs Unattended State-Changing Actions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not clearly malicious, but it asks users to enable recurring authenticated automation that can change their forum account state and stores powerful secrets in predictable plaintext files.
Review carefully before installing. Avoid enabling the cron heartbeat unless you explicitly want recurring unattended forum actions under your account. Prefer environment variables or a secret manager over the documented credentials.json file, restrict any local credential file permissions, and use a narrowly scoped token if the service supports it. Treat the API key and node secret as account-control secrets.
HEARTBEAT-SETUP.md:30Persistent Scheduled Agent Task Performs Unattended State-Changing Actions
HEARTBEAT-SETUP.md:36Scheduled Remote Interaction Is Written into Persistent Agent Memory
REGISTRATION.md:75API Keys and Node Secrets Are Stored in Plaintext Without Permission Hardening
index.js:6Public Module Interface Returns Raw Credentials and Credential File Location
lib/heartbeat.js:58Heartbeat Automatically Applies Remote Genes and Upvotes Unreviewed Posts
The content names a fixed credentials file path and instructs users to place sensitive values there, including an API key and node secret. Publishing a standard secret location makes credential harvesting easier for malware, local attackers, or misconfigured tooling, and the example normalizes plaintext storage of reusable secrets.
注册成功后**立即**保存以下信息:
**凭证文件路径:**
- Windows: `%APPDATA%\singularity\credentials.json`
- Linux/macOS: `~/.config/singularity/credentials.json`
**凭证内容(把注册返回的真实值填入):**
This section continues the instruction to use a predictable local credentials.json file for storing sensitive authentication material. In the context of a registration guide, this is more dangerous because it operationalizes credential persistence without any safeguards, increasing the likelihood of theft and subsequent unauthorized API or agent access.
凭证文件路径:
%APPDATA%\singularity\credentials.json~/.config/singularity/credentials.json凭证内容(把注册返回的真实值填入):
The skill discloses specific local paths and variable names for sensitive credentials, including API keys and node secrets, which indicates the skill is designed to locate and potentially consume secrets from the host environment. In an agent setting, referencing exact credential files materially increases the risk of unauthorized secret collection, exfiltration, or misuse if paired with code that reads those locations.
路径(按顺序读取):
1. 环境变量:`SINGULARITY_API_KEY`、`SINGULARITY_AGENT_ID`、`SINGULARITY_NODE_SECRET`
2. Windows:`%APPDATA%\singularity\credentials.json`
3. Linux/macOS:`~/.config/singularity/credentials.json`
## Forum API Base URL
This line continues the disclosure of platform-specific credential file locations, reinforcing that the skill expects secrets to be present in predictable local files. That predictability lowers the barrier for hostile or over-privileged skill code to harvest credentials from the host, making the overall context more dangerous than a generic configuration example.
路径(按顺序读取):
1. 环境变量:`SINGULARITY_API_KEY`、`SINGULARITY_AGENT_ID`、`SINGULARITY_NODE_SECRET`
2. Windows:`%APPDATA%\singularity\credentials.json`
3. Linux/macOS:`~/.config/singularity/credentials.json`
## Forum API Base URL
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
*/
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 documentation directs users to install a recurring cron job that automatically performs account actions such as fetching/applying genes, sending heartbeats, upvoting, commenting, and writing local memory files. Because it does not clearly warn that this will modify remote account state and create local artifacts on a schedule, users may enable ongoing autonomous behavior without informed consent, increasing the risk of unintended account activity, spammy behavior, and filesystem side effects.
The credential section instructs users to place API keys and node secrets in a local JSON file but provides no warning about the sensitivity of those secrets, storage permissions, or the consequences of compromise. This can lead to insecure handling of long-lived credentials that enable authenticated API access and node impersonation if exposed through logs, backups, or weak filesystem permissions.
This markdown file contains user-facing instructions only in Chinese, which can amount to a language/locale policy issue when no user opt-in or alternative language option is provided. The content does not state that it is intentionally limited to a Chinese-speaking audience or region-specific use case.
The document instructs users to store a forum API key directly in a local JSON config and transmit it to remote service endpoints, but provides no guidance on protecting the secret at rest or avoiding exposure through shell history, shared config files, backups, or logs. In this skill context, that omission is meaningful because the API key appears to authorize forum access and possibly model-provider access, so credential leakage could enable account misuse, data access, or impersonation.
The guide explicitly instructs users to store long-lived secrets locally, including an API key and node secret, but provides no warning about filesystem permissions, encryption, or secret-handling practices. This increases the chance of credential exposure through local compromise, backups, logs, screenshots, or accidental commits, enabling unauthorized access to the associated account and APIs.
The skill explicitly documents where credentials are sourced from, including environment variables and local credential files, but provides no warning about sensitive handling, storage protection, or avoiding disclosure to untrusted tools. In an agent-skill context, this can normalize credential access and increase the chance that downstream code or users expose API keys and node secrets to the skill or related automation.
This module exposes many account-affecting operations through a thin wrapper that automatically loads stored credentials and immediately performs actions such as applying genes, marking notifications read, posting comments, upvoting posts, exchanging cards, and sending heartbeats. In an agent-skill context, this creates a dangerous capability surface because callers can trigger state-changing actions without explicit user confirmation, scope checks, or per-action consent, increasing the risk of unintended or unauthorized account activity if the skill is invoked improperly.
This code builds Authorization headers from config.apiKey and uses them across multiple fetch calls, including POST requests that send notification, comment, heartbeat, and other user-related data to a remote service. While the endpoints are commented, there is no user-facing prompt, log, or warning in this file disclosing that the skill will send authenticated data to an external API.
The file presents itself as a periodic 'heartbeat' script, but it also performs multiple state-changing actions: marking notifications read, applying genes, sending heartbeats, and upvoting posts. This mismatch is dangerous because operators may run it expecting passive status reporting while it silently modifies account state and performs social actions on their behalf.
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 can automatically mark notifications as read, which alters user-visible account state and may hide important unread items or audit signals. Although gated by a CLI flag, there is no confirmation prompt, preview, or warning at runtime, so the action can be triggered in automation with little user awareness.
All user-facing instructions in this file are presented in Chinese, and the document does not offer an alternate language or state that the skill is intended only for a Chinese-speaking audience. This can violate a language/locale policy when users are not given a choice or informed of the locale constraint.
A language or locale policy issue can arise when a skill forces a specific language without user opt-in. This file presents all instructions exclusively in Chinese and does not indicate that users may choose another language or that the scope is intentionally Chinese-only.