Skip to content

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

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeFeature options for code scanning default setup
$ (anyOf 1).runner_labelJSONOptional
$ (anyOf 1).runner_label (anyOf 1)stringAlternativeThe label of the runner to use for code scanning default setup when runner_type is 'labeled'.
$ (anyOf 1).runner_label (anyOf 2)nullAlternative
$ (anyOf 1).runner_typestringOptionalWhether to use labeled runners or standard GitHub runners.
One of: standard, labeled, not_set
$ (anyOf 2)nullAlternative

Create a code security configuration — request body — body code scanning options

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeSecurity Configuration feature options for code scanning
$ (anyOf 1).allow_advancedJSONOptional
$ (anyOf 1).allow_advanced (anyOf 1)booleanAlternativeWhether to allow repos which use advanced setup
$ (anyOf 1).allow_advanced (anyOf 2)nullAlternative
$ (anyOf 2)nullAlternative

Create a code security configuration — request body — body secret scanning delegated bypass options

FieldTypePresenceDescription and constraints
$objectRootFeature options for secret scanning delegated bypass
reviewersarrayOptionalThe bypass reviewers for secret scanning delegated bypass
reviewers[]objectEach item
reviewers[].modestringOptionalThe bypass mode for the reviewer
Default: ALWAYS
One of: ALWAYS, EXEMPT
reviewers[].reviewer_idintegerRequired within parentThe ID of the team or role selected as a bypass reviewer
reviewers[].reviewer_typestringRequired within parentThe type of the bypass reviewer
One of: TEAM, ROLE

Get a code security configuration — response body

FieldTypePresenceDescription and constraints
$objectRootA code security configuration
advanced_securitystringOptionalThe enablement status of GitHub Advanced Security
Known values: enabled, disabled, code_security, secret_protection
code_scanning_default_setupstringOptionalThe enablement status of code scanning default setup
Known values: enabled, disabled, not_set
code_scanning_default_setup_optionsJSONOptional
code_scanning_default_setup_options (anyOf 1)objectAlternativeFeature options for code scanning default setup
code_scanning_default_setup_options (anyOf 1).runner_labelJSONOptional
code_scanning_default_setup_options (anyOf 1).runner_label (anyOf 1)stringAlternativeThe 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)nullAlternative
code_scanning_default_setup_options (anyOf 1).runner_typeJSONOptional
code_scanning_default_setup_options (anyOf 1).runner_type (anyOf 1)stringAlternativeWhether 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)nullAlternative
code_scanning_default_setup_options (anyOf 2)nullAlternative
code_scanning_delegated_alert_dismissalstringOptionalThe enablement status of code scanning delegated alert dismissal
Known values: enabled, disabled, not_set
code_scanning_optionsJSONOptional
code_scanning_options (anyOf 1)objectAlternativeFeature options for code scanning
code_scanning_options (anyOf 1).allow_advancedJSONOptional
code_scanning_options (anyOf 1).allow_advanced (anyOf 1)booleanAlternativeWhether to allow repos which use advanced setup
code_scanning_options (anyOf 1).allow_advanced (anyOf 2)nullAlternative
code_scanning_options (anyOf 2)nullAlternative
created_atstringOptionalFormat: date-time
dependabot_alertsstringOptionalThe enablement status of Dependabot alerts
Known values: enabled, disabled, not_set
dependabot_delegated_alert_dismissalJSONOptional
dependabot_delegated_alert_dismissal (anyOf 1)stringAlternativeThe enablement status of Dependabot delegated alert dismissal
Known values: enabled, disabled, not_set
dependabot_delegated_alert_dismissal (anyOf 2)nullAlternative
dependabot_reachabilitystringOptionalThe 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_updatesstringOptionalThe enablement status of Dependabot security updates
Known values: enabled, disabled, not_set
dependency_graphstringOptionalThe enablement status of Dependency Graph
Known values: enabled, disabled, not_set
dependency_graph_autosubmit_actionstringOptionalThe enablement status of Automatic dependency submission
Known values: enabled, disabled, not_set
dependency_graph_autosubmit_action_optionsobjectOptionalFeature options for Automatic dependency submission
dependency_graph_autosubmit_action_options.labeled_runnersbooleanOptionalWhether to use runners labeled with 'dependency-submission' or standard GitHub runners.
descriptionJSONOptional
description (anyOf 1)stringAlternativeA description of the code security configuration
description (anyOf 2)nullAlternative
enforcementstringOptionalThe enforcement status for a security configuration
Known values: enforced, unenforced, enterprise_enforced
html_urlstringOptionalThe URL of the configuration
Format: uri
idJSONOptional
id (anyOf 1)integerAlternativeThe ID of the code security configuration
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringOptionalThe name of the code security configuration. Must be unique within the organization.
private_vulnerability_reportingstringOptionalThe enablement status of private vulnerability reporting
Known values: enabled, disabled, not_set
secret_scanningstringOptionalThe enablement status of secret scanning
Known values: enabled, disabled, not_set
secret_scanning_delegated_alert_dismissalstringOptionalThe enablement status of secret scanning delegated alert dismissal
Known values: enabled, disabled, not_set
secret_scanning_delegated_bypassstringOptionalThe enablement status of secret scanning delegated bypass
Known values: enabled, disabled, not_set
secret_scanning_delegated_bypass_optionsobjectOptionalFeature options for secret scanning delegated bypass
secret_scanning_delegated_bypass_options.reviewersarrayOptionalThe bypass reviewers for secret scanning delegated bypass
secret_scanning_delegated_bypass_options.reviewers[]objectEach item
secret_scanning_delegated_bypass_options.reviewers[].modestringOptionalThe bypass mode for the reviewer
Known values: ALWAYS, EXEMPT
Default: ALWAYS
secret_scanning_delegated_bypass_options.reviewers[].reviewer_idJSONRequired within parent
secret_scanning_delegated_bypass_options.reviewers[].reviewer_id (anyOf 1)integerAlternativeThe ID of the team or role selected as a bypass reviewer
secret_scanning_delegated_bypass_options.reviewers[].reviewer_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
secret_scanning_delegated_bypass_options.reviewers[].reviewer_typestringRequired within parentThe type of the bypass reviewer
Known values: TEAM, ROLE
secret_scanning_delegated_bypass_options.reviewers[].security_configuration_idJSONOptional
secret_scanning_delegated_bypass_options.reviewers[].security_configuration_id (anyOf 1)integerAlternativeThe ID of the security configuration associated with this bypass reviewer
secret_scanning_delegated_bypass_options.reviewers[].security_configuration_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
secret_scanning_extended_metadatastringOptionalThe enablement status of secret scanning extended metadata
Known values: enabled, disabled, not_set
secret_scanning_generic_secretsstringOptionalThe enablement status of Copilot secret scanning
Known values: enabled, disabled, not_set
secret_scanning_generic_secrets_push_protectionstringOptionalThe enablement status of generic secrets push protection
Known values: enabled, disabled, not_set
secret_scanning_non_provider_patternsstringOptionalThe enablement status of secret scanning non-provider patterns
Known values: enabled, disabled, not_set
secret_scanning_push_protectionstringOptionalThe enablement status of secret scanning push protection
Known values: enabled, disabled, not_set
secret_scanning_validity_checksstringOptionalThe enablement status of secret scanning validity checks
Known values: enabled, disabled, not_set
target_typestringOptionalThe type of the code security configuration.
Known values: global, organization, enterprise
updated_atstringOptionalFormat: date-time
urlstringOptionalThe URL of the configuration
Format: uri

Get default code security configurations — response body

FieldTypePresenceDescription and constraints
$arrayRootA list of default code security configurations
$[]objectEach item
$[].configurationModelOptionalExpand Get a code security configuration — response body
$[].default_for_new_reposJSONOptionalThe 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

FieldTypePresenceDescription and constraints
$objectRootRepositories associated with a code security configuration and attachment status
repositoryModelOptionalExpand List repositories for a user migration — response body — item
statusstringOptionalThe 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

FieldTypePresenceDescription and constraints
$objectRootCode security configuration associated with a repository and attachment status
configurationModelOptionalExpand Get a code security configuration — response body
statusstringOptionalThe 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

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.