Restrict dispatch_workflow to only search .github/workflows directory#12878
Merged
Restrict dispatch_workflow to only search .github/workflows directory#12878
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Analyze dispatch workflow integration with MCP
Fix dispatch_workflow to discover workflows in .github/workflows
Jan 31, 2026
Contributor
🔍 PR Triage ResultsCategory: bug | Risk: high | Priority: 55/100 Scores Breakdown
📋 Recommended Action: batch_reviewThis PR is part of Batch #1: Bug Fixes (batch-bug-001) along with PRs #12869 and #12664. These bug fixes should be reviewed together to ensure no conflicts in workflow configuration and dispatch mechanisms. Batch Review Strategy: Test all fixes together to validate workflow discovery, documentation links, and MCP configuration work harmoniously. Next Steps:
Triaged by PR Triage Agent on 2026-01-31 | Run #21540069309
|
Contributor
|
@copilot Only allow from .github/workflows/ |
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Fix dispatch_workflow to discover workflows in .github/workflows
Restrict dispatch_workflow to only search .github/workflows directory
Jan 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
dispatch_workflowneeded to be restricted to only search for workflows in the standard.github/workflows/directory for security and organizational reasons.Changes
Single directory search (
dispatch_workflow_validation.go):findWorkflowFile()helper to only search.github/workflows/directoryMCP tool generation (
safe_outputs_config_generation.go):.github/workflows/requirementWorkflowFilesmap with resolved file extensionsRuntime configuration (
compiler_safe_outputs_config.go):workflow_filesmapping.lock.ymlvs.yml)Test coverage (
dispatch_workflow_test.go):.github/workflows/directory searchResult
Workflows can only dispatch to workflows in
.github/workflows/:Workflows in the same directory are no longer discoverable:
Handler config correctly includes file mappings:
{ "dispatch_workflow": { "workflows": ["ci", "security-compliance"], "workflow_files": { "ci": ".lock.yml", "security-compliance": ".lock.yml" } } }Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.