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:
- Pull request from external contributor
- Pull request from collaborator (has at least triage permission)
- Push to unprotected branch (has at least write permission)
- 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.
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,actionandcronL2 is unused. There are some problems with this setup.
First, there are actually four levels of trust in our Github projects:
These don't get differentiated with the level system, which means we need to be careful in our
ci-configgrants as we can't rely on the level to provide security guarantees. For example, we must only grant secrets to thepull-request:trustedjob and notpull-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:
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.