Skip to content

fix(security): resolve vector store and summarizer path injection sinks - #30

Merged
spelech merged 1 commit into
mainfrom
fix/codeql-summarizer-and-vector-stores
Sep 27, 2026
Merged

spelech merged 1 commit into
mainfrom
fix/codeql-summarizer-and-vector-stores

Conversation

@spelech

@spelech spelech commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Summarizer: Eliminate raw-disk open(norm_fp) fallback entirely; file reads are safely delegated through FileReaderService and LocalStorageService. Updated test fixture in test_summarizer.py to register its temporary directory in indexed_paths.
  • Vector Stores: Confine persistent storage directories in Chroma (validate_chroma_storage_path), Qdrant (validate_qdrant_storage_path), and settings router (_validate_vector_storage_path) to authorized base directories (DATA_DIR, /app/data, data/, or /tmp), removing insecure bare os.path.sep checks prior to directory creation.

Verification

  • All 524 backend tests passing with 0 errors (pytest).

@spelech
spelech merged commit b36eb1d into main Sep 27, 2026
11 checks passed
@spelech
spelech deleted the fix/codeql-summarizer-and-vector-stores branch September 27, 2026 11:58
try:
safe_sp = _validate_vector_storage_path(payload.storage_path)
except ValueError as ve:
return JSONResponse(status_code=400, content={"success": False, "error": str(ve), "message": str(ve)})
try:
safe_sp = _validate_vector_storage_path(payload.storage_path)
except ValueError as ve:
return JSONResponse(status_code=400, content={"status": "error", "error": str(ve), "message": str(ve)})
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.

2 participants