-
Notifications
You must be signed in to change notification settings - Fork 46
Restrict dispatch_workflow to only search .github/workflows directory #12878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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>
🔍 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
|
|
@copilot Only allow from .github/workflows/ |
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
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.