Get code security configurations for an enterprise
Lists all code security configurations available 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 read:enterprise scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The slug version of the enterprise name.
Query Parameters
Section titled “ Query Parameters ”The number of results per page (max 100). For more information, see “Using pagination in the REST API.”
A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see “Using pagination in the REST API.”
A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see “Using pagination in the REST API.”
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": 17, "target_type": "global", "name": "GitHub recommended", "description": "Suggested settings for Dependabot, secret scanning, and code scanning.", "advanced_security": "enabled", "dependency_graph": "enabled", "dependency_graph_autosubmit_action": "not_set", "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 }, "secret_scanning": "enabled", "secret_scanning_push_protection": "enabled", "secret_scanning_validity_checks": "enabled", "secret_scanning_non_provider_patterns": "enabled", "private_vulnerability_reporting": "enabled", "enforcement": "enforced", "url": "https://api.github.com/enterprises/octo-enterprise/code-security/configurations/17", "html_url": "https://github.com/organizations/octo-enterprise/settings/security_analysis/configurations/17/view", "created_at": "2023-12-04T15:58:07Z", "updated_at": "2023-12-04T15:58:07Z" }, { "id": 1326, "target_type": "enterprise", "name": "High risk settings", "description": "This is a code security configuration for octo-enterprise high risk repositories", "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": "enabled", "code_scanning_default_setup": "enabled", "code_scanning_default_setup_options": { "runner_type": "not_set", "runner_label": null }, "secret_scanning": "enabled", "secret_scanning_push_protection": "enabled", "secret_scanning_validity_checks": "disabled", "secret_scanning_non_provider_patterns": "disabled", "private_vulnerability_reporting": "enabled", "enforcement": "enforced", "url": "https://api.github.com/enterprises/octo-enterprise/code-security/configurations/1326", "html_url": "https://github.com/enterprises/octo-enterprise/settings/security_analysis/configurations/1326/edit", "created_at": "2024-05-10T00:00:00Z", "updated_at": "2024-05-10T00:00:00Z" }]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"}