Walkthrough to setup SEDATED® on a GitHub Enterprise instance (Take these steps only after completing steps 1 - 4 of the setup instructions in the README)
Click the rocket ship
Click the rocket ship again
Click "Admin Center" from the menu on the left of the screen
Click "Hooks" from the menu on the left of the screen
Click "Add pre-receive hook"
- Under "Hook name" type "SEDATED"
- Click "Select hook repository" from the dropdown
- Enter the organization/repository your SEDATED® repository resides
- Click "Select file" from the dropdown
- Select
pre-receive.sh
- Select
- Check the appropriate box for the desired enforcement level
- "Use the exit-status to accept or reject pushes" - This option MUST BE checked for SEDATED® to function as designed.
- "Enable this pre-receive hook on all repositories by default" - Force enables SEDATED® on every repository in your enterprise. If you select this option you may want to consider setting the use_enforced_repo_check_custom option to "True" in SEDATED®. This will allow you to control which repositories have SEDATED® enforced (scanning new/modified code that is pushed) and which repositories will merely see a message from SEDATED® (no code scanning will be done). A phased rollout of SEDATED® can be accomplished this way, by gradually enforcing more and more repositories.
- "Administrators can enable and disable this hook" - Allows administrators, organization owners, and repository owners to enable and disable SEDATED® as they desire. This would potentially be a good option for the proof of concept phase of SEDATED® and trying to get development teams to early adopt. However, since teams can essentially turn SEDATED® on and off on a whim the effectiveness of SEDATED® will be limited.
- Click "Add pre-receive hook"
Verify under pre-receive hooks that "SEDATED" is now listed with the desired configurations
- If the box for "Administrators can enable and disable this hook" was checked then this dot will be grayed out (as shown below). If the box for "Enable this pre-receive hook on all repositories by default" was checked then this dot will be green.
- If the box for "Administrators can enable and disable this hook" was checked then "Enforced: " will show "Disabled" (as shown below). If the box for "Enable this pre-receive hook on all repositories by default" was checked then "Enforced: " will show "Enabled".
To verify that SEDATED® is now enabled simply create a commit and push to GitHub, you will now see a SEDATED® message returned in the server response. If you chose to check the "Administrators can enable and disable this hook" upon creation of the SEDATED® pre-receive hook (Step 6 above) then the SEDATED® pre-receive hook will need to be manually enabled on a repository to test.