Skip to content

ci: run pull requests from outside the org as untrusted - #3752

Merged
marco-c merged 1 commit into
mozilla:masterfrom
JohanLorenzo:untrusted-prs
Oct 30, 2026
Merged

marco-c merged 1 commit into
mozilla:masterfrom
JohanLorenzo:untrusted-prs

Conversation

@JohanLorenzo

@JohanLorenzo JohanLorenzo commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Under pullRequests: public, outside contributors' pull requests run with the pull-request role, which writes PR caches and inserts PR index entries. public_restricted runs them as pull-request-untrusted instead. Community-tc #1038 grants that role route-only PR scopes and lowest task creation, with no cache writes or privileged capability.

Changes:

  • pullRequests: public_restricted.
  • Six tasks_for == "github-pull-request" checks now use tasks_for[:19], so untrusted events read the fork's head.
  • The two privileged docker builds skip untrusted events, since the untrusted role lacks their scope.

Merge order:

  1. Add proj-relman pools and scopes for code-review taskgraph CI taskcluster/community-tc-config#1038
  2. ci: run pull requests from outside the org as untrusted #3752 ← this PR
  3. Bug 2026200 - Migrate code-review CI from all tasks defined in .taskcluster.yml to taskgraph #3264

@JohanLorenzo

Copy link
Copy Markdown
Contributor Author

r? @marco-c. This unblocks taskgraph for bugbug.

@marco-c
marco-c merged commit e82606e into mozilla:master Oct 30, 2026
9 checks passed
@JohanLorenzo
JohanLorenzo deleted the untrusted-prs branch October 30, 2026 14:10
Comment thread .taskcluster.yml
description: Build docker image of code review backend
owner: bastien@mozilla.com
source: https://github.com/mozilla/code-review
- $if: 'tasks_for != "github-pull-request-untrusted"'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

An inclusive instead of an exclusive condition would be better long term to prevent accidental scheduling.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree in the long run. In the short term, .taskcluster.yml will be rewritten in #3264. So this if-statement won't exist anymore.

bhearsum added a commit to mozilla-releng/fxci-config that referenced this pull request Oct 30, 2026
@bhearsum

Copy link
Copy Markdown
Collaborator

This looks like it broke dependabot, eg: #3734 (comment)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants