Skip to content

Github Trust Levels #46

@ahal

Description

@ahal

In Github we only use two trust levels:

L1 for github-pull-request (and also everything else if the overall project is level 1)
L3 for github-push, action and cron

L2 is unused. There are some problems with this setup.

First, there are actually four levels of trust in our Github projects:

  1. Pull request from external contributor
  2. Pull request from collaborator (has at least triage permission)
  3. Push to unprotected branch (has at least write permission)
  4. Push to protected branch (has passed all branch protection rules or is admin)

These don't get differentiated with the level system, which means we need to be careful in our ci-config grants as we can't rely on the level to provide security guarantees. For example, we must only grant secrets to the pull-request:trusted job and not pull-request:untrusted. Messing this up could leak a secret.

A more pressing factor is the Gecko migration to Github and what to do about project twigs. We could simply create a separate fork for each twig and assign the overall project as level 2 (like we do now), but it would be more convenient if folks could simply create their own branches on the main repo and have them default to level 2. I.e, the project would have per-branch levels instead of a project wide level.

So my ideal end state here is the following:

  • L1 is used for pull requests from external contributors
  • L2 is used for both pull requests from collaborators and pushes to unprotected branches (this recognizes that both these cases come from a trusted source, but the changes are not necessarily reviewed / valid)
  • L3 is used for pushes to protected branches

When working through the implementation, I ran into some troubles, so I'm hoping we can hash out what the implementation might look like and decide whether an RFC for this is feasible or not.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions