T02 · Agent Memory Poisoning
- Location
soulforge/analyzer.py:278- Finding
Untrusted memory and remote-model output can poison persistent Agent instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent memory-evolution purpose, but it grants unattended authority to send private memory data to an external API and persist model-generated changes into agent control files without enough safeguards.
Review this skill carefully before installing. Use dry-run only, avoid enabling the scheduled hook, restrict the workspace and API environment, and do not run it on memory files that may contain secrets or confidential conversations. It should not automatically write to SOUL.md, AGENTS.md, or similar control files until target allowlisting, redaction, endpoint validation, and explicit approval for each proposed update are added.
soulforge/analyzer.py:278Untrusted memory and remote-model output can poison persistent Agent instructions
soulforge/evolver.py:93Remote-model-controlled target path permits writes outside the workspace
soulforge/analyzer.py:194Sensitive memory and identity-file content is transmitted to an external API without redaction
soulforge/config.py:146Configurable API origin can disclose the bearer key and workspace data to an attacker-controlled server
SKILL.md:13Default scheduled hook repeatedly performs unattended external analysis and persistent file modification
The documented behavior materially diverges from the described purpose, including missing evidence of identity-file evolution and MiniMax use while mentioning other ingestion sources like hawk-bridge. Security review depends on accurate declarations; when a skill's description does not match real behavior, operators cannot reliably assess data flows, side effects, or exposure to external systems.
The skill description fails to clearly warn that memory contents may be transmitted to an external MiniMax API for analysis. That omission is dangerous because memory and identity files often contain sensitive user preferences, internal workflows, and potentially secrets; sending them off-box without prominent disclosure undermines informed consent and can create confidentiality and compliance issues.
The README explicitly promotes continuous analysis of memory files and use of the MiniMax API, but it does not clearly warn that potentially sensitive conversation logs, preferences, and learning records may be transmitted to a third-party service. In a memory-evolution skill, those sources are likely to contain personal, operational, or confidential data, so lack of an explicit privacy/data-sharing warning materially increases the risk of unintended disclosure.
The README advertises automatic updates to core workspace identity and memory files and later describes scheduled execution, but it does not place a prominent upfront warning that the tool will modify multiple files over time. Because these files influence future agent behavior, silent or poorly disclosed scheduled modification can cause configuration drift, integrity issues, or hard-to-trace behavioral changes in the agent workspace.
The README states that memory files are automatically analyzed using the MiniMax API, but it does not clearly warn that potentially sensitive conversation logs, learnings, or profile data may be transmitted to a third-party remote service. In a memory-evolution skill, this omission is security-relevant because users may reasonably assume local-only processing while the system persists and exports private workspace context.
The document describes continuous analysis of memory logs, vector-memory content, and learnings to update persistent identity/profile files. This creates a real data retention and exposure risk because sensitive user information, behavioral patterns, and historical context are aggregated into durable files, increasing the blast radius of compromise or accidental disclosure.
The update rules explicitly instruct the system to record new user preferences, projects, decisions, and work-style changes into persistent files such as USER.md and MEMORY.md. In this skill's context, that is more dangerous because the purpose of the tool is long-term identity evolution, so it normalizes accumulation of personal and operational data that may later be exposed, over-relied upon, or propagated across sessions without clear consent boundaries.
The skill advertises executable behavior involving environment access, file reads/writes, and network use, but does not declare any explicit tool scope or allowed-tools boundary. That makes the operational blast radius unclear to users and reviewers, increasing the chance that sensitive memory files or API-backed exfiltration occur without informed consent or enforceable restrictions.
The activation conditions are broad enough to trigger during many ordinary interactions, increasing the likelihood that the skill runs without deliberate operator intent. Because this skill can read memory, modify identity files, and potentially contact an external API on a schedule, overbroad invocation materially raises the risk of unnecessary data processing and unintended persistent changes.
The documentation gives conflicting statements about agent isolation, first claiming agent-specific backup/state directories and later describing shared global paths. In a multi-agent environment, that ambiguity can lead to cross-agent data mixing, accidental overwrite of another agent's state, or disclosure of one agent's memory-derived identity data to another.
The safety claim that the skill only appends and never overwrites conflicts with language stating it updates existing identity files. Misleading safety guarantees are dangerous because users may trust the tool with high-value configuration or identity files under the false assumption that destructive modification cannot occur.
The system is designed to automatically update SOUL.md, USER.md, IDENTITY.md, and similar workspace files, yet the architecture does not call out a clear warning or approval boundary for modifying user-controlled files. In the context of an identity-evolution skill, silent or poorly disclosed writes are risky because they can permanently alter behavioral instructions, preferences, or repository state in ways the user may not expect or review.
The architecture explicitly describes sending memory entries and existing identity-file content to an external MiniMax API, but it does not mention any consent, redaction, or warning to the user before transmission. Because these sources can contain sensitive conversation history, preferences, internal workflow details, or secrets embedded in workspace files, this creates a meaningful confidentiality and privacy risk in a memory-management skill whose core purpose is to aggregate such data.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
print("")
if results["dry_run"]:
print("🔍 DRY RUN complete. Run without --dry-run to write changes.")
else:
print("✅ SoulForge evolution complete!")
The restore command can overwrite workspace files from a user-supplied backup path without any confirmation, validation, or safety interlock. In a tool that maintains identity and behavioral files automatically, accidental or unauthorized restoration could revert important state, reintroduce poisoned content, or replace trusted files with stale or malicious backups.
The system prompt explicitly instructs the external model to mine conversation logs, learning records, errors, and feature requests, then promote them into persistent identity files. This creates a structured natural-language exfiltration and persistence channel where sensitive user data, behavioral traits, and internal project details can be extracted, summarized, and retained long-term beyond the original context.
The user prompt template embeds raw memory entries and existing file contents directly into a request sent to an external model, broadening disclosure to include both source memories and current identity documents. Because the prompt asks the model to compare, summarize, and generate updates from this material, it increases the chance that sensitive data is exposed, transformed, and re-persisted in additional files.
This code sends raw memory entries and existing identity-file contents to a third-party MiniMax API, which can include sensitive user conversations, preferences, and internal workspace data. Even if this is the feature's intended behavior, the transfer happens without any explicit consent gate, redaction step, or in-code warning, so private data can be disclosed outside the local environment.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"""Get MiniMax API base URL."""
return self._config.get(
"minimax_base_url",
os.environ.get("MINIMAX_BASE_URL", "https://api.minimax.chat/v1")
)
@property
The class docstring explicitly lists 'Incremental updates (appends, never overwrites)' as a safety feature. However, restore_from_backup uses shutil.copy2(backup, target) to replace the target file contents, which is an overwrite operation and contradicts the stated safety guarantee.
The module docstring and class documentation say the reader 'reads memory files from multiple sources' including the hawk-bridge vector store, and read_all() implies a unified list of entries from all sources. But _read_hawk_bridge() only connects to LanceDB, counts rows, and logs the count without creating any MemoryEntry objects, so hawk-bridge content is not actually included in the returned memory set.
This skill is designed to automatically read workspace memory logs and learning files that may contain sensitive user preferences, errors, and behavioral history, yet the code shows no consent gate, scope restriction, or disclosure mechanism before aggregation. In the context of an 'AI memory evolution' skill, silent ingestion of these files increases privacy risk because accumulated personal or operational data can be processed and potentially propagated into identity files or downstream API use.
The comments 'Try to read from LanceDB' and 'Get recent entries (last 50)' indicate that vector-store records will be read as memory content. In practice, the code merely checks table existence, computes a count, and logs it; no records are fetched into MemoryEntry objects and nothing from hawk-bridge reaches callers.
The isolation table says memory sources are read only from the agent's own memory/ and .learnings/. However, the later memory sources table includes 'hawk-bridge | Vector store', which contradicts the earlier narrow description of where data comes from.
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
def setup_logging(level: str = "INFO") -> None:
"""Configure logging."""
logging.basicConfig(
level=getattr(logging, level.upper(), logging.INFO),
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)