provider code-security PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}
@utdk/github /enterprises/{enterprise}/code-security/configurations/{configuration_id}
Update a custom code security configuration for an enterprise
Updates a code security configuration in 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 `admin:enterprise` scope to use this endpoint.
enterprise path required
The slug version of the enterprise name.
string
configuration_id path required
The unique identifier of the code security configuration.
integer

Try it

Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

codeSecurity.updateEnterpriseConfiguration
PATCH/enterprises/{enterprise}/code-security/configurations/{configuration_id}
Updates a code security configuration in 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 `admin:enterprise` scope to use this endpoint.

Parameters

required

The slug version of the enterprise name.

required

The unique identifier of the code security configuration.

Input

The name of the code security configuration. Must be unique across the enterprise.

A description of the code security configuration

The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. > [!WARNING] > `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features.

The enablement status of GitHub Code Security features.

The enablement status of Dependency Graph

The enablement status of Automatic dependency submission

Feature options for Automatic dependency submission

The enablement status of Dependabot alerts

The enablement status of Dependabot security updates

The enablement status of code scanning default setup

Feature options for code scanning default setup

Security Configuration feature options for code scanning

The enablement status of code scanning delegated alert dismissal

The enablement status of GitHub Secret Protection features.

The enablement status of secret scanning

The enablement status of secret scanning push protection

The enablement status of secret scanning validity checks

The enablement status of secret scanning non-provider patterns

The enablement status of Copilot secret scanning

The enablement status of secret scanning delegated alert dismissal

The enablement status of secret scanning extended metadata

The enablement status of private vulnerability reporting

The enforcement status for a security configuration

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.codeSecurity.updateEnterpriseConfiguration({
  "code_scanning_delegated_alert_dismissal": "disabled",
  "secret_scanning_generic_secrets": "disabled",
  "secret_scanning_delegated_alert_dismissal": "disabled",
  "secret_scanning_extended_metadata": "disabled"
})