Repository navigation
fix(ng-dev/commit-message): harden git log commit parsing against delimiter and metadata smuggling - #4029
Open
josephperrott wants to merge 2 commits into
Open
fix(ng-dev/commit-message): harden git log commit parsing against delimiter and metadata smuggling#4029josephperrott wants to merge 2 commits into
josephperrott wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves the robustness and security of commit message parsing and release notes generation. It introduces regex-based extraction of git log metadata to prevent body metadata smuggling, replaces the commit split delimiter with a null byte to avoid accidental splitting, and sanitizes commit hashes to prevent Markdown injection. Feedback on the changes highlights a bug in parseInternal where an empty commit message with metadata would incorrectly fall back to parsing the raw metadata; passing messageText directly to the parser is suggested to resolve this.
josephperrott
force-pushed
the
fix/changelog-commit-parser
branch
from
October 9, 2026 20:30
31b5404 to
551994c
Compare
alan-agius4
approved these changes
Oct 12, 2026
…tput for release notes
…d sanitize changelog commit links
josephperrott
force-pushed
the
fix/changelog-commit-parser
branch
from
October 12, 2026 09:13
551994c to
194b9bd
Compare
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
ng-dev/release: Replace the printable delimiter (-------------ɵɵ------------) infetchCommitsForRevisionRangewith a NUL byte (%x00/\0) so commit bodies containing printable text cannot forge commit boundaries during release notes generation.ng-dev/commit-message&ng-dev/release: Extract the trailing-hash-,-shortHash-, and-author-fields fromgit logoutput before passing the commit body toconventional-commits-parser(withfieldPatterndisabled), preventing commit body content or git scissor lines (# ------------------------ >8 ------------------------) from spoofing or truncating commit metadata. Additionally sanitizehashandshortHashinRenderContext.commitToLinkandRenderContext.commitToBadgeto strip Markdown link control characters.