read-claude-code-history

Warn

Audited by Gen Agent Trust Hub on Nov 27, 2026

Risk Level: MEDIUMEXTERNAL_DOWNLOADSDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
  • [EXTERNAL_DOWNLOADS]: The skill downloads external binary components during its setup process.
  • scripts/history_index.py fetches the libsimple SQLite extension from a third-party GitHub repository (github.com/wangfenjin/simple) to enable Chinese FTS5 tokenizer support.
  • Although the setup process verifies the file integrity against pinned SHA-256 hashes, the download originates from an individual developer's repository rather than a recognized trusted vendor or well-known service.
  • [DYNAMIC_EXECUTION]: The skill loads and executes external binary code at runtime.
  • The history_index.py script uses connection.load_extension() to dynamically load the previously downloaded libsimple binary into the SQLite process.
  • It also provides functionality to download and run embedding models (e.g., Qwen3-Embedding) through the mlx-embeddings library.
  • [INDIRECT_PROMPT_INJECTION]: The skill possesses an attack surface for indirect prompt injection by design, as it ingest and processes historical conversation data.
  • Ingestion points: Historical session files (.jsonl, .sqlite, .db) are read from multiple directories including ~/.claude/projects/, ~/.codex/, ~/.kimi-code/, and ~/.gemini/antigravity-cli via scripts like scripts/read_claude_session.py and scripts/read_antigravity_session.py.
  • Boundary markers: The scripts use structured JSON parsing and metadata fields (like isMeta, isCompactSummary, or isSidechain) to identify record roles, but these do not prevent the agent from following instructions embedded within the content of those records.
  • Capability inventory: The skill can execute local system commands (e.g., git, sysctl) and perform file recovery operations that involve writing to the local filesystem.
  • Sanitization: Prose content from the history is extracted and presented to the agent with minimal sanitization, relying on model-level guardrails to avoid executing instructions found in the history.
  • [COMMAND_EXECUTION]: The skill executes local system utilities to retrieve environment context and state.
  • scripts/read_claude_session.py runs git branch, git status, and git log to provide a briefing on the current workspace state.
  • scripts/history_index.py executes sysctl on macOS to monitor host memory pressure during embedding tasks.
  • These commands are used as intended for the skill's primary purpose but represent exposure of the host environment.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Nov 27, 2026, 04:06 AM