GitHub: Code security schemas
7 GitHub schemas with complete fields and constraints.
← Code security operations · All schemas
Create a code security configuration — request body — body code scanning default setup options
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | Feature options for code scanning default setup |
$ (anyOf 1).runner_label | JSON | Optional | |
$ (anyOf 1).runner_label (anyOf 1) | string | Alternative | The label of the runner to use for code scanning default setup when runner_type is 'labeled'. |
$ (anyOf 1).runner_label (anyOf 2) | null | Alternative | |
$ (anyOf 1).runner_type | string | Optional | Whether to use labeled runners or standard GitHub runners. One of: standard, labeled, not_set |
$ (anyOf 2) | null | Alternative |
Create a code security configuration — request body — body code scanning options
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | Security Configuration feature options for code scanning |
$ (anyOf 1).allow_advanced | JSON | Optional | |
$ (anyOf 1).allow_advanced (anyOf 1) | boolean | Alternative | Whether to allow repos which use advanced setup |
$ (anyOf 1).allow_advanced (anyOf 2) | null | Alternative | |
$ (anyOf 2) | null | Alternative |
Create a code security configuration — request body — body secret scanning delegated bypass options
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Feature options for secret scanning delegated bypass |
reviewers | array | Optional | The bypass reviewers for secret scanning delegated bypass |
reviewers[] | object | Each item | |
reviewers[].mode | string | Optional | The bypass mode for the reviewer Default: ALWAYS One of: ALWAYS, EXEMPT |
reviewers[].reviewer_id | integer | Required within parent | The ID of the team or role selected as a bypass reviewer |
reviewers[].reviewer_type | string | Required within parent | The type of the bypass reviewer One of: TEAM, ROLE |
Get a code security configuration — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A code security configuration |
advanced_security | string | Optional | The enablement status of GitHub Advanced Security Known values: enabled, disabled, code_security, secret_protection |
code_scanning_default_setup | string | Optional | The enablement status of code scanning default setup Known values: enabled, disabled, not_set |
code_scanning_default_setup_options | JSON | Optional | |
code_scanning_default_setup_options (anyOf 1) | object | Alternative | Feature options for code scanning default setup |
code_scanning_default_setup_options (anyOf 1).runner_label | JSON | Optional | |
code_scanning_default_setup_options (anyOf 1).runner_label (anyOf 1) | string | Alternative | The label of the runner to use for code scanning when runner_type is 'labeled'. |
code_scanning_default_setup_options (anyOf 1).runner_label (anyOf 2) | null | Alternative | |
code_scanning_default_setup_options (anyOf 1).runner_type | JSON | Optional | |
code_scanning_default_setup_options (anyOf 1).runner_type (anyOf 1) | string | Alternative | Whether to use labeled runners or standard GitHub runners. Known values: standard, labeled, not_set |
code_scanning_default_setup_options (anyOf 1).runner_type (anyOf 2) | null | Alternative | |
code_scanning_default_setup_options (anyOf 2) | null | Alternative | |
code_scanning_delegated_alert_dismissal | string | Optional | The enablement status of code scanning delegated alert dismissal Known values: enabled, disabled, not_set |
code_scanning_options | JSON | Optional | |
code_scanning_options (anyOf 1) | object | Alternative | Feature options for code scanning |
code_scanning_options (anyOf 1).allow_advanced | JSON | Optional | |
code_scanning_options (anyOf 1).allow_advanced (anyOf 1) | boolean | Alternative | Whether to allow repos which use advanced setup |
code_scanning_options (anyOf 1).allow_advanced (anyOf 2) | null | Alternative | |
code_scanning_options (anyOf 2) | null | Alternative | |
created_at | string | Optional | Format: date-time |
dependabot_alerts | string | Optional | The enablement status of Dependabot alerts Known values: enabled, disabled, not_set |
dependabot_delegated_alert_dismissal | JSON | Optional | |
dependabot_delegated_alert_dismissal (anyOf 1) | string | Alternative | The enablement status of Dependabot delegated alert dismissal Known values: enabled, disabled, not_set |
dependabot_delegated_alert_dismissal (anyOf 2) | null | Alternative | |
dependabot_reachability | string | Optional | The enablement status of reachability analysis for Dependabot. Only returned for organizations and enterprises with access to reachability analysis. Known values: enabled, disabled, not_set |
dependabot_security_updates | string | Optional | The enablement status of Dependabot security updates Known values: enabled, disabled, not_set |
dependency_graph | string | Optional | The enablement status of Dependency Graph Known values: enabled, disabled, not_set |
dependency_graph_autosubmit_action | string | Optional | The enablement status of Automatic dependency submission Known values: enabled, disabled, not_set |
dependency_graph_autosubmit_action_options | object | Optional | Feature options for Automatic dependency submission |
dependency_graph_autosubmit_action_options.labeled_runners | boolean | Optional | Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | A description of the code security configuration |
description (anyOf 2) | null | Alternative | |
enforcement | string | Optional | The enforcement status for a security configuration Known values: enforced, unenforced, enterprise_enforced |
html_url | string | Optional | The URL of the configuration Format: uri |
id | JSON | Optional | |
id (anyOf 1) | integer | Alternative | The ID of the code security configuration |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Optional | The name of the code security configuration. Must be unique within the organization. |
private_vulnerability_reporting | string | Optional | The enablement status of private vulnerability reporting Known values: enabled, disabled, not_set |
secret_scanning | string | Optional | The enablement status of secret scanning Known values: enabled, disabled, not_set |
secret_scanning_delegated_alert_dismissal | string | Optional | The enablement status of secret scanning delegated alert dismissal Known values: enabled, disabled, not_set |
secret_scanning_delegated_bypass | string | Optional | The enablement status of secret scanning delegated bypass Known values: enabled, disabled, not_set |
secret_scanning_delegated_bypass_options | object | Optional | Feature options for secret scanning delegated bypass |
secret_scanning_delegated_bypass_options.reviewers | array | Optional | The bypass reviewers for secret scanning delegated bypass |
secret_scanning_delegated_bypass_options.reviewers[] | object | Each item | |
secret_scanning_delegated_bypass_options.reviewers[].mode | string | Optional | The bypass mode for the reviewer Known values: ALWAYS, EXEMPT Default: ALWAYS |
secret_scanning_delegated_bypass_options.reviewers[].reviewer_id | JSON | Required within parent | |
secret_scanning_delegated_bypass_options.reviewers[].reviewer_id (anyOf 1) | integer | Alternative | The ID of the team or role selected as a bypass reviewer |
secret_scanning_delegated_bypass_options.reviewers[].reviewer_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
secret_scanning_delegated_bypass_options.reviewers[].reviewer_type | string | Required within parent | The type of the bypass reviewer Known values: TEAM, ROLE |
secret_scanning_delegated_bypass_options.reviewers[].security_configuration_id | JSON | Optional | |
secret_scanning_delegated_bypass_options.reviewers[].security_configuration_id (anyOf 1) | integer | Alternative | The ID of the security configuration associated with this bypass reviewer |
secret_scanning_delegated_bypass_options.reviewers[].security_configuration_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
secret_scanning_extended_metadata | string | Optional | The enablement status of secret scanning extended metadata Known values: enabled, disabled, not_set |
secret_scanning_generic_secrets | string | Optional | The enablement status of Copilot secret scanning Known values: enabled, disabled, not_set |
secret_scanning_generic_secrets_push_protection | string | Optional | The enablement status of generic secrets push protection Known values: enabled, disabled, not_set |
secret_scanning_non_provider_patterns | string | Optional | The enablement status of secret scanning non-provider patterns Known values: enabled, disabled, not_set |
secret_scanning_push_protection | string | Optional | The enablement status of secret scanning push protection Known values: enabled, disabled, not_set |
secret_scanning_validity_checks | string | Optional | The enablement status of secret scanning validity checks Known values: enabled, disabled, not_set |
target_type | string | Optional | The type of the code security configuration. Known values: global, organization, enterprise |
updated_at | string | Optional | Format: date-time |
url | string | Optional | The URL of the configuration Format: uri |
Get default code security configurations — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | array | Root | A list of default code security configurations |
$[] | object | Each item | |
$[].configuration | Model | Optional | Expand Get a code security configuration — response body |
$[].default_for_new_repos | JSON | Optional | The visibility of newly created repositories for which the code security configuration will be applied to by default Known values: public, private_and_internal, all |
Referenced models: Get a code security configuration — response body
Get repositories associated with a code security configuration — response body — item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Repositories associated with a code security configuration and attachment status |
repository | Model | Optional | Expand List repositories for a user migration — response body — item |
status | string | Optional | The attachment status of the code security configuration on the repository. Known values: attached, attaching, detached, removed, enforced, failed, updating, removed_by_enterprise, enterprise_enforced |
Referenced models: List repositories for a user migration — response body — item
Get the code security configuration associated with a repository — response body — configuration, status
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Code security configuration associated with a repository and attachment status |
configuration | Model | Optional | Expand Get a code security configuration — response body |
status | string | Optional | The attachment status of the code security configuration on the repository. Known values: attached, attaching, detached, removed, enforced, failed, updating, removed_by_enterprise, enterprise_enforced |
Referenced models: Get a code security configuration — response body