Skip to content

build: guard branch-manager against forks and harden checkout - #34006

Merged
crisbeto merged 1 commit into
angular:mainfrom
josephperrott:fix/branch-manager-fork-guard
Oct 23, 2026
Merged

crisbeto merged 1 commit into
angular:mainfrom
josephperrott:fix/branch-manager-fork-guard

Conversation

@josephperrott

Copy link
Copy Markdown
Member

This change restores if: github.event.repository.fork == false on .github/workflows/assistant-to-the-branch-manager.yml per GHSS pull_request_target policy remediation (b/577107676).

Because 100% of pull requests in angular/components originate from forks (only_allow_releasable_branches: true) and branch-manager requires context.eventName === 'pull_request_target' along with secrets.ANGULAR_ROBOT_PRIVATE_KEY to set mergeability commit status, the previous head.repo.fork == false check caused all fork PR runs to be skipped. Restoring the base repository fork check ensures branch-manager triggers as intended on upstream PRs while preventing runs on external forks.

Additionally, persist-credentials: false is added to actions/checkout in .github/workflows/google-internal-tests.yml for defense-in-depth.

Restores if: github.event.repository.fork == false in .github/workflows/assistant-to-the-branch-manager.yml and adds persist-credentials: false to actions/checkout in .github/workflows/google-internal-tests.yml.
@pullapprove
pullapprove Bot requested a review from crisbeto October 23, 2026 19:17
@angular-robot angular-robot Bot added the area: build & ci Related the build and CI infrastructure of the project label Oct 23, 2026
@josephperrott josephperrott added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Oct 23, 2026
@crisbeto

Copy link
Copy Markdown
Member

@josephperrott looks like this doesn't merge cleanly everywhere.

@josephperrott josephperrott added target: minor This PR is targeted for the next minor release and removed area: build & ci Related the build and CI infrastructure of the project labels Oct 23, 2026
@josephperrott

Copy link
Copy Markdown
Member Author

@crisbeto Updated to only target main, will create the patch only change shortly.

@josephperrott josephperrott added target: minor This PR is targeted for the next minor release and removed target: minor This PR is targeted for the next minor release target: patch This PR is targeted for the next patch release labels Oct 23, 2026
@crisbeto
crisbeto merged commit 952685f into angular:main Oct 23, 2026
41 checks passed
@crisbeto

Copy link
Copy Markdown
Member

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 target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants