
Explanation:
To enable code scanning on a GitHub Enterprise Server instance while allowing individual organizations to manage it at their own discretion, the following three commands must be run in sequence via SSH:
ghe-config app.minio.enabled true
ghe-config app.code-scanning.enabled true
ghe-config-apply
Step 1: Run ghe-config app.minio.enabled true
ghe-config app.minio.enabled true - Code scanning relies on an internal MinIO storage service to hold analysis data and CodeQL results. This command activates that prerequisite backend service.
Step 2: Run ghe-config app.code-scanning.enabled true
ghe-config app.code-scanning.enabled true - This enables the overall code scanning capability at the appliance level. By doing this without explicitly overriding or forcing an enterprise-wide enforcement policy, organizations and individual repositories retain the rights to enable or disable it as needed.
Step 3: Run ghe-config-apply
Apply the configurations to the server appliance
ghe-config-apply - This final command must be run to actively apply, initialize, and reload the server configuration with the new settings.
Reference:
https://docs.github.com/en/
[email protected]/code-security/how-tos/secure-at-scale/configure-enterprise-security/establish-complete-coverage/enabling-github-advanced- security-for-your-enterprise