Code Scanning Alert
This event occurs when there is activity relating to code scanning alerts in a repository. For more information, see "About code scanning" and "About code scanning alerts." For information about the API to manage code scanning, see "Code scanning" in the REST API documentation.
Actions
| Action | Sent when |
|---|---|
appeared-in-branch | A previously created code scanning alert appeared in another branch. This can happen when a branch is merged into or created from a branch with a pre-existing code scanning alert. |
closed-by-user | Someone closed a code scanning alert. |
created | A code scanning alert was created in a repository. |
fixed | A code scanning alert was fixed in a branch by a commit. |
reopened | A previously fixed code scanning alert reappeared in a branch. |
reopened-by-user | Someone reopened a code scanning alert. |
updated-assignment | The assignees list of a code scanning alert has been updated. |
Payload
Fields of the delivery for the first action above. Every action shares the event's core fields.
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | |
alert | object | Yes | The code scanning alert involved in the event. |
commit_oid | string | Yes | The commit SHA of the code scanning alert. When the action is reopened_by_user or closed_by_user, the event was triggered by the sender and this value will be empty. |
enterprise | object | No | An enterprise on GitHub. Webhook payloads contain the enterprise property when the webhook is configured |
installation | object | No | The GitHub App installation. Webhook payloads contain the installation property when the event is configured |
organization | object | No | A GitHub organization. Webhook payloads contain the organization property when the webhook is configured for an |
ref | string | Yes | The Git reference of the code scanning alert. When the action is reopened_by_user or closed_by_user, the event was triggered by the sender and this value will be empty. |
repository | object | Yes | The repository on GitHub where the event occurred. Webhook payloads contain the repository property |
sender | object | Yes | A GitHub user. |
Subscribing
To subscribe to this event, a GitHub App must have at least read-level access for the "Code scanning alerts" repository permission.