Back to skill

Security audit

Agent Memory Setup

Security checks for vulnerabilities and agentic risk

Overview

This memory setup skill is not malicious, but it should go through Review because it persistently changes agent behavior, stores and loads personal memory files, and can automatically install an unpinned plugin.

Install only in the intended workspace after reviewing the AGENTS.md template and deciding what personal or shared memory files the agent may read and update. Prefer pinned, reviewed versions of QMD, OpenClaw, and Lossless Claw, and avoid running the automatic plugin install or gateway restart unless you are ready for those environment changes.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
scripts/setup_memory.sh:104
Finding

Automatic Installation of an Unpinned Third-Party Plugin

Content
View full analysis
/dev/null; then if openclaw plugins list 2>/dev/null | grep -q "lossless-claw"; then echo " ✓ Lossless Claw already installed" else echo " Installing @martian-engineering/lossless-claw..." openclaw plugins install @martian-engineering/lossless-claw && echo " ✓ Installed" || echo " ⚠ Install failed — run manually: openclaw plugins install @martian-engineering/lossless-claw" ``` Related unpinned installation instructions also appear in: - `SKILL.md:128-129` - `SKILL.md:249` - `SKILL_v0.md:82-83` ```bash pip install qmd openclaw plugins install @martian-engineering/lossless-claw npm install -g openclaw ``` ### Technical Analysis The setup script automatically requests the current registry-resolved release of `@martian-engineering/lossless-claw`. It does not pin a reviewed version, validate a checksum or signature, enforce a lockfile, display the resolved version before installation, or require explicit installation confirmation. The accompanying documentation similarly recommends unpinned Python, npm, and OpenClaw plugin installation commands. Consequently, the effective code installed by these commands can change after this Skill has been reviewed. Package installers and plugin installation systems commonly execute package-controlled installation hooks or load installed plugin code into the host application. Therefore, compromise of a publisher account, package registry, dependency chain, or future package release could cause attacker-controlled code to execute under the identity of the user running the setup. No evidence was found that the named packages are currently malicious. The confirmed issue is the unsafe, mutable dependency acquisition process. ### Attack Path 1. An attacker compromises the r ...[truncated 1849 chars]
Remediation
View remediation
python3 -m pip install 'qmd==' npm install -g 'openclaw@' ``` 2. Verify package integrity using registry-supported signatures, provenance attestations, or published cryptographic checksums. Fail closed when integrity verification cannot be completed. 3. Require explicit user confirmation before installing third-party software. Keep workspace initialization separate from optional dependency installation so users can create memory files without executing external package code. 4. Print the exact package name, resolved version, source registry, and expected integrity value before installation. 5. Use lockfiles or an equivalent reviewed dependency manifest for all direct and transitive dependencies. 6. Configure trusted registries explicitly and avoid silently accepting alternate indexes, mirrors, or user-controlled package sources. 7. Perform installation and runtime execution under a dedicated, least-privileged account with access restricted to the required workspace. 8. Update the documentation to recommend only pinned commands and to explain that users should review package provenance and release contents before installation. 9. Add automated dependency scanning and periodically re-review pinned versions before intentionally upgrading them. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list includes very broad phrases such as "agent onboarding," "memory setup," and "initialize memory," which can cause the skill to activate in situations broader than the narrowly intended task. Overbroad invocation increases the chance of unintended execution of setup guidance that changes workspace files and agent configuration, especially in loosely phrased user requests.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

The skill explicitly instructs persistent modification of agent workspace state by creating memory files, writing AGENTS.md, and updating openclaw.json. Persistent changes are security-relevant because they can alter future agent behavior across sessions, and if invoked in the wrong workspace or without clear approval, they may create long-lived configuration drift or unauthorized behavior shaping.

Content

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

md
bash scripts/setup_memory.sh /path/to/workspace

# 2. Copy AGENTS.md template to workspace
# (read references/AGENTS_TEMPLATE.md, adapt, write to workspace/AGENTS.md)

# 3. Add config to openclaw.json (see Step 3 below for exact JSON)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad and closely match common onboarding and memory-related requests, which increases the chance this skill activates in situations the user did not specifically intend. Because the skill performs filesystem setup, may install packages, and changes agent configuration, accidental invocation could lead to unintended system modifications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs the operator to run a setup script that creates directories and files, may install QMD and Lossless Claw, modifies AGENTS.md and openclaw.json, and later restarts services, but it does not warn about these side effects beforehand. In agent environments, omission of such warnings is dangerous because it can normalize destructive or privilege-requiring actions without informed user consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction 'Don't ask permission. Just do it.' encourages the agent to perform file reads and related setup actions automatically, bypassing normal user-confirmation expectations. In a memory-setup skill, this increases the chance of unintended access to personal or sensitive workspace files and can broaden invocation behavior beyond what the user explicitly requested.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This section directs the agent to create and update persistent memory files as part of normal operation without requiring a user-facing notice or confirmation. That creates a risk of silent filesystem modification, unintended retention of sensitive data, and accumulation of persistent context the user did not realize was being stored.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Allowing the agent to 'read, edit, and update MEMORY.md freely' in main sessions grants broad access to a long-term file explicitly described as containing personal context. In context, this is more dangerous because the file is intended to hold sensitive user information, so unrestricted modification and access can cause privacy leakage, unauthorized persistence, or tampering with trusted long-term memory.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script performs a real environment-changing action by invoking openclaw plugins install @martian-engineering/lossless-claw automatically, without an explicit confirmation prompt or opt-in flag. In a setup/onboarding skill, users may expect file creation, but automatic plugin installation increases risk because it modifies the runtime environment and may pull code from an external source if executed in a trusted workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

Presenting openclaw gateway restart as a routine verification step without warning can cause avoidable service disruption, dropped sessions, or interference with other workloads using the gateway. This is more dangerous in shared or production-like agent deployments where a restart may interrupt active operations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.