Back to skill

Security audit

Memory Pipeline

Security checks for vulnerabilities and agentic risk

Overview

This skill openly builds a workspace memory system, but it installs silent recurring jobs that can keep changing long-term memory without clear review or rollback controls.

Review this skill before installing the full workflow. Confirm each cron job's payload, schedule, timezone, workspace path, and disable/removal process; prefer manual runs or visible logs until you trust the behavior. Do not let it store sensitive conversations unless you are comfortable with that information being retained and summarized into long-term memory.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
SKILL.md:23
Finding

Recurring Cron Jobs Establish Cross-Session System Persistence

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:23-29, SKILL.md:76-87, SKILL.md:157-189; references/cron-spec.md:3-69
Vulnerability Type: Scheduled-task persistence
Risk Level: High

Vulnerable Code Snippets

SKILL.md:23-29:

markdown
### 1. Fresh install
Use when the workspace has no stable memory structure yet.

Do this:
- read `references/directory-layout.md`
- create the base files/directories
- install all three cron jobs
- run the acceptance checks from `references/verification.md`

SKILL.md:76-87:

markdown
If the user wants the full workflow, create or verify all of the following:

- `MEMORY.md`
- `memory/inbox.md`
- `memory/YYYY-MM-DD-raw.md` (created on demand)
- `memory/YYYY-MM-DD.md` (created by daily summary job)
- `memory/projects/`
- `memory/system/`
- `memory/groups/`
- three cron jobs:
  - hourly inbox → raw archive
  - daily raw/context → daily summary
  - weekly daily summaries → `MEMORY.md`

references/cron-spec.md:7-13, references/cron-spec.md:34-40, and references/cron-spec.md:51-57:

markdown
### 1. Hourly archive job

Suggested name:
- `context: compress chat history (hourly)`

Recommended schedule:

- cron expression: `0 * * * *`
- timezone: `Asia/Macau`
markdown
### 2. Daily summary job

Suggested name:
- `daily-memory-diary`

Recommended schedule:

- cron expression: `30 23 * * *`
- timezone: `Asia/Macau`
markdown
### 3. Weekly long-term review job

Suggested name:
- `weekly-memory-review`

Recommended schedule:

- cron expression: `30 23 * * 0`
- timezone: `Asia/Macau`

Technical Analysis

The Skill directs the agent to install three recurring cron jobs rather than limiting execution to the current invocation. These jobs survive the initiating session and periodically read or modify persistent workspace state:

  • The hourly job reads `memory/inbox. ...[truncated 2854 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not install any cron job merely because the Skill was loaded or initialized. Make manual operation the default.
  2. Obtain explicit, informed approval separately for each recurring job before installation.
  3. Before approval, display the complete cron payload, schedule, timezone, execution identity, affected paths, and expected side effects.
  4. Restrict every job to an explicitly approved workspace root and reject paths that resolve outside it.
  5. Run jobs with a dedicated least-privilege identity that can access only the required memory files.
  6. Use atomic writes, backups, and validation before clearing inbox entries or replacing MEMORY.md.
  7. Treat memory content as untrusted data. Cron prompts must not interpret stored text as executable instructions or authorization to invoke tools.
  8. Record an audit log of each run and every modified file without storing sensitive conversation content unnecessarily.
  9. Provide documented commands to disable and remove all three jobs, and verify their removal.
  10. Consider replacing recurring jobs with user-triggered commands or short-lived, explicitly authorized runs.
  11. Extend verification to inspect exact schedules and payload semantics, rather than checking only job names, enabled state, and workspace-path fingerprints.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill clearly directs file reads, file writes, and cron-job installation/verification, but it declares no explicit tool scope such as permissions or allowed-tools. That mismatch weakens least-privilege controls and can cause an agent to execute broader filesystem or shell actions than a reviewer or runtime policy expects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs silent, recurring background writes to MEMORY.md and memory/* via cron, including persistence of conversation-derived content, without requiring clear user notice or consent at the time of setup and operation. This creates a meaningful privacy and integrity risk because sensitive data may be retained, transformed, and propagated into long-term memory files without the user realizing ongoing automated modification is occurring.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file directs autonomous background reads and writes to memory files and explicitly says to avoid user-visible messages. Silent scheduled modification of persistent files is dangerous because users may be unaware that data is being transformed, merged, or removed, making mistakes harder to detect and consent ambiguous.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The spec explicitly instructs the hourly job to clear or mark processed items in memory/inbox.md after archiving, but it does not require an auditable trail, backup, or user disclosure. In a background cron context, this creates a real risk of silent data loss or incorrect deletion if the archive step is buggy, partial, or misclassifies items as processed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The weekly job is instructed to update MEMORY.md with durable information, which can alter a long-term behavioral or profile store without explicit disclosure, review, or approval. Persistent memory changes are higher risk than ephemeral notes because incorrect or overbroad summaries can shape future agent behavior and preserve sensitive user information indefinitely.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/migration-and-repair.md (reported line 92)May include surrounding context.

md
- creating a second memory system outside the existing workspace files
- replacing the main chain with only topic folders
- storing everything forever instead of curating
- trusting ‘cron says ok’ without checking file outcomes

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/verify_memory_pipeline.py (reported line 99)May include surrounding context.

python
ok: list[str] = []
    warn: list[str] = []
    try:
        result = subprocess.run(
            ["openclaw", "cron", "list", "--json"],
            check=False,
            capture_output=True,

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The cron workflow specifies grouping entries under ## YYYY-MM-DD HH:00 Asia/Macau, which imposes a locale-specific time zone in the skill instructions. The file does not indicate that this is optional, user-configurable, or justified by a region-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file specifies Asia/Macau as the timezone for scheduled jobs, and repeats that locale choice later, without indicating that users can select their own timezone or that the skill is region-specific. This is a natural-language locale policy concern because it forces a particular locale setting without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The daily summary schedule is pinned to Asia/Macau without offering a user-selectable locale or explaining a regional constraint. This can violate language/locale policy expectations when the skill is presented as generally applicable rather than region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The weekly review schedule again requires Asia/Macau without any opt-in or documented regional justification. Repeated hard-coded locale settings suggest the skill enforces a locale choice rather than allowing user preference.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.