Skip to content

[WIP] Fix the failing GitHub Actions workflow build Analyze the workflow logs, identify the root cause of the failure, and implement a fix. Job ID: 63270126575 Job URL: https://github.com/github/gh-aw/actions/runs/21912473820/job/63270126575#14979

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-9919-1036865607-067a9a31-3e28-4e97-aba1-d0060682a6cc
Feb 11, 2026

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Fix workflow compilation failure (Job ID 63270126575)

Analysis

The CI build was failing because workflow-generator.md contained template injection vulnerabilities:

  • Line 22: target: "${{ github.event.issue.number }}" in safe-output configuration
  • Line 39: ${{ github.event.issue.number }} in the prompt body
  • The compiler correctly identified these as security risks and wrote the workflow as .invalid.yml
  • With --validate flag, compilation returned error code 1 (147/148 workflows succeeded)

Root Cause

User-controlled GitHub context data was being used directly in YAML expressions, creating potential template injection attack vectors.

Solution Applied

  • Analyzed workflow-generator.md to understand template injection issues
  • Fixed template injection in safe-output by removing explicit target (defaults to triggering issue)
  • Fixed template injection in prompt body by using generic language
  • Verified fix: All 148 workflows now compile successfully
  • Run make agent-finish to ensure all tests pass
  • Commit the final fix

Changes Made

  1. Line 22: Removed target: "${{ github.event.issue.number }}" from update-issue safe-output
    • The safe-output now automatically targets the triggering issue (secure default behavior)
  2. Line 39: Changed #${{ github.event.issue.number }} to (the triggering issue)
    • Removed unsafe GitHub expression from prompt body

Verification

✓ Successfully compiled 148 out of 148 workflow files

The workflow now compiles without security warnings.

Original prompt

Fix the failing GitHub Actions workflow build
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 63270126575
Job URL: https://github.com/github/gh-aw/actions/runs/21912473820/job/63270126575


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Remove unsafe GitHub expression from safe-output target field.
The update-issue safe-output now defaults to the triggering issue
instead of explicitly referencing github.event.issue.number, which
was flagged as a template injection vulnerability.

Also removed the GitHub expression from the prompt body to prevent
potential template injection attacks.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review February 11, 2026 16:32
Copilot AI review requested due to automatic review settings February 11, 2026 16:32
@pelikhan pelikhan merged commit 4964dee into main Feb 11, 2026
@pelikhan pelikhan deleted the copilot/fix-9919-1036865607-067a9a31-3e28-4e97-aba1-d0060682a6cc branch February 11, 2026 16:32
Copilot AI requested a review from pelikhan February 11, 2026 16:33
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 fixes a security vulnerability in the workflow generator by removing template injection risks caused by using user-controlled GitHub context data directly in YAML expressions.

Changes:

  • Removed unsafe GitHub expression ${{ github.event.issue.number }} from safe-output configuration
  • Replaced unsafe GitHub expression in prompt body with generic descriptive text
  • Updated compiled workflow lock file to reflect the security fixes

Reviewed changes

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

File Description
.github/workflows/workflow-generator.md Removed template injection vulnerabilities by eliminating unsafe GitHub context expressions from safe-output target and prompt body
.github/workflows/workflow-generator.lock.yml Updated compiled workflow to reflect security fixes and removed unsafe expressions from configuration and environment variables

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

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