Skip to content

Commit d72359b

Browse files
Update src/seclab_taskflows/mcp_servers/codeql_python/mcp_server.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 621deb8 commit d72359b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/seclab_taskflows/mcp_servers/codeql_python/mcp_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _resolve_db_path(relative_db_path: str | Path):
7070
relative_db_path = str(relative_db_path).strip().lstrip('/')
7171
relative_db_path = Path(relative_db_path)
7272
absolute_path = (CODEQL_DBS_BASE_PATH / relative_db_path).resolve()
73-
if not str(absolute_path).startswith(str(CODEQL_DBS_BASE_PATH.resolve())):
73+
if not absolute_path.is_relative_to(CODEQL_DBS_BASE_PATH.resolve()):
7474
raise RuntimeError(f"Error: Database path {absolute_path} is outside the base path {CODEQL_DBS_BASE_PATH}")
7575
if not absolute_path.is_dir():
7676
_debug_log(f"Database path not found: {absolute_path}")

0 commit comments

Comments
 (0)