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.runandos.execveto execute commands for Git repository discovery,lsofprocess auditing, and interaction with thecodebase-memory-mcpCLI. 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.shutilizes 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
gitinscripts/codebase_memory_cache.pyandscripts/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
curlto 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