Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

deusdata/codebase-memory-mcp
main @ b1a646e
25
Fixes
0
CVEs
CRITICAL
Peak severity
Highlights
Command Injection: 8 prior fixes. Scrutinize any change in this area.
src/cli/cli.c: most-fixed (6 issues). Treat as high-risk during review.
15 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Command Injection: Repeated patterns of executing shell commands via system() or popen() in the CLI update and installation procedures allow arbitrary shell execution. Developers must use shell-free subprocess execution APIs instead of interpolating strings into shell wrappers.
Path Traversal: Zip/Tar Slip vulnerabilities during archive unpacking allow writing arbitrary files outside of the target extraction directory. Strict path canonicalization and destination prefix checks must be consistently applied across both Python and C-based extraction helpers.
SQL Injection: Direct dynamic string interpolation into SQL commands for search and BFS operations bypasses the isolation guarantees of the database, necessitating the strict use of parameterized sqlite3 bindings.