Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions robosystems/graph_api/core/duckdb/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@
try:
db_path = self._get_database_path(graph_id)

# Defense-in-depth: verify resolved path stays under base_path
if not db_path.resolve().is_relative_to(self.base_path.resolve()):
raise ValueError(f"Path escapes base directory: {db_path}")

# Ensure database directory exists
db_path.parent.mkdir(parents=True, exist_ok=True)

Expand Down
Loading