List secret-scanning alerts for a repository
October 17, 2023 ยท View on GitHub
Repository / Secret Scanning API
Back to the "Repos API" | Back to the navigation
List secret-scanning alerts for a repository
$alerts = $client->api('repos')->secretScanning()->alerts('KnpLabs', 'php-github-api');
Get a secret-scanning alert
https://docs.github.com/en/enterprise-server@3.5/rest/secret-scanning#get-a-secret-scanning-alert
$alert = $client->api('repos')->secretScanning()->getAlert('KnpLabs', 'php-github-api', $alertNumber);
Update a secret-scanning alert
https://docs.github.com/en/enterprise-server@3.5/rest/secret-scanning#update-a-secret-scanning-alert
$client->api('repos')->secretScanning()->updateAlert('KnpLabs', 'php-github-api', $alertNumber, [
'state' => 'resolved',
'resolution' => 'wont-fix'
]);
List Locations for a secret-scanning alert
$locations = $client->api('repos')->secretScanning()->locations('KnpLabs', 'php-github-api', $alertNumber);