Skip to main content

code_security_configuration_repos

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

Overview

Namecode_security_configuration_repos
TypeResource
Idgithub.code_security.code_security_configuration_repos

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
repositoryobjectA GitHub repository. (title: Simple Repository)
statusstringThe attachment status of the code security configuration on the repository. (attached, attaching, detached, removed, enforced, failed, updating, removed_by_enterprise)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_repositories_for_enterprise_configurationselectenterprise, configuration_idper_page, before, after, statusLists the repositories associated with an enterprise code security configuration in an organization.

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_repositories_for_configurationselectorg, configuration_idper_page, before, after, statusLists the repositories associated with 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 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
configuration_idintegerThe unique identifier of the code security configuration.
enterprisestringThe slug version of the enterprise name.
orgstringThe organization name. The name is not case sensitive.
afterstringA 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."
beforestringA 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."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
statusstringA comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned. Can be: all, attached, attaching, detached, removed, enforced, failed, updating, removed_by_enterprise

SELECT examples

Lists the repositories associated with an enterprise code security configuration in an organization.

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
repository,
status
FROM github.code_security.code_security_configuration_repos
WHERE enterprise = '{{ enterprise }}' -- required
AND configuration_id = '{{ configuration_id }}' -- required
AND per_page = '{{ per_page }}'
AND before = '{{ before }}'
AND after = '{{ after }}'
AND status = '{{ status }}'
;