Skip to main content

repo_code_security_configuration

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

Overview

Namerepo_code_security_configuration
TypeResource
Idgithub.code_security.repo_code_security_configuration

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
configurationobjectA code security configuration
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_configuration_for_repositoryselectowner, repoGet the code security configuration that manages a repository's code security settings.

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 repo 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
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

Get the code security configuration that manages a repository's code security settings.

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 repo scope to use this endpoint.

SELECT
configuration,
status
FROM github.code_security.repo_code_security_configuration
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;