Skip to content

Commit 009c3a2

Browse files
Merge branch 'codeql-python' of https://github.com/GitHubSecurityLab/seclab-taskflows into codeql-python
2 parents 2b50b82 + a3261aa commit 009c3a2

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/seclab_taskflows/mcp_servers/codeql_python/codeql_sqlite_models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ class Source(Base):
2121

2222
def __repr__(self):
2323
return (f"<Source(id={self.id}, repo={self.repo}, "
24-
f"location={self.source_location}, type={self.type}, "
25-
# f"line={self.line},",
24+
f"location={self.source_location}, line={self.line}, source_type={self.source_type}, "
2625
f"notes={self.notes})>")

src/seclab_taskflows/mcp_servers/codeql_python/mcp_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
filename='logs/mcp_codeql_python.log',
1010
filemode='a'
1111
)
12-
from seclab_taskflow_agent.mcp_servers.codeql.client import run_query, file_from_uri, list_src_files, _debug_log, search_in_src_archive
12+
from seclab_taskflow_agent.mcp_servers.codeql.client import run_query, _debug_log
1313

1414
from pydantic import Field
1515
#from mcp.server.fastmcp import FastMCP, Context
@@ -103,7 +103,7 @@ def store_new_source(self, repo, source_location, line, source_type, notes, upda
103103

104104
def get_sources(self, repo):
105105
with Session(self.engine) as session:
106-
results = session.query(Source).filter_by(repo=repo).all()
106+
results = session.query(Source).filter_by(repo = repo).all()
107107
sources = [source_to_dict(source) for source in results]
108108
return sources
109109

@@ -208,7 +208,7 @@ def clear_codeql_repo(owner: str, repo: str):
208208
"""
209209
repo = process_repo(owner, repo)
210210
with Session(backend.engine) as session:
211-
deleted_sources = session.query(Source).filter_by(repo=repo).delete()
211+
deleted_sources = session.query(Source).filter_by(repo = repo).delete()
212212
session.commit()
213213
return f"Cleared {deleted_sources} sources from repo {repo}."
214214

src/seclab_taskflows/taskflows/audit/remote_sources_local.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ taskflow:
5959
repeat_prompt: true
6060
max_steps: 100
6161
name: source analysis
62-
description: Identify actions that untrusted users are allowed perform the source.
62+
description: Identify actions that untrusted users are allowed to perform on the source.
6363
agents:
6464
- seclab_taskflows.personalities.auditor
6565
user_prompt: |
66-
The source is a {{ RESULT_type }} in {{ RESULT_repo }} in the location {{ RESULT_source_location }} on line {{ RESULT_line }}.
66+
The source is a {{ RESULT_source_type }} in {{ RESULT_repo }} in the location {{ RESULT_source_location }} on line {{ RESULT_line }}.
6767
If the source is in a folder relating to tests or demo code, skip the analysis and update the source entry in the codeql_sqlite database indicating it is not relevant.
6868
Analyze what the source endpoint is used for.
6969
If it is a web endpoint, identify the routing path that reaches this source, HTTP method,

0 commit comments

Comments
 (0)