We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 621deb8 commit d72359bCopy full SHA for d72359b
src/seclab_taskflows/mcp_servers/codeql_python/mcp_server.py
@@ -70,7 +70,7 @@ def _resolve_db_path(relative_db_path: str | Path):
70
relative_db_path = str(relative_db_path).strip().lstrip('/')
71
relative_db_path = Path(relative_db_path)
72
absolute_path = (CODEQL_DBS_BASE_PATH / relative_db_path).resolve()
73
- if not str(absolute_path).startswith(str(CODEQL_DBS_BASE_PATH.resolve())):
+ if not absolute_path.is_relative_to(CODEQL_DBS_BASE_PATH.resolve()):
74
raise RuntimeError(f"Error: Database path {absolute_path} is outside the base path {CODEQL_DBS_BASE_PATH}")
75
if not absolute_path.is_dir():
76
_debug_log(f"Database path not found: {absolute_path}")
0 commit comments