v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
code-scanning

Get a code scanning default setup configuration

Gets a code scanning default setup configuration.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public_repo scope to use this endpoint with only public repositories.

get/repos/{owner}/{repo}/code-scanning/default-setup

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Response

Response

state'configured' | 'not-configured'

Code scanning default setup has been configured or not.

languagesstring[]

Languages to be analyzed.

runner_type'standard' | 'labeled' nullable

Runner type to be used.

runner_labelstring nullable

Runner label to be used if the runner type is labeled.

query_suite'default' | 'extended'

CodeQL query suite to be used.

threat_model'remote' | 'remote_and_local'

Threat model to be used for code scanning analysis. Use remote to analyze only network sources and remote_and_local to include local sources like filesystem access, command-line arguments, database reads, environment variable and standard input.

updated_atstring date-time nullable

Timestamp of latest configuration update.

schedule'weekly' nullable

The frequency of the periodic analysis.

Example response

{
  "runner_label": "code-scanning",
  "updated_at": "2023-12-06T14:20:20.000Z"
}