T09 · Insecure Skill Coding Practices
- Location
SKILL.md:66- Finding
LanceDB Filter Expression Injection Through Unsanitized Category Input
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This local memory skill is purpose-aligned, but it creates persistent storage in a hard-coded path on load and lacks clear user controls for consent, retention, and deletion.
Review this skill before installing if you expect memory to be ephemeral or sensitive. It can retain whatever content callers add to memory on disk, uses a fixed local path, and lacks built-in consent, redaction, retention, encryption, confirmation, or recovery controls.
SKILL.md:66LanceDB Filter Expression Injection Through Unsanitized Category Input
final_memory.py:73Regular-Expression Injection in Final Memory Search
simple_memory.py:60Regular-Expression Injection in Simple Memory Search
working_memory.py:64Regular-Expression Injection in Working Memory Search
The skill initializes a persistent database under a hard-coded local path and creates the storage directory automatically, but provides no user-facing disclosure or consent mechanism that data will be written to disk. In an agent skill context, long-term memory can capture sensitive prompts, secrets, or personal data, so silent persistence materially increases privacy and data-retention risk.
The delete operation removes records immediately by ID with no confirmation, preview, or user-visible warning. In a memory-management skill, this can lead to accidental or induced deletion of important long-term data, reducing integrity and recoverability, especially if called by higher-level automation without human review.
The module persists arbitrary memory content and metadata to a local LanceDB path automatically, with no consent prompt, disclosure, retention control, or indication that potentially sensitive user data will be stored on disk. In an agent memory context, this can silently capture prompts, personal data, secrets, or conversation history and leave them recoverable from local storage by other users, backups, or forensic access.
The schema documentation in _create_memory_table says it creates a Clawdbot-compatible schema with metadata defined as pa.string(), implying string storage. However, add_memory later inserts metadata or {} as a dictionary at L071, which contradicts the declared schema intent rather than merely omitting detail.
The module persists memory content and metadata to a local on-disk database automatically, with no consent, disclosure, retention controls, or sensitivity filtering. If this memory contains prompts, secrets, personal data, or tokens, it can create unintended data retention and local disclosure risk, especially because a global instance is initialized at import time and writes to a fixed user path.
The code persists arbitrary content and metadata to a local on-disk database without any consent, disclosure, retention controls, or filtering of sensitive data. In an agent skill context, users may provide secrets, personal data, or conversation content expecting ephemeral use, so silently storing it creates privacy and data-handling risk if the host is shared, backed up, or later accessed by other components.
The module exposes async methods for search and add, but the __main__ test block calls them without await, so it receives coroutine objects instead of actually searching or adding memories. This contradicts the test's printed messages such as 'Testing Clawdbot Memory Integration...' and 'integration ready', which imply the integration was exercised successfully.
No suspicious patterns detected.