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.
IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.
2 parameters · 26 body fields
orgstringrequired
The organization name. The name is not case sensitive.
configuration_idintegerrequired
The unique identifier of the code security configuration.
namestringoptional
The name of the code security configuration. Must be unique within the organization.
descriptionstringoptional
A description of the code security configuration
advanced_securitystringoptional
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 secret scanning delegated alert dismissal
Allowed:enableddisablednot_set
secret_scanning_extended_metadatastringoptional
The enablement status of secret scanning extended metadata
Allowed:enableddisablednot_set
private_vulnerability_reportingstringoptional
The enablement status of private vulnerability reporting
Allowed:enableddisablednot_set
enforcementstringoptional
The enforcement status for a security configuration
Allowed:enforcedunenforcedenterprise_enforced
urlstringoptional
The URL of the configuration
html_urlstringoptional
The URL of the configuration
created_atstringoptional
updated_atstringoptional
204Response when no new updates are made
400Bad Request because of a global configuration, incompatible parameters, or an attempt to update attributes of an enterprise-owned configuration.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
409Conflict because security configuration work is already in progress.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed because of invalid enforcement values, unavailable security products, an attempt to change enterprise-enforced enforcement, or an invalid configuration.
messagestringrequired
documentation_urlstringrequired
errorsarray<string>optional
Error handling
A 400 is returned: Bad Request because of a global configuration, incompatible parameters, or an attempt to update attributes of an enterprise-owned configuration. A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 409 is returned: Conflict because security configuration work is already in progress. A 422 is returned: Validation failed because of invalid enforcement values, unavailable security products, an attempt to change enterprise-enforced enforcement, or an invalid configuration.