Skip to content

Commit ab3ec17

Browse files
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 4af4a65 commit ab3ec17

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/seclab_taskflows/mcp_servers/codeql_python/mcp_server.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313

1414
from pydantic import Field
1515
#from mcp.server.fastmcp import FastMCP, Context
16-
from fastmcp import FastMCP, Context # use FastMCP 2.0
16+
from fastmcp import FastMCP # use FastMCP 2.0
1717
from pathlib import Path
1818
import os
1919
import csv
2020
import json
2121
from sqlalchemy import create_engine
2222
from sqlalchemy.orm import Session
2323

24-
import zipfile
25-
import httpx
26-
import aiofiles
24+
25+
26+
2727
from .codeql_sqlite_models import Base, Source
2828

2929
MEMORY = Path(os.getenv('CODEQL_SQLITE_DIR', default='/app/my_data'))
@@ -164,6 +164,8 @@ def remote_sources(owner: str, repo: str,
164164
results = _run_query('remote_sources', database_path, language, {})
165165

166166
# Check if results is an error (list of strings) or valid data (list of dicts)
167+
if isinstance(results, str):
168+
return f"Error: {results}"
167169
if results and isinstance(results[0], str):
168170
return f"Error: {results[0]}"
169171

src/seclab_taskflows/taskflows/audit/remote_sources_local.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ taskflow:
6666
If it is a web endpoint, identify the routing path that reaches this source, HTTP method,
6767
any middlewares used, which roles are allowed to call it.
6868
Note which kind of authentication is required for that endpoint.
69-
It is possible that the source does not have require any authentication.
69+
It is possible that the source does not require any authentication.
7070
If authorization is required, note the details.
7171
Analyze the code and identify if this source could lead to a security vulnerability.
7272

src/seclab_taskflows/toolboxes/codeql_python.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ server_prompt: |
6565
file starting at line 1, column 2 and ending at line 3, column 4. These line
6666
and column indices are 1-based, meaning line and column values start at 1.
6767
68-
If the region is ommitted the full contents of the file will be returned,
68+
If the region is omitted the full contents of the file will be returned,
6969
for example `file:///path/to/file` returns the full contents of
7070
`/path/to/file`.
7171

0 commit comments

Comments
 (0)