v68

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

Update a code scanning default setup configuration

Updates 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.

patch/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.

Request body

state'configured' | 'not-configured'

The desired state of code scanning default setup.

runner_type'standard' | 'labeled'

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.

languagesstring[]

CodeQL languages to be analyzed.

Example request

{
  "runner_label": "code-scanning"
}

Response

Response

EmptyObject required

An object without any properties.