---
title: "Get the status of an autofix for a code scanning alert"
method: GET
path: "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"
tags: ["code-scanning"]
---

# Get the status of an autofix for a code scanning alert

`GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix`

Gets the status and description of an autofix for a code scanning alert on the repository's default branch.

OAuth app tokens and personal access tokens (classic) need the `security_events` 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
- `alert_number` integer, required — The security alert number.

## Response `200`

Response

- CodeScanningAutofix
  - `status` 'pending' | 'error' | 'success' | 'outdated', required — The status of an autofix.
  - `description` string, nullable, required — The description of an autofix.
  - `started_at` string, date-time, required — The start time of an autofix in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.

## Other responses

- `400` — Bad Request
- `403` — Response if GitHub Advanced Security is not enabled for this repository
- `404` — Resource not found
- `500` — Internal Error

---

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