code-security

Get default code security configurations for an enterprise

Changed on

Lists the default code security configurations for an enterprise.

The authenticated user must be an administrator of the enterprise in order to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.

get/enterprises/{enterprise}/code-security/configurations/defaults

Request

  • Base URL: https://api.github.com
  • URL: https://api.github.com/enterprises/{enterprise}/code-security/configurations/defaults
  • Auth: none declared

Path parameters

enterprisestring required

The slug version of the enterprise name.

Response

Response

default_for_new_repos'public' | 'private_and_internal' | 'all'

The visibility of newly created repositories for which the code security configuration will be applied to by default

Changes

  • 2026-03-106ea91bcbb8e2Revision changes
    • warning

      added the new enterprise_enforced enum value to the // response property for the response status