Skip to main content

code_security_default_configurations

Creates, updates, deletes, gets or lists a code_security_default_configurations resource.

Overview

Namecode_security_default_configurations
TypeResource
Idgithub.code_security.code_security_default_configurations

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
configurationobjectA code security configuration
default_for_new_reposThe visibility of newly created repositories for which the code security configuration will be applied to by default (public, private_and_internal, all)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_default_configurations_for_enterpriseselectenterpriseLists the default code security configurations for 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.
get_default_configurationsselectorgLists the default code security configurations for 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 read:org scope to use this endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
enterprisestringThe slug version of the enterprise name.
orgstringThe organization name. The name is not case sensitive.

SELECT examples

Lists the default code security configurations for 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.

SELECT
configuration,
default_for_new_repos
FROM github.code_security.code_security_default_configurations
WHERE enterprise = '{{ enterprise }}' -- required
;