-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GitHub's Safe-Settings app to manage policy as code #24
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,19 @@ | |||
# https://github.com/github/safe-settings/blob/main-enterprise/docs/sample-settings/suborg.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The downside of the app is things are mutually exclusive. If we are to enable this, it would disable any current rulesets
. I've left it here for demonstration purposes.
Failing because the app isn't currently installed |
Given this is an organisation-wide change, I would want feedback and approval from each ARC team before merging, just in case it could break something they rely on. |
Fair enough @jonc125. As I said, it has very limited settings enabled. We could just have the |
To address scepticism, this PR needs to start with the TL;DR of why it is useful - what is the point and what are the (potential) risks? Then key stakeholders within ARC can take a view on it - we don't need buy-in from everyone. |
The app looks to have a pretty scary amount of privilege. Agree with @jonc125 this needs due care and attention before enabling (i.e. what are the possible privilege escalation routes/are we happy with accepting them) |
Hosted by us though, right? ...
And FWIW it's a GitHub-developed tool. Intended to increase uniformity and safety across all repo settings. To help org admin. I suppose it's expected that a thing configuring how repos are set up, would need admin access to the repos. Is it e.g. the autolinking to MyServices that's going to need +rw on all issues, PRs, projects, thoughts, ideas, and dreams? I guess the main concern is the org-level admin.
If I'm playing the evil genus: I need to inject some malicious code into |
I appreciate the concern regarding permissions, but as @samcunliffe pointed out we are self-hosting and if the app didn't have said permissions then it wouldn't be able to do anything.
The app allows us to set
Each permission makes sense when you think of what a given step is doing. |
I'm giving a talk on this at the Collaborations Hour on 11th Feb, but slides are ready now https://paddyroddy.github.io/talks/github-safe-settings-policy-as-code |
Is it easy to see what repository/org level settings would be changed with the proposed configuration? |
There's currently a bug with GHA github/safe-settings#739 which means that PRs don't run in dry-run when they should. Hopefully that should be fixed soon github/safe-settings#738. I currently have set log level as trace, but can be The PR comment setting should be showing what happens but isn't currently due to above. |
@t-young31 |
Not hugely – would prefer human-in-the-loop updates, if possible. I don't really have the time to risk assess so please consider my thoughts as non-blocking. Is it possible to scope the permissions to those required for what it's configured to do, rather than what it asks for? Looping in @brian-maher and @bathomas for their thoughts. |
Some thoughts based on a quick read-around I've had (I've not had a chance to look in detail - so happy to be corrected/challenged on these!).
Whilst that is immediately solvable, it highlights the risks of having an app with org admin permissions hanging around in an org like this. |
Currently, anyone with access to the LastPass has this ability too |
Yep, I didn't realise that (which makes me sad!). If the majority of the org already has an easy route to admin, then this should probably be considered more of a convenience thing. |
This is copying the work across in the @UCL-MIRSG organisation here UCL-MIRSG/.github#141 relating to the deployment of the https://github.com/github/safe-settings app. I recently gave a brief overview of this in the DevOps Hour slides. I have created an app with the appropriate permissions, which will need to be installed organisation wide once this PR is merged.
Safe-Settings has a lot of possible options, so I've gone for as little inoffensive ones as possible. These are currently:
ARCMYS-
autolink - this was @HChughtai's idea allowing one to easily refer to a MyServices URL by the number, i.e. ARCMYS-1617131.