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

ActionSent when
appeared-in-branchA 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-userSomeone closed a code scanning alert.
createdA code scanning alert was created in a repository.
fixedA code scanning alert was fixed in a branch by a commit.
reopenedA previously fixed code scanning alert reappeared in a branch.
reopened-by-userSomeone reopened a code scanning alert.
updated-assignmentThe 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.

FieldTypeRequiredDescription
actionstringYes
alertobjectYesThe code scanning alert involved in the event.
commit_oidstringYesThe 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.
enterpriseobjectNoAn enterprise on GitHub. Webhook payloads contain the enterprise property when the webhook is configured
installationobjectNoThe GitHub App installation. Webhook payloads contain the installation property when the event is configured
organizationobjectNoA GitHub organization. Webhook payloads contain the organization property when the webhook is configured for an
refstringYesThe 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.
repositoryobjectYesThe repository on GitHub where the event occurred. Webhook payloads contain the repository property
senderobjectYesA 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.