chat-history
Pass
Audited by Gen Agent Trust Hub on Sep 9, 2026
Risk Level: SAFECOMMAND_EXECUTIONDATA_EXFILTRATIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/history.pyexecutes theripgrep(rg) utility usingsubprocess.Popen. The command is constructed as a list of arguments, which prevents shell injection. The script specifically uses the--no-configand-F(fixed strings) flags to ensure predictable and safe search behavior. - [DATA_EXFILTRATION]: The skill discovers and reads chat history data from local directories including
~/.claude/projects,~/.codex/sessions,~/.grok/sessions, and Cursor databases (state.vscdb). While these paths contain sensitive user information, the access is inherent to the skill's primary function of history recovery. The script performs these operations locally and does not contain any network operations for exfiltration. - [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted chat logs that could contain malicious instructions designed to influence the agent.
- Ingestion points:
scripts/history.pyreads.jsonl,.vscdb(SQLite), and.jsonfiles from discovered chat history paths. - Boundary markers: The
decodefunction identifies "injected" content by checking for specific system-level prefixes such as<environment_context>,# AGENTS.md instructions, and<task-notification>. - Capability inventory: Use of
ripgrepviasubprocess.Popenfor search operations inscripts/history.py. - Sanitization: Results are limited to literal matches and are returned in a structured NDJSON format to prevent the agent from misinterpreting the data as active commands.
Audit Metadata