---
title: "Get code security and analysis features for an enterprise"
method: GET
path: "/enterprises/{enterprise}/code_security_and_analysis"
tags: ["enterprise-admin"]
deprecated: true
---

# Get code security and analysis features for an enterprise

`GET /enterprises/{enterprise}/code_security_and_analysis`

> **Deprecated.**

> [!WARNING]
> **Closing down notice:** The ability to fetch code security and analysis settings for an enterprise is closing down. Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-09-27-upcoming-replacement-of-enterprise-code-security-enablement-ui-and-apis).

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.

## Path parameters

- `enterprise` string, required

## Response `200`

Response

- EnterpriseSecurityAnalysisSettings
  - `advanced_security_enabled_for_new_repositories` boolean, required — Whether GitHub advanced security is automatically enabled for new repositories and repositories transferred to this enterprise.
  - `advanced_security_enabled_for_new_user_namespace_repositories` boolean — Whether GitHub Advanced Security is automatically enabled for new user namespace repositories.
  - `dependabot_alerts_enabled_for_new_repositories` boolean, required — Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this enterprise.
  - `secret_scanning_enabled_for_new_repositories` boolean, required — Whether secret scanning is automatically enabled for new repositories and repositories transferred to this enterprise.
  - `secret_scanning_push_protection_enabled_for_new_repositories` boolean, required — Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this enterprise.
  - `secret_scanning_push_protection_custom_link` string, nullable — An optional URL string to display to contributors who are blocked from pushing a secret.
  - `secret_scanning_non_provider_patterns_enabled_for_new_repositories` boolean — Whether secret scanning of non-provider patterns is enabled for new repositories under this enterprise.
  - `secret_scanning_validity_checks_enabled` boolean — Whether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this enterprise.

## Other responses

- `404` — Resource not found

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
