Back to skill

Security audit

Memory Lcm

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed conversation-memory tool, but it persistently stores full chat history and auto-writes inferred decisions into long-term agent memory without clear approval, redaction, retention, or rollback controls.

Review before installing if you handle secrets, customer data, personal data, or sensitive business context. This skill is not visibly exfiltrating data or hiding behavior, but it deliberately keeps full conversation history and can write inferred memories automatically; use only where that retention is acceptable and where MEMORY.md/database files are protected and periodically reviewed or purged.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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)

T02 · Agent Memory Poisoning

Error
Location
src/memory-sync.js:7
Finding

Untrusted Conversation Content Can Poison Persistent Agent Memory

Content
View full analysis
10 && content.length < 300) { decisions.push(content); } } } return [...new Set(decisions)]; } function syncToMemory(date, decisions) { if (!decisions.length) return 0; const memoryFile = getMemoryFile(); if (!fs.existsSync(memoryFile)) { fs.writeFileSync(memoryFile, '# MEMORY.md - Long-Term Memory\n\n_Curated memories._\n\n'); } let content; try { content = fs.readFileSync(memoryFile, 'utf-8'); } catch { content = '# MEMORY.md - Long-Term Memory\n\n'; } const header = '## Auto-Captured'; const entries = decisions.map(d => `- **[${date}]** ${d}`).join('\n'); if (content.includes(header)) { const idx = content.indexOf(header); content = content.slice(0, idx + header.length) + '\n' + entries + '\n' + content.slice(idx + header.length); } else { content += `\n${header}\n\n${entries}\n`; } fs.writeFileSync(memoryFile, content); return decisions.length; } ``` The explicit synchronization command supplies raw message content directly to these functions: ```javascript case 'sync': { // Sync decisions from recent uncompacted messages const messages = require('../src/messages').getUncompactedMessages(sess ...[truncated 2666 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/db.js:5
Finding

Complete Conversation History Is Retained in Plaintext Without Explicit Access Controls

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (18)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node bin/tony-lcm.js status # Show DB stats

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node bin/tony-lcm.js status # Show DB stats

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node bin/tony-lcm.js status # Show DB stats

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node bin/tony-lcm.js status # Show DB stats

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node bin/tony-lcm.js status # Show DB stats

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node bin/tony-lcm.js status # Show DB stats

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that key decisions are auto-synced to MEMORY.md, but it does not warn users that conversation-derived content will be copied into a secondary file. This increases the chance that sensitive or regulated information is duplicated into a more visible or less controlled location, expanding exposure and making deletion harder.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that key decisions are auto-synced to MEMORY.md, but it does not warn users that conversation-derived content will be copied into a secondary file. This increases the chance that sensitive or regulated information is duplicated into a more visible or less controlled location, expanding exposure and making deletion harder.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The core design is blanket, lossless retention of all user and assistant messages with cross-session search, creating a built-in data retention and retrieval channel for sensitive natural-language content. Even without explicit exfiltration, this materially increases the risk of privacy violations, inadvertent disclosure, and later misuse of secrets that users may assume were ephemeral.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The usage example instructs developers to log every user message and assistant response after each turn, normalizing indiscriminate capture without any sensitivity checks. This implementation pattern makes it likely that secrets, personal data, access tokens, or confidential business content will be stored automatically.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Promoting full-text search across all sessions plus automatic sync of key decisions to MEMORY.md increases both discoverability and duplication of sensitive information. In the context of an agent memory skill, this makes the risk more dangerous because the feature is specifically intended to preserve and resurface prior conversational content, including potentially sensitive material from unrelated sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The sync command performs a file-modifying action by persisting extracted decisions to MEMORY.md. While the success message appears after the write, there is no prior confirmation prompt, pre-action warning, or inline comment/docstring disclosing that invoking this command will modify a user-visible file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code logs arbitrary conversation content and exposes compaction/summarization flows without any consent, notice, or data-minimization controls visible in this file. In an agent memory skill, silently persisting user prompts and derived summaries can capture sensitive data and create privacy/compliance risk if users do not expect retention.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code extracts 'decisions' from summaries and synchronizes them into memory without any visible transparency, review, or consent mechanism. This increases risk because inferred data may be retained beyond the original conversation, may be inaccurate, and can influence future agent behavior in ways the user does not know about.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code persistently stores conversation-derived content into a long-term memory file automatically, without any consent, notice, filtering, or sensitivity checks. That creates a real privacy and data-retention risk because secrets, personal data, or sensitive operational details mentioned in conversation can be silently written to disk and retained beyond the session.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This function stores conversation content, roles, session identifiers, and timestamps in a database and persists it via saveDb(). There is no confirmation prompt, user-facing log, or explanatory comment/docstring indicating that user message data will be retained, which is a safety-relevant data handling action for a code file.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 10)May include surrounding context.

json
"tony-lcm": "./bin/tony-lcm.js"
  },
  "dependencies": {
    "sql.js": "^1.11.0"
  },
  "scripts": {
    "start": "node bin/tony-lcm.js"

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
73% confidence
Finding

The function modifies stored message records by marking them compacted and then saves the database. Although this is part of normal internal state management, the code provides no comment, log, or other disclosure that persisted records are being altered.

Content

No source excerpt is available for this finding.