code_security_configuration_repos
Creates, updates, deletes, gets or lists a code_security_configuration_repos resource.
Overview
| Name | code_security_configuration_repos |
| Type | Resource |
| Id | github.code_security.code_security_configuration_repos |
Fields
The following fields are returned by SELECT queries:
- get_repositories_for_enterprise_configuration
- get_repositories_for_configuration
Response
| Name | Datatype | Description |
|---|---|---|
repository | object | A GitHub repository. (title: Simple Repository) |
status | string | The attachment status of the code security configuration on the repository. (attached, attaching, detached, removed, enforced, failed, updating, removed_by_enterprise) |
Response
| Name | Datatype | Description |
|---|---|---|
repository | object | A GitHub repository. (title: Simple Repository) |
status | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_repositories_for_enterprise_configuration | select | enterprise, configuration_id | per_page, before, after, status | 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. |
get_repositories_for_configuration | select | org, configuration_id | per_page, before, after, status | Lists 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.
| Name | Datatype | Description |
|---|---|---|
configuration_id | integer | The unique identifier of the code security configuration. |
enterprise | string | The slug version of the enterprise name. |
org | string | The organization name. The name is not case sensitive. |
after | string | 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." |
before | string | 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." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
status | string | A 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
- get_repositories_for_enterprise_configuration
- get_repositories_for_configuration
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 }}'
;
Lists 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.
SELECT
repository,
status
FROM github.code_security.code_security_configuration_repos
WHERE org = '{{ org }}' -- required
AND configuration_id = '{{ configuration_id }}' -- required
AND per_page = '{{ per_page }}'
AND before = '{{ before }}'
AND after = '{{ after }}'
AND status = '{{ status }}'
;