fix: escape regex metacharacters in workflow file pattern matching#5
Merged
troinine merged 4 commits intochore/pr-approvalfrom Dec 9, 2025
Merged
fix: escape regex metacharacters in workflow file pattern matching#5troinine merged 4 commits intochore/pr-approvalfrom
troinine merged 4 commits intochore/pr-approvalfrom
Conversation
Co-authored-by: troinine <13124764+troinine@users.noreply.github.com>
Owner
|
@copilot please resolve conflicts first. |
Copilot
AI
changed the title
[WIP] Fix auto-approval process based on review feedback
fix: escape regex metacharacters in workflow file pattern matching
Dec 9, 2025
troinine
approved these changes
Dec 9, 2025
Co-authored-by: troinine <13124764+troinine@users.noreply.github.com>
Author
Conflicts resolved in commit 8fa0807. The merge successfully combines the array syntax from the base branch with the security fix (escaped dot and |
Signed-off-by: Tero Roininen <troinine@users.noreply.github.com>
troinine
approved these changes
Dec 9, 2025
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.
The sensitive file check in the auto-approval workflow had a regex pattern bug where the unescaped dot in
.github/workflows/acted as a wildcard, allowing false matches like_github/workflows/oragithub/workflows/to pass through.Changes:
.github/workflows/→\.github/workflows/-Eflag togrepfor extended regex interpretationSENSITIVE_PATTERNS(merged from base branch)This ensures only paths starting with
.github/workflows/trigger the sensitive file block, preventing potential security bypass vectors.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.