pub struct SecretScanning<'api, C: Client>{ /* private fields */ }Implementations§
Source§impl<'api, C: Client> SecretScanning<'api, C>
impl<'api, C: Client> SecretScanning<'api, C>
Sourcepub async fn create_push_protection_bypass_async(
&self,
owner: &str,
repo: &str,
body: PostSecretScanningCreatePushProtectionBypass,
) -> Result<SecretScanningPushProtectionBypass, AdapterError>
pub async fn create_push_protection_bypass_async( &self, owner: &str, repo: &str, body: PostSecretScanningCreatePushProtectionBypass, ) -> Result<SecretScanningPushProtectionBypass, AdapterError>
§Create a push protection bypass
Creates a bypass for a previously push protected secret.
The authenticated user must be the original author of the committed secret.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
GitHub API docs for create_push_protection_bypass
Sourcepub fn create_push_protection_bypass(
&self,
owner: &str,
repo: &str,
body: PostSecretScanningCreatePushProtectionBypass,
) -> Result<SecretScanningPushProtectionBypass, AdapterError>
pub fn create_push_protection_bypass( &self, owner: &str, repo: &str, body: PostSecretScanningCreatePushProtectionBypass, ) -> Result<SecretScanningPushProtectionBypass, AdapterError>
§Create a push protection bypass
Creates a bypass for a previously push protected secret.
The authenticated user must be the original author of the committed secret.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
GitHub API docs for create_push_protection_bypass
Sourcepub async fn get_alert_async(
&self,
owner: &str,
repo: &str,
alert_number: AlertNumber,
query_params: Option<impl Into<SecretScanningGetAlertParams>>,
) -> Result<SecretScanningAlert, AdapterError>
pub async fn get_alert_async( &self, owner: &str, repo: &str, alert_number: AlertNumber, query_params: Option<impl Into<SecretScanningGetAlertParams>>, ) -> Result<SecretScanningAlert, AdapterError>
§Get a secret scanning alert
Gets a single secret scanning alert detected in an eligible repository.
The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.
OAuth 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.
Sourcepub fn get_alert(
&self,
owner: &str,
repo: &str,
alert_number: AlertNumber,
query_params: Option<impl Into<SecretScanningGetAlertParams>>,
) -> Result<SecretScanningAlert, AdapterError>
pub fn get_alert( &self, owner: &str, repo: &str, alert_number: AlertNumber, query_params: Option<impl Into<SecretScanningGetAlertParams>>, ) -> Result<SecretScanningAlert, AdapterError>
§Get a secret scanning alert
Gets a single secret scanning alert detected in an eligible repository.
The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.
OAuth 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.
Sourcepub async fn get_scan_history_async(
&self,
owner: &str,
repo: &str,
) -> Result<SecretScanningScanHistory, AdapterError>
pub async fn get_scan_history_async( &self, owner: &str, repo: &str, ) -> Result<SecretScanningScanHistory, AdapterError>
§Get secret scanning scan history for a repository
Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included.
OAuth 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.
GitHub API docs for get_scan_history
Sourcepub fn get_scan_history(
&self,
owner: &str,
repo: &str,
) -> Result<SecretScanningScanHistory, AdapterError>
pub fn get_scan_history( &self, owner: &str, repo: &str, ) -> Result<SecretScanningScanHistory, AdapterError>
§Get secret scanning scan history for a repository
Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included.
OAuth 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.
GitHub API docs for get_scan_history
Sourcepub async fn list_alerts_for_enterprise_async(
&self,
enterprise: &str,
query_params: Option<impl Into<SecretScanningListAlertsForEnterpriseParams<'api>>>,
) -> Result<Vec<OrganizationSecretScanningAlert>, AdapterError>
pub async fn list_alerts_for_enterprise_async( &self, enterprise: &str, query_params: Option<impl Into<SecretScanningListAlertsForEnterpriseParams<'api>>>, ) -> Result<Vec<OrganizationSecretScanningAlert>, AdapterError>
§List secret scanning alerts for an enterprise
Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.
Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a security manager.
The authenticated user must be a member of the enterprise in order to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope or security_events scope to use this endpoint.
GitHub API docs for list_alerts_for_enterprise
Sourcepub fn list_alerts_for_enterprise(
&self,
enterprise: &str,
query_params: Option<impl Into<SecretScanningListAlertsForEnterpriseParams<'api>>>,
) -> Result<Vec<OrganizationSecretScanningAlert>, AdapterError>
pub fn list_alerts_for_enterprise( &self, enterprise: &str, query_params: Option<impl Into<SecretScanningListAlertsForEnterpriseParams<'api>>>, ) -> Result<Vec<OrganizationSecretScanningAlert>, AdapterError>
§List secret scanning alerts for an enterprise
Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.
Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a security manager.
The authenticated user must be a member of the enterprise in order to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope or security_events scope to use this endpoint.
GitHub API docs for list_alerts_for_enterprise
Sourcepub async fn list_alerts_for_org_async(
&self,
org: &str,
query_params: Option<impl Into<SecretScanningListAlertsForOrgParams<'api>>>,
) -> Result<Vec<OrganizationSecretScanningAlert>, AdapterError>
pub async fn list_alerts_for_org_async( &self, org: &str, query_params: Option<impl Into<SecretScanningListAlertsForOrgParams<'api>>>, ) -> Result<Vec<OrganizationSecretScanningAlert>, AdapterError>
§List secret scanning alerts for an organization
Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
OAuth 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.
GitHub API docs for list_alerts_for_org
Sourcepub fn list_alerts_for_org(
&self,
org: &str,
query_params: Option<impl Into<SecretScanningListAlertsForOrgParams<'api>>>,
) -> Result<Vec<OrganizationSecretScanningAlert>, AdapterError>
pub fn list_alerts_for_org( &self, org: &str, query_params: Option<impl Into<SecretScanningListAlertsForOrgParams<'api>>>, ) -> Result<Vec<OrganizationSecretScanningAlert>, AdapterError>
§List secret scanning alerts for an organization
Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.
The authenticated user must be an administrator or security manager for the organization to use this endpoint.
OAuth 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.
GitHub API docs for list_alerts_for_org
Sourcepub async fn list_alerts_for_repo_async(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<SecretScanningListAlertsForRepoParams<'api>>>,
) -> Result<Vec<SecretScanningAlert>, AdapterError>
pub async fn list_alerts_for_repo_async( &self, owner: &str, repo: &str, query_params: Option<impl Into<SecretScanningListAlertsForRepoParams<'api>>>, ) -> Result<Vec<SecretScanningAlert>, AdapterError>
§List secret scanning alerts for a repository
Lists secret scanning alerts for an eligible repository, from newest to oldest.
The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.
OAuth 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.
GitHub API docs for list_alerts_for_repo
Sourcepub fn list_alerts_for_repo(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<SecretScanningListAlertsForRepoParams<'api>>>,
) -> Result<Vec<SecretScanningAlert>, AdapterError>
pub fn list_alerts_for_repo( &self, owner: &str, repo: &str, query_params: Option<impl Into<SecretScanningListAlertsForRepoParams<'api>>>, ) -> Result<Vec<SecretScanningAlert>, AdapterError>
§List secret scanning alerts for a repository
Lists secret scanning alerts for an eligible repository, from newest to oldest.
The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.
OAuth 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.
GitHub API docs for list_alerts_for_repo
Sourcepub async fn list_locations_for_alert_async(
&self,
owner: &str,
repo: &str,
alert_number: AlertNumber,
query_params: Option<impl Into<SecretScanningListLocationsForAlertParams>>,
) -> Result<Vec<SecretScanningLocation>, AdapterError>
pub async fn list_locations_for_alert_async( &self, owner: &str, repo: &str, alert_number: AlertNumber, query_params: Option<impl Into<SecretScanningListLocationsForAlertParams>>, ) -> Result<Vec<SecretScanningLocation>, AdapterError>
§List locations for a secret scanning alert
Lists all locations for a given secret scanning alert for an eligible repository.
The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.
OAuth 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.
GitHub API docs for list_locations_for_alert
Sourcepub fn list_locations_for_alert(
&self,
owner: &str,
repo: &str,
alert_number: AlertNumber,
query_params: Option<impl Into<SecretScanningListLocationsForAlertParams>>,
) -> Result<Vec<SecretScanningLocation>, AdapterError>
pub fn list_locations_for_alert( &self, owner: &str, repo: &str, alert_number: AlertNumber, query_params: Option<impl Into<SecretScanningListLocationsForAlertParams>>, ) -> Result<Vec<SecretScanningLocation>, AdapterError>
§List locations for a secret scanning alert
Lists all locations for a given secret scanning alert for an eligible repository.
The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.
OAuth 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.
GitHub API docs for list_locations_for_alert
Sourcepub async fn update_alert_async(
&self,
owner: &str,
repo: &str,
alert_number: AlertNumber,
body: PatchSecretScanningUpdateAlert,
) -> Result<SecretScanningAlert, AdapterError>
pub async fn update_alert_async( &self, owner: &str, repo: &str, alert_number: AlertNumber, body: PatchSecretScanningUpdateAlert, ) -> Result<SecretScanningAlert, AdapterError>
§Update a secret scanning alert
Updates the status of a secret scanning alert in an eligible repository.
The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.
OAuth 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.
GitHub API docs for update_alert
Sourcepub fn update_alert(
&self,
owner: &str,
repo: &str,
alert_number: AlertNumber,
body: PatchSecretScanningUpdateAlert,
) -> Result<SecretScanningAlert, AdapterError>
pub fn update_alert( &self, owner: &str, repo: &str, alert_number: AlertNumber, body: PatchSecretScanningUpdateAlert, ) -> Result<SecretScanningAlert, AdapterError>
§Update a secret scanning alert
Updates the status of a secret scanning alert in an eligible repository.
The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint.
OAuth 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.
GitHub API docs for update_alert