-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Feature: add argument --ghe-hostname for GHE Servers #362
Comments
Hi @runjivu, thanks for the feature request! Overall, this sounds like a good idea to me -- supporting both hosted and on-prem GHE is something we should do. A couple of thoughts:
It depends 🙂: self-hosted runners come in a large variety of configurations, some of which are less secure than GitHub-hosted runners. In general, GitHub recommends only using self-hosted runners on private repos, regardless of whether the repo is on a GH or GHE host. In general however, my understanding is that the "best practice" for self-hosted runners is to never use persistent runners (only use ephemeral runners), and to manage your runners at whatever organizational level makes sense for your use case (e.g. repo/org/enterprise level) and not allow deviations from that level. Some more docs here: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#self-hosted-runner-security |
Hi @woodruffw , thank you for the quick response! my initial thoughts on your points :
when logging in with github.com:
git_protocol: https
users:
runjivu:
user: runjivu
github.example.com:
git_protocol: https
users:
haneul:
user: haneul so as long as zizmor intends to get token directly with --gh-token , i think just passing --ghe-hostname may be sufficient enough ( fyi the flag for gh auth login is --hostname )
As far as I know, forks between github instances are prohibited, as github not does not provide a direct way to fork between separate instances . (I might be wrong, but i couldn't find related docs 😢) According to reference doc, actions for GHE server first looks for repos in GHE instance, and then for actions in github.com. Since my organization does not enable github connect, But for broader coverage impostor_commit.rs should also check for public actions for github.com also! Lastly thank you for the advice, I'll start from there! and thanks for building this project! |
Thanks, makes sense! To bikeshed a bit: how do you feel about making it
TIL, thanks for finding that! |
Yes that makes sense, will do! |
Yes, thanks! |
Pre-submission checks
What's the problem this feature will solve?
I'm trying zizmor out with GHE Server repos, but for now github_api client's api_base is fixed to "https://api.github.com".
Describe the solution you'd like
by adding additional parameter --ghe-hostname, i can run something like
zizmor --gh-token {token} --ghe-hostname {github.example.com} example/repos
,which would be nice
Additional context
I am new to GitHub Actions security hardening.
In a GHE Server / self-hosted runner environments, it seems/feels inherently safer against many attacks..
Are they really?
I’d love to hear some advice on what specific things I should focus on to keep things secure in these environments! 😃
The text was updated successfully, but these errors were encountered: