Security context

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

rohitg00/kubectl-mcp-server
main @ 14f9c13
2
Fixes
0
CVEs
CRITICAL
Peak severity
100.0%
Coverage
Highlights
Command Injection: 2 prior fixes. Scrutinize any change in this area.
kubectl_mcp_tool/natural_language.py: most-fixed (1 issue). Treat as high-risk during review.
2 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: os.system passes a string to the shell, allowing metacharacter injection if any part of the command is user-influenced. The fix replaced it with subprocess.Popen without a shell, but sibling code paths may still use shell=True or os.system.
Command Injection: subprocess with shell=True allows shell metacharacter injection. The fix removed shell=True and added input validation plus a kubectl subcommand allowlist, but other natural-language parsing or tool dispatch paths may lack the same allowlist.