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.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The slug version of the enterprise name.
The unique identifier of the code security configuration.
Request Body required
Section titled “ Request Body required ”object
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_securityandsecret_protectionare deprecated values for this field. Prefer the individualcode_securityandsecret_protectionfields 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
object
Whether to use runners labeled with ‘dependency-submission’ or standard GitHub runners.
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
object
Whether to use labeled runners or standard GitHub runners.
The label of the runner to use for code scanning default setup when runner_type is ‘labeled’.
Security Configuration feature options for code scanning
object
Whether to allow repos which use advanced setup
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
Examples
Example for updating a code security configuration
{ "name": "octo-enterprise recommended settings v2", "secret_scanning": "disabled", "code_scanning_default_setup": "enabled"}Responses
Section titled “ Responses ”Response
A code security configuration
object
The ID of the code security configuration
The name of the code security configuration. Must be unique within the organization.
The type of the code security configuration.
A description of the code security configuration
The enablement status of GitHub Advanced Security
The enablement status of Dependency Graph
The enablement status of Automatic dependency submission
Feature options for Automatic dependency submission
object
Whether to use runners labeled with ‘dependency-submission’ or standard GitHub runners.
The enablement status of Dependabot alerts
The enablement status of Dependabot security updates
The enablement status of Dependabot delegated alert dismissal
Feature options for code scanning
object
Whether to allow repos which use advanced setup
The enablement status of code scanning default setup
Feature options for code scanning default setup
object
Whether to use labeled runners or standard GitHub runners.
The label of the runner to use for code scanning when runner_type is ‘labeled’.
The enablement status of code scanning delegated alert dismissal
The enablement status of secret scanning
The enablement status of secret scanning push protection
The enablement status of secret scanning delegated bypass
Feature options for secret scanning delegated bypass
object
The bypass reviewers for secret scanning delegated bypass
object
The ID of the team or role selected as a bypass reviewer
The type of the bypass reviewer
The bypass mode for the reviewer
The ID of the security configuration associated with this bypass reviewer
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
The URL of the configuration
The URL of the configuration
Examples
{ "id": 1325, "target_type": "enterprise", "name": "High risk settings", "description": "This is a code security configuration for octo-enterprise", "advanced_security": "enabled", "dependency_graph": "enabled", "dependency_graph_autosubmit_action": "enabled", "dependency_graph_autosubmit_action_options": { "labeled_runners": false }, "dependabot_alerts": "enabled", "dependabot_security_updates": "not_set", "code_scanning_default_setup": "disabled", "code_scanning_delegated_alert_dismissal": "disabled", "secret_scanning": "enabled", "secret_scanning_push_protection": "disabled", "secret_scanning_delegated_bypass": "disabled", "secret_scanning_validity_checks": "disabled", "secret_scanning_non_provider_patterns": "disabled", "secret_scanning_generic_secrets": "disabled", "secret_scanning_delegated_alert_dismissal": "disabled", "private_vulnerability_reporting": "disabled", "enforcement": "enforced", "url": "https://api.github.com/enterprises/octo-enterprise/code-security/configurations/1325", "html_url": "https://github.com/enterprises/octo-enterprise/settings/security_analysis/configurations/1325/edit", "created_at": "2024-05-01T00:00:00Z", "updated_at": "2024-05-01T00:00:00Z"}Not modified
Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Conflict
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}