Skip to content

Harden external plugin gate comment output safety#2265

Merged
aaronpowell merged 2 commits into
mainfrom
aaronpowell-fix-external-plugin-comment-safety
Jul 10, 2026
Merged

Harden external plugin gate comment output safety#2265
aaronpowell merged 2 commits into
mainfrom
aaronpowell-fix-external-plugin-comment-safety

Conversation

@aaronpowell

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

This follow-up hardens external plugin PR quality comment rendering to avoid malformed comments and oversized payload failures when plugin names or gate output contain unsafe characters or very large content.

The workflow now escapes HTML for summary and output content, renders gate details with <pre><code> blocks instead of fenced backticks, and truncates gate output to a bounded length with an explicit truncation marker.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes

Scope is intentionally narrow: only .github/workflows/external-plugin-pr-quality-gates.yml was updated.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 05:01
@github-actions github-actions Bot added the workflow PR touches workflow automation label Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 hardens the external plugin PR quality-gates workflow’s generated issue comment content to reduce the risk of malformed rendering and failures caused by unsafe characters and large gate outputs.

Changes:

  • Added HTML escaping for gate detail summaries and gate output content.
  • Switched gate output rendering from fenced Markdown code blocks to <pre><code> HTML blocks inside <details>.
  • Introduced per-gate output truncation with a truncation marker.
Show a summary per file
File Description
.github/workflows/external-plugin-pr-quality-gates.yml Escapes and re-renders gate detail output, and introduces truncation to keep gate output bounded.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +211 to +219
const truncateGateOutput = (rawOutput) => {
const normalized = String(rawOutput || '').trim();
if (!normalized) {
return '_No output captured._';
}
if (normalized.length <= MAX_GATE_OUTPUT_CHARS) {
return normalized;
}
return `${normalized.slice(0, MAX_GATE_OUTPUT_CHARS)}\n...output truncated...`;
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 05:58
@aaronpowell aaronpowell removed the request for review from Copilot July 10, 2026 05:58
@aaronpowell aaronpowell merged commit 30472ec into main Jul 10, 2026
17 checks passed
@aaronpowell aaronpowell deleted the aaronpowell-fix-external-plugin-comment-safety branch July 10, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workflow PR touches workflow automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants