memory-search
Fail
Audited by Gen Agent Trust Hub on Apr 1, 2026
Risk Level: HIGHDATA_EXFILTRATIONCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [DATA_EXFILTRATION]: The
getfunction inrun.pyis vulnerable to path traversal. It constructs the file path by joining a base directory with a user-supplied filename usingfilepath = _MEMORY_DIR / filename. Sincepathlib.Pathresolution allows absolute paths or directory traversal sequences (e.g.,../../) to override the base directory, an attacker can read sensitive system files outside of the intended memory directory. - [COMMAND_EXECUTION]: The
searchfunction inrun.pypasses the user-providedqueryargument directly to thegrepcommand. Whilesubprocess.runis called withoutshell=True, the lack of input sanitization allows for argument injection. A malicious query starting with a hyphen could inject unexpected flags into thegrepexecution. - [PROMPT_INJECTION]: The skill is susceptible to indirect prompt injection via the processing of untrusted conversation memories.
- Ingestion points: Markdown files are read from the
_MEMORY_DIRand returned to the agent inrun.pyvia thegetandsearchfunctions. - Boundary markers: No delimiters or safety instructions are used to separate memory content from agent instructions when the content is presented to the LLM.
- Capability inventory: The skill has the capability to execute shell commands via
subprocess.runinrun.pyand requires thebashtool as specified inSKILL.md. - Sanitization: No validation or sanitization is performed on the content of the memory files before they are provided to the agent context.
Recommendations
- AI detected serious security threats
Audit Metadata