codebase-memory-mcp

Pass

Audited by Gen Agent Trust Hub on Sep 14, 2026

Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill interacts with the system using subprocess.run and os.execve to execute commands for Git repository discovery, lsof process auditing, and interaction with the codebase-memory-mcp CLI. These operations are performed with list-based arguments to prevent shell injection and include validation of executable paths.
  • [DYNAMIC_EXECUTION]: The shell script scripts/codebase-memory-graph.sh utilizes Python heredocs (`python3
  • <<'PY'`) to perform complex JSON processing and path resolution. This logic is statically defined within the script and used for local data transformation.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes repository metadata and project graph structures which could be influenced by untrusted data in a target repository. It mitigates this risk through the use of robust parsing techniques, such as Git's porcelain output formats with NUL-separators and comprehensive validation of all ingested project paths.
  • Ingestion points: Repository structures analyzed via git in scripts/codebase_memory_cache.py and scripts/codebase-memory-graph.sh, as well as JSON manifest files.
  • Boundary markers: The skill enforces strict JSON schemas and utilizes NUL-separated command output (e.g., git worktree list -z) to ensure data integrity during parsing.
  • Capability inventory: File system operations (reading/writing manifests and database files), local network status checks (via curl to localhost), and management of the MCP service CLI.
  • Sanitization: Implements extensive checks for NUL characters in paths, verifies that paths are absolute and within expected boundaries, validates manifest SHA-256 digests, and uses restricted file permissions (chmod 600) for sensitive temporary data.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 14, 2026, 10:51 AM
Security Audit — agent-trust-hub — codebase-memory-mcp