Skip to content

fix(ng-dev/pr): reject node_modules paths and pin fetched head SHAs - #4126

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
josephperrott:fix/ng-dev-pr-commit-and-tree-guards
Nov 24, 2026
Merged

alan-agius4 merged 1 commit into
angular:mainfrom
josephperrott:fix/ng-dev-pr-commit-and-tree-guards

Conversation

@josephperrott

@josephperrott josephperrott commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Validate pull request commit ranges across merge, checkout, rebase, and conflict-discovery commands to reject paths inside node_modules/ before checking out or replaying commits, verify fetched head SHAs match queried pull request metadata, and handle shallow clones and orphan branches gracefully.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces security checks to prevent pull requests from introducing malicious files under node_modules/ and ensures fetched head SHAs match expected metadata across checkout, takeover, rebase, conflict discovery, and merge operations. The review feedback highlights critical improvements to prevent false positives and failures in shallow clones, specifically suggesting the use of --diff-filter=d to allow deletion of forbidden files and adding --deepen=500 to git fetches during conflict discovery.

@josephperrott
josephperrott force-pushed the fix/ng-dev-pr-commit-and-tree-guards branch 2 times, most recently from 6395d6a to ea628e3 Compare November 23, 2026 22:59
@josephperrott josephperrott changed the title fix(ng-dev/pr): validate commit ranges, fetched head SHAs, and rebased trees fix(ng-dev/pr): reject node_modules paths and pin fetched head SHAs Nov 23, 2026
@josephperrott josephperrott added the action: merge The PR is ready for merge by the caretaker label Nov 24, 2026
Validate pull request commit ranges across merge, checkout, rebase, and conflict
discovery commands to reject paths inside node_modules/ before checking out or
replaying commits, verify fetched head SHAs match queried pull request metadata,
and handle shallow clones and orphan branches gracefully.
@josephperrott
josephperrott force-pushed the fix/ng-dev-pr-commit-and-tree-guards branch from ea628e3 to 7f9f5a2 Compare November 24, 2026 15:19
@alan-agius4
alan-agius4 merged commit 7d2d4a8 into angular:main Nov 24, 2026
18 checks passed
@alan-agius4

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants