Harden external plugin PR quality gate rendering and name validation - #2444
Merged
aaronpowell merged 3 commits intoJul 27, 2026
Merged
Conversation
Reference: #2398 Co-authored-by: Copilot App <[email protected]> Copilot-Session: a79923be-c65f-4d51-8fe3-a86e05fd02f1
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens external plugin validation and PR quality-gate output against malformed entries and Markdown injection.
Changes:
- Enforces Open Plugins naming constraints.
- Skips downstream checks for invalid entries.
- Escapes rendered PR quality-gate output.
Show a summary per file
| File | Description |
|---|---|
eng/external-plugin-validation.mjs |
Adds plugin-name validation rules. |
eng/external-plugin-pr-quality-gates.mjs |
Fails invalid entries before downstream gates. |
.github/workflows/external-plugin-pr-quality-gates.yml |
Sanitizes status-comment content and links. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Medium
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Contributor
There was a problem hiding this comment.
Review details
Comments suppressed due to low confidence (1)
.github/workflows/external-plugin-pr-quality-gates.yml:274
- Sanitizing the name only for the table does not close the injection path. The same invalid
entry.nameis later passed toformatGateOutput, whereescapeHtmlleaves newlines and Markdown delimiters intact. A name such asbad\n\n[link](https://example.com)fails validation but still produces gate details; the blank line ends the raw HTML block and GitHub can parse the following link as Markdown. Encode all non-text characters (or at least normalize line breaks and Markdown syntax) before placing the name inside<summary>.
const name = escapeMarkdownTableCell(entry?.name || 'unknown');
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Medium
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.
Summary
.github/workflows/external-plugin-pr-quality-gates.ymlnameconstraints ineng/external-plugin-validation.mjs(length, allowed chars, boundary chars, no--/..)eng/external-plugin-pr-quality-gates.mjswhen canonical validation fails, skipping downstream gates for invalid entriesWhy
This addresses security findings surfaced in #2398, including markdown/table injection vectors in PR status comments.
Validation
npm run plugin:validatenode --test eng/external-plugin-quality-gates.test.mjsnpm run build