---
title: "Get a code scanning default setup configuration"
method: GET
path: "/repos/{owner}/{repo}/code-scanning/default-setup"
tags: ["code-scanning"]
---

# Get a code scanning default setup configuration

`GET /repos/{owner}/{repo}/code-scanning/default-setup`

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.

## Path parameters

- `owner` string, required
- `repo` string, required

## Response `200`

Response

- CodeScanningDefaultSetup — Configuration for code scanning default setup.
  - `state` 'configured' | 'not-configured' — Code scanning default setup has been configured or not.
  - `languages` string[] — Languages to be analyzed.
  - `runner_type` 'standard' | 'labeled', nullable — Runner type to be used.
  - `runner_label` string, 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_at` string, date-time, nullable — Timestamp of latest configuration update.
  - `schedule` 'weekly', nullable — The frequency of the periodic analysis.

## Other responses

- `403` — Response if GitHub Advanced Security is not enabled for this repository
- `404` — Resource not found
- `503` — Service unavailable

---

[API](https://skmtc.net/github/apis/rest-api.md) · [All operations](https://skmtc.net/github/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/rest-api/versions/80850db290cd/schema)
