From c2f1f7b35779266fae48600f7e56e13bbc936fab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Aug 2026 22:11:56 +0000 Subject: [PATCH 1/2] Initial plan From 77222f802d710e71f6ee0c25fbc34836d098448a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Aug 2026 22:12:26 +0000 Subject: [PATCH 2/2] Document GHES pre-receive hook networking restrictions Co-authored-by: jamesooo <8672454+jamesooo@users.noreply.github.com> --- pre-receive-hooks/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pre-receive-hooks/README.md b/pre-receive-hooks/README.md index f09dd2c31..da6a8c4de 100644 --- a/pre-receive-hooks/README.md +++ b/pre-receive-hooks/README.md @@ -40,6 +40,8 @@ Running scripts will be automatically terminated after 5 seconds (blocking the p When designing your scripts, also consider scenarios where many developers push at once (e.g. before lunch time). Parallel pushes will result in parallel runs of hook scripts. All parallel script runs have to compete for the same resources: CPU, memory, files, network, external systems. If any of the parallel runs needed more than 5 seconds to complete or triggered a programming error ([race condition](https://en.wikipedia.org/wiki/Race_condition#Software)), this may result in an unhappy developer whose push just got rejected for the wrong reasons. +Network access from pre-receive hooks is also restricted on newer appliances. In GitHub Enterprise Server 3.18 and later, network calls made from pre-receive hooks are logged and can be blocked through the appliance configuration setting `core.pre-receive-hook-networking-enabled`. Beginning with GitHub Enterprise Server 3.22, network calls from pre-receive hooks are disabled by default and must be explicitly enabled through that same setting. Scripts that depend on external systems should therefore be reviewed with your site administrator before upgrading. + **Any acceptable approach that can enforce your policy in an asynchronous fashion (see following paragraphs), will have less risk on the performance of your appliance and the effectiveness of your developer workflow.** ### Alternatives to pre-receive-hooks