ossf / allstar

GitHub App to set and enforce security policies
Apache License 2.0
1.26k stars 122 forks source link

Add ghe config option #559

Closed SebastianBezold closed 1 month ago

SebastianBezold commented 3 months ago

Description

This PR introduces support for self hosted GitHub Enterprise instances with URLs different than github.com. With these changes, an environment variable ALLSTAR_GHE_URL can used to configure a custom GitHub URL. If set, all GitHub clients created are initialized using this URL.

Additional Info

For some reason, this setup only works if additionally to ALLSTAR_GHE_URL, you also define GH_HOST with the same host, just except the protocol (i.e: ALLSTAR_GHE_URL="https://my-ghe.example.com" and GH_HOST="my-ghe.example.com").

I have tested this PR on our own internal GitHub enterprise instance with KEY_SECRET="direct" and providing the PRIVATe_KEY as plain-text .pem

Closes #552

Sebastian Bezold sebastian.bezold@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, legal info/impressum

SebastianBezold commented 2 months ago

Hi @spencerschrock and @jeffmendoza,

sorry for the very late response. Have been on a longer private absence and was not able to work on this. Thank you for your input. I'm right back working on it!

SebastianBezold commented 1 month ago

Hi @jeffmendoza,

are the fixes to your comments ok? Is there anything else, that I should adapt?

jeffmendoza commented 1 month ago

Thanks for the reminder. Looks great. Thank you!!