Update a code security configuration
Updates a code security configuration in an organization.
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
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 within the organization.
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 Dependabot delegated alert dismissal. Requires Dependabot alerts to be enabled.
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 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 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-org recommended settings v2", "secret_scanning": "disabled", "code_scanning_default_setup": "enabled"}Responses
Section titled “ Responses ”Response when a configuration is updated
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": "organization", "name": "octo-org recommended settings v2", "description": "This is a code security configuration for octo-org", "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": "enabled", "code_scanning_default_setup_options": { "runner_type": "not_set", "runner_label": null }, "code_scanning_options": { "allow_advanced": false }, "code_scanning_delegated_alert_dismissal": "disabled", "secret_scanning": "disabled", "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/orgs/octo-org/code-security/configurations/1325", "html_url": "https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325", "created_at": "2024-05-01T00:00:00Z", "updated_at": "2024-05-01T00:00:00Z"}Response when no new updates are made