Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.19 KB

secret-scanning.md

File metadata and controls

37 lines (25 loc) · 1.19 KB

Repository / Secret Scanning API

Back to the "Repos API" | Back to the navigation

List secret-scanning alerts for a repository

https://docs.github.com/en/[email protected]/rest/secret-scanning#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/[email protected]/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/[email protected]/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

https://docs.github.com/en/[email protected]/rest/secret-scanning#list-locations-for-a-secret-scanning-alert

$locations = $client->api('repos')->secretScanning()->locations('KnpLabs', 'php-github-api', $alertNumber);