Open ramblingenzyme opened 9 months ago
I'm not sure I follow your solution to privilege escalation in PRs. What is to stop me from making any number of other changes to the yaml in a PR that results in acl changes being applied before merging to main? I think the solution is to just not allow anyone untrusted to make PRs in the repository in the first place.
Edit: I was not framiliar with "environments". I see there is a way to limit their use to specific branches, which would indeed prevent malicious changes to the yaml from being applied.
@rowanmoul yes you can limit access to an environment based on a branch:
Typically over in the repo settings under Environments
> select your environment and you will be able to limit the environment to a branch or branches/tags/etc.
https://github.com/{user_or_org}/{repo}/settings/environments/{environment_id}/edit
Now that OAuth clients are supported, I think the recommended configuration in the README.md should show an OAuth configuration rather than an API key based one.
I also think it should suggest that you should configure an OAuth client with
acl:read
scope when running tests, and a second one withacl
for applying updates. This prevents an escalation path where the ACLs can be updated from an arbitrary branch by updating the workflow, i.e.For reference, this is the workflow we're using, and how we have the secrets configured.