code_security_default_configurations
Creates, updates, deletes, gets or lists a code_security_default_configurations resource.
Overview
| Name | code_security_default_configurations |
| Type | Resource |
| Id | github.code_security.code_security_default_configurations |
Fields
The following fields are returned by SELECT queries:
- get_default_configurations_for_enterprise
- get_default_configurations
Response
| Name | Datatype | Description |
|---|---|---|
configuration | object | A code security configuration |
default_for_new_repos | | The visibility of newly created repositories for which the code security configuration will be applied to by default (public, private_and_internal, all) |
Response
| Name | Datatype | Description |
|---|---|---|
configuration | object | A code security configuration |
default_for_new_repos | | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_default_configurations_for_enterprise | select | enterprise | 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. | |
get_default_configurations | select | org | Lists 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.
| Name | Datatype | Description |
|---|---|---|
enterprise | string | The slug version of the enterprise name. |
org | string | The organization name. The name is not case sensitive. |
SELECT examples
- get_default_configurations_for_enterprise
- get_default_configurations
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
;
Lists 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.
SELECT
configuration,
default_for_new_repos
FROM github.code_security.code_security_default_configurations
WHERE org = '{{ org }}' -- required
;