Back to skill

Security audit

Cross-Platform Memory Bridge

Security checks for vulnerabilities and agentic risk

Overview

This skill should be reviewed carefully because it automatically feeds chat logs and local memory files into future agent prompts without enough scoping, consent, or user/session isolation.

Install only in a tightly controlled single-user environment, or revise it first. It should select memory by verified user/session/channel, require explicit opt-in for each source, avoid putting recalled content in the system role, preserve real sender provenance, and redact or filter sensitive and prompt-injection-like content before use.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
references/memory-bridge.ts:20
Finding

Untrusted Cross-Platform Messages Are Promoted to System-Level Instructions

Content
View full analysis
{ const parts: string[] = []; // Read MEMORY.md — curated long-term memories try { const mem = await fs.readFile(path.join(WORKSPACE, 'MEMORY.md'), 'utf8'); parts.push('## MEMORY.md\n' + mem); } catch {} // Read today's daily notes try { const today = new Date().toISOString().slice(0, 10); const daily = await fs.readFile(path.join(WORKSPACE, 'memory', `${today}.md`), 'utf8'); parts.push("## Today's Notes\n" + daily); } catch {} // Read yesterday's daily notes try { const d = new Date(); d.setDate(d.getDate() - 1); const yesterday = d.toISOString().slice(0, 10); const daily = await fs.readFile(path.join(WORKSPACE, 'memory', `${yesterday}.md`), 'utf8'); parts.push("## Yesterday's Notes\n" + daily); } catch {} // Read cross-platform messages from session logs try { const crossPlatform = await getCrossPlatformMessages(); if (crossPlatform.telegram.length > 0) { parts.push('## Recent Telegram Conversation\n' + crossPlatform.telegram.join('\n')); } if (crossPlatform.discord.length > 0) { parts.push('## Recent Discord Conversation\n' + crossPlatform.discord.join('\n')); } } catch {} if (parts.length === 0) return ''; return '\n\n---\n\nMEMORY CONTEXT:\n' + parts.join('\n\n') + '\n\n---\n\nIMPORTANT: Use the memory context above to inform your responses. Remember facts about the user and our work together.'; } ``` The documented integration in `SKILL.md:54-65` assigns this content the system role: ```typescript import { getMemoryContext } from '@/lib/memory-bridge'; // In your POST handler, before cal ...[truncated 4070 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/memory-bridge.ts:64
Finding

Global Session Selection Causes Cross-User and Cross-Channel Memory Disclosure

Content
View full analysis
{ const result: CrossPlatformMessages = { telegram: [], discord: [] }; try { const files = await fs.readdir(SESSIONS_DIR); const jsonlFiles = files.filter((f) => f.endsWith('.jsonl') && !f.includes('.lock')); if (jsonlFiles.length === 0) return result; // Find most recent session file type FileWithMtime = { name: string; path: string; mtimeMs: number }; const withMtime: FileWithMtime[] = await Promise.all( jsonlFiles.map(async (name) => { const filePath = path.join(SESSIONS_DIR, name); const stat = await fs.stat(filePath); return { name, path: filePath, mtimeMs: stat.mtimeMs }; }) ); withMtime.sort((a, b) => b.mtimeMs - a.mtimeMs); const mostRecent = withMtime[0]; const content = await fs.readFile(mostRecent.path, 'utf8'); const lines = content.trim().split('\n'); ``` The public function takes no authenticated user, tenant, channel, or session identifier and reads shared workspace files at `references/memory-bridge.ts:20-42`: ```typescript export async function getMemoryContext(): Promise { const parts: string[] = []; // Read MEMORY.md — curated long-term memories try { const mem = await fs.readFile(path.join(WORKSPACE, 'MEMORY.md'), 'utf8'); parts.push('## MEMORY.md\n' + mem); } catch {} // Read today's daily notes try { const today = new Date().toISOString().slice(0, 10); const daily = await fs.readFile(path.join(WORKSPACE, 'memory', `${today}.md`), 'utf8'); ...[truncated 3326 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The metadata says the skill injects recent Telegram and Discord conversations, but the body also states it reads local memory files such as MEMORY.md and daily notes from the workspace. This mismatch undermines informed consent and can cause operators to enable a skill believing it only uses chat logs when it also pulls broader persistent local data into model context.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill lacks a clear warning that it ingests untrusted content from multiple platforms and prepends that content into system context. This is dangerous because prior messages and logs can contain sensitive information or adversarial instructions, turning the memory bridge into a prompt-injection path and a cross-session data disclosure mechanism.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is explicitly designed to pull prior Telegram, Discord, and local note content into every new request, creating a direct natural-language channel for cross-session and cross-platform data leakage. In this context, the risk is elevated because historical user content is treated as model-visible context regardless of whether the current interaction actually requires it, and any sensitive text in those sources can be surfaced or influence outputs.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented output format instructs the agent to use imported Telegram/Discord messages and local notes to inform responses, meaning sensitive historical content is intentionally made actionable by the model. This increases the chance of inadvertent disclosure, cross-user contamination, and exploitation through malicious content embedded in past logs or notes.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill automatically reads Telegram and Discord user conversations from session logs and injects them into future gateway prompts without any explicit user-facing disclosure or consent mechanism. Cross-platform aggregation materially increases privacy risk because information shared in one channel can unexpectedly influence responses in another, exposing private context outside the user’s expectations.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function packages prior user messages as reusable memory context and injects them into subsequent prompts, creating persistent cross-session and cross-platform propagation of user content. This can leak sensitive personal or operational information into unrelated future interactions and amplifies prompt injection risk from untrusted prior messages.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill describes behavior that reads session logs, workspace files, and uses environment-configured paths, yet it declares no explicit tool scope or permissions boundaries. In a memory-ingestion skill, missing scope declarations makes the data-access surface implicit and harder for operators or users to review, increasing the chance of unintended access to sensitive local context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The invocation guidance says to use the skill whenever the agent needs continuity across channels, which is broad enough to trigger in many ordinary conversations. Because the skill injects prior messages and notes into requests, over-broad triggering expands unnecessary exposure of historical data and increases prompt-injection and privacy risks.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code reads local workspace memory sources via configurable paths and uses them as prompt context, even though the skill is presented as a cross-platform conversation bridge. That mismatch violates least privilege and can expose unrelated sensitive notes or operator data to downstream model processing without a clear need tied to the advertised function.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill’s documented purpose is to bridge recent Telegram and Discord conversations, but it also reads MEMORY.md and daily notes from the workspace and injects them into model context. This expands data access beyond the stated scope, creating undisclosed prompt-data exposure and increasing the chance that sensitive local notes are surfaced to the model or reflected in responses.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The appended instruction tells the model to remember and use facts about the user and prior work, encouraging broad retention and reuse of potentially sensitive context beyond the immediate task. In this skill, that makes the surrounding data collection more dangerous because it nudges the model to treat all injected memory as durable and actionable user profile information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The output format includes the instruction 'IMPORTANT: You are Sancho,' which imposes a fixed identity/persona through natural-language guidance. This can violate organizational policy when a skill forces a specific mode or presentation without documenting user choice or opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module comments state that the bridge reads Telegram and Discord user messages from OpenClaw session logs and returns them for context injection. However, the main function additionally reads curated memory and dated notes from the workspace, so the documentation narrows the behavior in a way that contradicts the actual inputs used.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.