Back to skill

Security audit

Shared Memory Os

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its memory-governance purpose, but it creates persistent scheduled agent jobs with read/exec access and gives risky plaintext secret-storage guidance.

Review this skill carefully before installing. Only use it in a trusted workspace where persistent OpenClaw cron jobs with read and command-execution access are acceptable, inspect or disable the scheduled jobs after setup, avoid storing real credentials in memory/private-secrets.md, and change the hardcoded workspace path and timezone before use outside that exact environment.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T06 · System Persistence

Error
Location
scripts/ensure-shared-memory-crons.js:57
Finding

Persistent Scheduled Agent Jobs with Shell Execution Access

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
scripts/find-promotion-candidates.js:7
Finding

Stored Prompt Injection Through Untrusted Learning Content and Scheduled Report Review

Content
View full analysis
f.endsWith('.md') && f !== 'INDEX.md').sort(); const memoryText = fs.existsSync(MEMORY) ? fs.readFileSync(MEMORY, 'utf8').toLowerCase() : ''; function summary(text){ return ((text.match(/### Summary\n([^\n]+)/) || [,''])[1] || '').trim(); } function suggested(text){ return ((text.match(/### Suggested Action\n([\s\S]*?)(\n## |$)/) || [,''])[1] || '').trim(); } function normalize(s){ return String(s||'').toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g,' ').trim(); } const seen = new Map(); for (const file of files) { const text = fs.readFileSync(path.join(LEARN, file), 'utf8'); const key = normalize(summary(text)); if (!key) continue; if (!seen.has(key)) seen.set(key, []); seen.get(key).push({ file, summary: summary(text), suggested: suggested(text) }); } const candidates = []; for (const [key, arr] of seen.entries()) { if (arr.length >= 2 && !memoryText.includes(key)) { candidates.push({ summary: arr[0].summary, occurrences: arr.length, files: arr.map(x => x.file), suggested: arr[0].suggested, reason: 'Repeated reusable lesson has not yet been promoted into durable memory.', evidence: [`repeated ${arr.length} times`, `not found in durable memory: ${key}`], confidence: arr.length >= 3 ? 'high' : 'medium', suggestedLifecycle: 'candidate-for-promotion', reviewStatus: 'pending-review' }); } } ``` The resulting summary is copied verbatim into a Markdown re ...[truncated 3677 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/private-secrets-template.md:3
Finding

Plaintext Storage of API Keys and Bot Tokens in Workspace Memory

Content
View full analysis
- purpose: api-failover secondary provider - used_by: api-failover.service - last_verified: 2026-04-02 - notes: only use in private trusted sessions ``` ```md ## TELEGRAM_BOT_TOKEN - value: - purpose: OpenClaw Telegram channel - used_by: openclaw gateway runtime - last_verified: 2026-04-02 - notes: never copy into public docs or skill bundles ``` ``` ### Technical Analysis The reference explicitly recommends placing actual API keys and bot tokens into a Markdown file inside the workspace. The stated restrictions are procedural only; the Skill does not implement encryption, operating-system keychain integration, secret-manager storage, restrictive filesystem permissions, repository exclusion enforcement, redaction, or access auditing. A filename such as `private-secrets.md` does not create an access-control boundary. Any Agent or process with sufficient workspace read access can obtain the credentials. Plaintext storage also increases the likelihood that secrets are included in backups, indexes, support bundles, repository commits, search results, or future reports. ### Attack Path 1. A user follows the provided template and writes an actual API key or bot token to `memory/private-secrets.md`. 2. The plaintext file remains in the workspace. 3. Another Agent, local process, backup system, indexing service, repository operation, or compromised scheduled task reads the file. 4. The credential is copied or transmitted outside its intended trust boundary. 5. The attacker uses the recovered key or token against the associated e ...[truncated 641 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a broad shared-memory governance system for multi-agent workspaces, including memory tiers, capture, promotion review, lifecycle management, reporting, and documentation. The supplied code chunk does something narrower and materially different: it reads .md files from the .learnings directory, searches for certain keywords, and emits optimization suggestions tied to other skills. While it does touch learnings content in the workspace, that is only a small adjacent aspect of the declared purpose. The primary behavior is recommendation generation, not governance or memory management, so the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied code performs a narrow file-migration task: it reads Markdown files from a notes directory, copies them into a memory directory, and outputs a migration summary. This does relate loosely to memory management, but it does not implement the extensive governance capabilities described. The declared description suggests a comprehensive shared-memory governance system, while the actual code is only a migration utility. That is a materially different primary purpose, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

md
- `scripts/ensure-shared-memory-crons.js`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 163)May include surrounding context.

md
- `scripts/ensure-shared-memory-crons.js`

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/health-check.md (reported line 29)May include surrounding context.

md
4. review repeated lessons
5. promote stable repeated lessons into `MEMORY.md` or skill rules

This keeps the workspace learning system adaptive without requiring a runtime self-modifying agent.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to immediately create or update recurring cron jobs and run a full maintenance pass, which introduces persistent automation changes to the workspace without requiring explicit user confirmation or presenting a warning. In an agent context, this can create lasting scheduled execution with exec/read capability, surprising the operator and expanding the blast radius beyond the current session.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest describes memory governance, reporting, lifecycle management, and collaboration features, but this file implements process spawning through child_process.execFileSync to run multiple subordinate scripts. While orchestration may be part of setup, direct subprocess execution is a broader operational capability than the manifest explicitly conveys.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script forces all cron jobs to use Asia/Shanghai via a fixed TZ value. This is a locale policy issue because it imposes a specific regional setting on all users without offering a choice or documenting why that locale is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script forces TZ="Asia/Shanghai" for all cron jobs it creates or edits. This is a locale policy concern because the file does not offer user choice or explain why that region-specific timezone is required, so executions may occur at unexpected local times for other users or environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This shell script writes to temporary JSON state and, more importantly, creates or updates cron jobs via openclaw cron add/edit, which changes persistent scheduler configuration. While there is some machine-readable output at the end, there is no user-facing warning, confirmation prompt, or explanatory comment/docstring disclosing that the script will alter scheduled jobs and job storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file instructs the user to enable health checks and a weekly review cron, which implies creating or modifying a scheduled task on the user's system. The guide provides no warning about the persistence or system-impacting nature of that operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code creates a directory and writes a markdown file to a fixed workspace path, but there is no confirmation prompt, inline comment, or docstring disclosing that it will modify the filesystem. Aside from printing the output path after the write, the script does not warn the user beforehand that it creates persistent files under the workspace.

Content

No source excerpt is available for this finding.