Skip to content

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

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

crisbeto merged 1 commit into
angular:22.2.xfrom
josephperrott:fix/branch-manager-fork-guard-22.2.x

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 on the 22.2.x branch 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.
@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
@angular-robot angular-robot Bot added the area: build & ci Related the build and CI infrastructure of the project label Oct 23, 2026
@crisbeto
crisbeto merged commit e96bddd into angular:22.2.x Oct 23, 2026
29 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 area: build & ci Related the build and CI infrastructure of the project target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants