Skip to content

Conversation

@kevinbackhouse
Copy link
Contributor

Update the code to use mcp_data_dir and log_file_name, which were added in GitHubSecurityLab/seclab-taskflow-agent#99 and GitHubSecurityLab/seclab-taskflow-agent#105.

Copilot AI review requested due to automatic review settings December 4, 2025 10:18
Copilot finished reviewing on behalf of kevinbackhouse December 4, 2025 10:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors multiple MCP server modules to use centralized path utilities (mcp_data_dir and log_file_name) from seclab_taskflow_agent.path_utils, replacing hardcoded paths and environment variable patterns. The change standardizes how data directories and log files are configured across all MCP servers in the codebase.

  • Replaces direct os.getenv() calls with mcp_data_dir() for data directory configuration
  • Replaces hardcoded log file paths with log_file_name() helper function
  • Relocates logging.basicConfig() calls to after imports for consistent initialization order

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/seclab_taskflows/mcp_servers/report_alert_state.py Updated to use mcp_data_dir for ALERT_RESULTS_DIR and log_file_name for logging configuration
src/seclab_taskflows/mcp_servers/repo_context.py Updated to use mcp_data_dir for REPO_CONTEXT_DIR and log_file_name for logging configuration
src/seclab_taskflows/mcp_servers/local_gh_resources.py Updated to use mcp_data_dir for LOCAL_GH_DIR and log_file_name for logging configuration
src/seclab_taskflows/mcp_servers/local_file_viewer.py Updated to use mcp_data_dir for LOCAL_GH_DIR and log_file_name for logging configuration; contains typo: log_file_dir instead of log_file_name
src/seclab_taskflows/mcp_servers/ghsa.py Updated to use log_file_name for logging configuration
src/seclab_taskflows/mcp_servers/gh_file_viewer.py Updated to use mcp_data_dir for SEARCH_RESULT_DIR and log_file_name for logging configuration
src/seclab_taskflows/mcp_servers/gh_code_scanning.py Updated to use mcp_data_dir for both CODEQL_DBS_BASE_PATH and ALERT_RESULTS_DIR, plus log_file_name for logging
src/seclab_taskflows/mcp_servers/gh_actions.py Updated to use mcp_data_dir for ACTIONS_DB_DIR and log_file_name for logging configuration
src/seclab_taskflows/mcp_servers/codeql_python/mcp_server.py Updated to use mcp_data_dir for MEMORY and CODEQL_DBS_BASE_PATH, plus log_file_name for logging; contains redundant commented-out import
Comments suppressed due to low confidence (1)

src/seclab_taskflows/mcp_servers/local_file_viewer.py:14

  • Import of 'log_file_name' is not used.
from seclab_taskflow_agent.path_utils import mcp_data_dir, log_file_name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 4, 2025 10:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot finished reviewing on behalf of kevinbackhouse December 4, 2025 10:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import aiofiles
import zipfile
import tempfile
from seclab_taskflow_agent.path_utils import mcp_data_dir, log_file_name
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import of 'log_file_name' is not used.

Copilot uses AI. Check for mistakes.
@kevinbackhouse kevinbackhouse merged commit 4001130 into GitHubSecurityLab:main Dec 4, 2025
6 checks passed
@kevinbackhouse kevinbackhouse deleted the use-path-utils branch December 4, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants