Push protection for secret scanning blocks any push that contains a secret. By default, this block can be bypassed, which results in a secret scanning alert in the repository. Delegated bypass controls let you choose who is allowed to bypass push protection, and contributors without permissions to bypass must submit a request for approval by the listed reviewers. These controls can reduce the risk of secrets being accidentally exposed in your codebase.
Managing bypass requests is now available with the REST API, offering flexibility for triaging and reviewing by integrating with your existing workflows.
Reviewers can retrieve bypass requests for an organization or repository with the following endpoints:
GET /orgs/{org}/bypass-requests/secret-scanning
GET /repos/{owner}/{repo}/bypass-requests/secret-scanning
GET /repos/{owner}/{repo}/bypass-requests/secret-scanning/{bypass_request_number}
Reviewers can review a request and dismiss a response to a request with the following endpoints:
PATCH /repos/{owner}/{repo}/bypass-requests/secret-scanning/{bypass_request_number}
DELETE /repos/{owner}/{repo}/bypass-responses/secret-scanning/{bypass_response_id}
Learn more about how to secure your repositories with secret scanning and push protection.