Search + K

Command Palette

Search for a command to run...

Sign In

Enable or disable a security feature for an organization

Deprecated
POST /orgs/{org}/{security_product}/{enablement}
Copy endpoint
https://api.github.com

[!WARNING] Closing down notice: The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use code security configurations instead. For more information, see the changelog.

Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "Managing security managers in your organization."

The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the admin:org, write:org, or repo scopes to use this endpoint.

Parameters

path Path Parameters

Name Type
org required

The organization name. The name is not case sensitive.

string
security_product required

The security feature to enable or disable.

"dependency_graph" | "dependabot_alerts" | "dependabot_security_updates" | "advanced_security" | "code_scanning_default_setup" | "secret_scanning" | "secret_scanning_push_protection"
enablement required

The action to take.

enable_all means to enable the specified security feature for all repositories in the organization. disable_all means to disable the specified security feature for all repositories in the organization.

"enable_all" | "disable_all"

Request Body

application/json
{ query_suite?: "default" | "extended"; }

Responses

204

Action started

unknown

Client Errors

422

The action could not be taken due to an in progress enablement, or a policy is preventing enablement

unknown