{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Updates the status of a secret scanning alert in an eligible repository.\n\nYou can also use this endpoint to assign or unassign an alert to a user who has write access to the repository.\n\nThe authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.\n\n> [!NOTE]\n> If [delegated alert dismissal](https://docs.github.com/code-security/how-tos/manage-security-alerts/manage-secret-scanning-alerts/enable-delegated-dismissal) is enabled, resolving or reopening an alert also requires write access to the \"Secret scanning alert dismissal requests\" permission. Granting the permission to the app alone is not sufficient if the token's permissions exclude it.","properties":{"path":{"type":"object","properties":{"owner":{"type":"string","description":"The account owner of the repository. The name is not case sensitive."},"repo":{"type":"string","description":"The name of the repository without the `.git` extension. The name is not case sensitive."},"alert_number":{"$ref":"#/definitions/alert-number","description":"The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation."}},"required":["owner","repo","alert_number"],"additionalProperties":false},"body":{"type":"object","properties":{"state":{"$ref":"#/definitions/secret-scanning-alert-state"},"resolution":{"$ref":"#/definitions/secret-scanning-alert-resolution"},"resolution_comment":{"$ref":"#/definitions/secret-scanning-alert-resolution-comment"},"assignee":{"$ref":"#/definitions/secret-scanning-alert-assignee"},"validity":{"type":["string","null"],"enum":["active","inactive"],"description":"Sets the validity of the secret scanning alert. Can be `active`, `inactive`, or `null` to clear the override."}},"anyOf":[{"required":["state"]},{"required":["assignee"]},{"required":["validity"]}],"examples":[{"state":"resolved","resolution":"false_positive"}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"alert-number":{"type":"integer","description":"The security alert number."},"secret-scanning-alert-state":{"description":"Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.","type":"string","enum":["open","resolved"]},"secret-scanning-alert-resolution":{"type":["string","null"],"description":"**Required when the `state` is `resolved`.** The reason for resolving the alert.","enum":["false_positive","wont_fix","revoked","used_in_tests"]},"secret-scanning-alert-resolution-comment":{"description":"An optional comment when closing or reopening an alert. Cannot be updated or deleted.","type":["string","null"]},"secret-scanning-alert-assignee":{"description":"The username of the user to assign to the alert. Set to `null` to unassign the alert.","type":["string","null"]}}},"name":"Update a secret scanning alert","id":"github.secret-scanning.update-alert","example":{"path":{"owner":"octocat","repo":"hello-world","alert_number":1},"body":{"state":"resolved","resolution":"false_positive"}},"maxRequests":1,"summary":false}}