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.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ”Configuration for code scanning default setup.
object
The desired state of code scanning default setup.
Runner type to be used.
Runner label to be used if the runner type is labeled.
CodeQL query suite to be used.
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.
CodeQL languages to be analyzed.
Examples
{ "state": "configured", "threat_model": "remote_and_local"}Responses
Section titled “ Responses ”Response
An object without any properties.
object
Examples
nullResponse
You can use run_url to track the status of the run. This includes a property status and conclusion.
You should not rely on this always being an actions workflow run object.
object
ID of the corresponding run.
URL of the corresponding run.
Examples
{ "run_id": 42, "run_url": "https://api.github.com/repos/octoorg/octocat/actions/runs/42"}Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Response if there is already a validation run in progress with a different default setup configuration
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Response if the configuration change cannot be made because the repository is not in the required state
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Service unavailable
object
Example generated
{ "code": "example", "message": "example", "documentation_url": "example"}