Back to skill

Security audit

mem-scan

Security checks for vulnerabilities and agentic risk

Overview

This skill openly performs a broad scan across all workspace and project memory banks, which fits its purpose but can expose unrelated project notes without a clear pre-scan approval step.

Install only if you are comfortable with the agent reading memory-bank contents across the whole OpenClaw workspace and all project repositories. For sensitive or client-separated workspaces, use this only after explicitly limiting which memory-bank paths may be scanned.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:20
Finding

Excessive Cross-Repository Memory Access

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 20-26
Vulnerability Type: Violation of least-privilege access boundaries
Risk Level: Medium

Vulnerable Code

md
### Step 0: Multi-Repo Discovery
- **Scan ALL memory bank locations:**
  - `~/.openclaw/workspace/memory-bank/` (workspace)
  - `~/.openclaw/workspace/code/*/memory-bank/` (project repos: timesarrow, mb-core, etc.)
- **Identify active project:** Determine which repo the current work belongs to
- **Prevent duplicates:** Check if task already exists in another repo's memory-bank

Technical Analysis

The skill explicitly instructs the agent to scan the global workspace memory bank and all project repositories under a wildcard path. This behavior is not restricted to the repository relevant to the current task.

Such broad discovery violates the principle of least privilege: a project-specific analysis generally requires access only to the active project's files. Loading unrelated memory banks into the agent's context may expose private task descriptions, implementation plans, session records, architectural information, or other cross-project metadata.

The approval requirement later in the skill applies to proposed modifications, but it does not require informed user approval before this broad read operation occurs. No network transmission or external exfiltration mechanism was identified.

Attack Path

  1. A user invokes the mem-scan skill for an ordinary project-specific task.
  2. The skill directs the agent to enumerate the global memory bank and every repository matching ~/.openclaw/workspace/code/*/memory-bank/.
  3. The agent reads and correlates records belonging to projects unrelated to the active task.
  4. Sensitive cross-project information may enter the current analysis context.
  5. Details derived from unrelated repositories may subsequently appear in relevance matrices, recommendations, or summary reports.

This path depends on the agent already possessing ...[truncated 792 chars]

Remediation
View remediation

Remediation Suggestions

  1. Restrict discovery to the active repository's memory-bank/ directory by default.
  2. Remove wildcard scanning of code/*/memory-bank/ from the automatic workflow.
  3. Require explicit, informed user approval before accessing the global memory bank or any additional repository.
  4. Present the exact paths to be scanned and allow the user to approve or reject each location.
  5. Implement a repository allowlist and reject paths outside the approved project scope.
  6. Apply canonical-path validation to prevent traversal or symbolic-link expansion beyond approved roots.
  7. Minimize loaded content by searching only metadata or filenames first, then requesting approval before reading matching documents.
  8. Redact credentials, personal data, and unrelated project details from analysis output.
  9. Record which repositories were accessed so users can verify that the scan remained within the authorized scope.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly directs scanning of multiple memory-bank locations across the workspace and all project repositories, which broadens filesystem access beyond a narrowly scoped task. Without an explicit user-facing warning, consent step, or scope-limiting controls, the skill can expose unrelated project data and sensitive internal notes during routine use.

Content

No source excerpt is available for this finding.