Skip to content

Fix security vulnerabilities in work queue, MCP server, and hooks#68

Merged
cdnsteve merged 3 commits intodevelopfrom
fix/security-vulnerabilities
Apr 9, 2026
Merged

Fix security vulnerabilities in work queue, MCP server, and hooks#68
cdnsteve merged 3 commits intodevelopfrom
fix/security-vulnerabilities

Conversation

@cdnsteve
Copy link
Copy Markdown
Member

@cdnsteve cdnsteve commented Apr 9, 2026

Summary

  • Add column allowlist to WorkQueue.update_work() to prevent SQL injection via dynamic column names
  • Add -- end-of-options separator and file_pattern validation in MCP _search_codebase to prevent grep flag injection
  • Add shlex.quote() to all task field substitutions in HookExecutor to prevent shell injection via task titles

Test plan

  • Existing test_task_hooks.py tests pass (32 tests)
  • Existing test_mcp_integration.py tests pass
  • Verify update_work rejects unknown column names with ValueError
  • Verify grep queries starting with - are handled safely
  • Verify task titles with shell metacharacters are properly escaped

Release v3.9.0 - Global Memory
- Add ALLOWED_UPDATE_COLUMNS allowlist in work_queue.py to validate
  column names before SQL interpolation in update_work()
- Add -- end-of-options separator and file_pattern regex validation
  in MCP _search_codebase() to prevent grep flag injection
- Apply shlex.quote() to task fields in HookExecutor before shell
  command format substitution to prevent shell injection
@cdnsteve cdnsteve merged commit e7303bf into develop Apr 9, 2026
22 checks passed
@cdnsteve cdnsteve deleted the fix/security-vulnerabilities branch April 9, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant