v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
enterprise-admin

Get code security and analysis features for an enterprise

[!WARNING] Closing down notice: The ability to fetch code security and analysis settings for an enterprise is closing down. Please use code security configurations instead. For more information, see the changelog.

Gets code security and analysis settings for the specified 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_and_analysis

Path parameters

enterprisestring required

The slug version of the enterprise name.

Response

Response

advanced_security_enabled_for_new_repositoriesboolean required

Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to this enterprise.

advanced_security_enabled_for_new_user_namespace_repositoriesboolean

Whether GitHub Advanced Security is automatically enabled for new user namespace repositories.

dependabot_alerts_enabled_for_new_repositoriesboolean required

Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this enterprise.

secret_scanning_enabled_for_new_repositoriesboolean required

Whether secret scanning is automatically enabled for new repositories and repositories transferred to this enterprise.

secret_scanning_push_protection_enabled_for_new_repositoriesboolean required

Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this enterprise.

secret_scanning_push_protection_custom_linkstring nullable

An optional URL string to display to contributors who are blocked from pushing a secret.

secret_scanning_non_provider_patterns_enabled_for_new_repositoriesboolean

Whether secret scanning of non-provider patterns is enabled for new repositories under this enterprise.

secret_scanning_validity_checks_enabledboolean

Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this enterprise.

Example response

{
  "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md"
}