Security context

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

vitali87/code-graph-rag
main @ 25a6d38
21
Fixes
0
CVEs
HIGH
Peak severity
95.0%
Coverage
Highlights
Command Injection: 8 prior fixes. Scrutinize any change in this area.
codebase_rag/tools/shell_command.py: most-fixed (14 issues). Treat as high-risk during review.
20 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: The tool repeatedly failed to securely parse shell operators, nested single/double quotes, and backslash escapes when using subprocess wrappers. Attackers or malicious agents can construct payloads with unclosed quotes or subshells to bypass blocklists and run arbitrary system commands.
Auth Bypass: Validation logic intended to enforce read-only Cypher queries was repeatedly bypassed. Attackers used single-line or multi-line Cypher comments to disrupt naive keyword matchers, allowing destructive write queries to reach the Neo4j backend.
Command Injection: Dynamic source-code templates for Node.js, Go, and C++ were constructed by interpolating untrusted module or package names parsed from imports, which were then executed via subprocesses. This leads to direct remote code execution.