Skip to content

fix: remove ! from Issue Monster comment template to prevent bash history expansion#29128

Merged
pelikhan merged 1 commit intomainfrom
copilot/investigate-agentic-workflow-detection-failure
Apr 29, 2026
Merged

fix: remove ! from Issue Monster comment template to prevent bash history expansion#29128
pelikhan merged 1 commit intomainfrom
copilot/investigate-agentic-workflow-detection-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

The ! in "🍪 **Issue Monster selected this for Copilot!**" triggered bash history expansion (!* → previous command's arguments) inside Copilot CLI's bash session, leaking internal init markers (___BEGIN___COMMAND_OUTPUT_MARKER___, PS1=, unset HISTFILE, etc.) into the add_comment body.

Change

  • .github/workflows/issue-monster.md: Copilot!**Copilot** in the comment template

…nt bash history expansion

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/55a4df31-63b1-4b54-ad7e-728dd91799b4

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review April 29, 2026 14:03
Copilot AI review requested due to automatic review settings April 29, 2026 14:03
@pelikhan pelikhan merged commit 234bb0f into main Apr 29, 2026
@pelikhan pelikhan deleted the copilot/investigate-agentic-workflow-detection-failure branch April 29, 2026 14:03
Copy link
Copy Markdown
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

Updates the Issue Monster comment template to avoid !-triggered bash history expansion leaking shell markers into add_comment bodies.

Changes:

  • Removes the ! after Copilot in the safeoutputs/add_comment template body.
Show a summary per file
File Description
.github/workflows/issue-monster.md Adjusts the Issue Monster add_comment body template to mitigate bash history expansion issues.

Copilot's findings

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 1


```
safeoutputs/add_comment(item_number=<issue_number>, body="🍪 **Issue Monster selected this for Copilot!**\n\nI've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.\n\nIf assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.\n\nOm nom nom! 🍪")
safeoutputs/add_comment(item_number=<issue_number>, body="🍪 **Issue Monster selected this for Copilot**\n\nI've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.\n\nIf assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.\n\nOm nom nom! 🍪")
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

The comment template still contains an exclamation mark in the body string ("Om nom nom! 🍪"). In an interactive bash session with history expansion enabled, any ! inside double quotes can be expanded or cause an event not found error, which can still leak or break the generated add_comment call. To fully address the reported issue, remove or escape this remaining ! (and keep the template free of ! characters, or ensure history expansion is disabled where this snippet is executed).

Suggested change
safeoutputs/add_comment(item_number=<issue_number>, body="🍪 **Issue Monster selected this for Copilot**\n\nI've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.\n\nIf assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.\n\nOm nom nom! 🍪")
safeoutputs/add_comment(item_number=<issue_number>, body="🍪 **Issue Monster selected this for Copilot**\n\nI've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.\n\nIf assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.\n\nOm nom nom 🍪")

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot mentioned this pull request Apr 29, 2026
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.

3 participants