lean-memory
Pass
Audited by Gen Agent Trust Hub on Nov 21, 2026
Risk Level: SAFECOMMAND_EXECUTIONPERSISTENCEINDIRECT_PROMPT_INJECTIONDATA_EXFILTRATIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/mem.pyutilizessubprocess.runto execute Git commands (init, add, commit, push, pull, status, etc.) for repository management. These commands are necessary for the synchronization of the memory store across different environments and to detect local repository slugs. - [PERSISTENCE]: During the setup process, the skill modifies the configuration of Claude Code (
settings.json) to install aSessionStarthook. This hook automatically runspython3 mem.py contextwhen a new session begins, ensuring shared memory is consistently loaded. - [INDIRECT_PROMPT_INJECTION]: The skill facilitates the injection of instructions and facts fetched from a remote Git repository into the agent's context, creating an attack surface for indirect prompt injection.
- Ingestion points: Markdown entries stored in the
~/.agent-memorydirectory, which are pulled from a user-configured Git remote. - Boundary markers: Injected context is prefaced with an
# Agent memoryheader and a disclaimer instructing the model to treat the content as data rather than absolute instructions. - Capability inventory: The skill can modify agent configuration files (e.g.,
settings.json), create filesystem symlinks to redirect instruction files, and perform network operations via Git subprocesses. - Sanitization: The script includes a
SECRETregex scanner that checks memory entries for common sensitive patterns (e.g., private keys, API tokens) and blocks their addition to the store. - [DATA_EXFILTRATION]: The skill is designed to sync local memory entries to a remote Git URL. While intended for legitimate user-controlled synchronization, this mechanism provides a channel through which sensitive preferences or environment data could be transmitted to an external server.
- [EXTERNAL_DOWNLOADS]: The documentation in
references/agent-setup.mdprovides instructions to download and install the skill from a remote repository usingnpx skills add aussadawut-dev/lean-skills.
Audit Metadata