View Source GitHub.SecretScanning (GitHub REST API Client v0.0.8)

Provides API endpoints related to secret scanning

Link to this section Summary

Functions

List secret scanning alerts for an enterprise

List secret scanning alerts for an organization

List secret scanning alerts for a repository

List locations for a secret scanning alert

Link to this section Functions

Link to this function

get_alert(owner, repo, alert_number, opts \\ [])

View Source
@spec get_alert(String.t(), String.t(), integer(), keyword()) ::
  {:ok, GitHub.SecretScanning.Alert.t()} | {:error, GitHub.Error.t()}

Get a secret scanning alert

resources

Resources

Link to this function

list_alerts_for_enterprise(enterprise, opts \\ [])

View Source
@spec list_alerts_for_enterprise(
  String.t(),
  keyword()
) ::
  {:ok, [GitHub.Organization.SecretScanningAlert.t()]}
  | {:error, GitHub.Error.t()}

List secret scanning alerts for an enterprise

options

Options

  • state (String.t()): Set to open or resolved to only list secret scanning alerts in a specific state.
  • secret_type (String.t()): A comma-separated list of secret types to return. By default all secret types are returned. See "Secret scanning patterns" for a complete list of secret types.
  • resolution (String.t()): A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests.
  • sort (String.t()): The property to sort the results by. created means when the alert was created. updated means when the alert was updated or resolved.
  • direction (String.t()): The direction to sort the results by.
  • per_page (integer): The number of results per page (max 100).
  • before (String.t()): A cursor, as given in the Link header. If specified, the query only searches for results before this cursor.
  • after (String.t()): A cursor, as given in the Link header. If specified, the query only searches for results after this cursor.

resources

Resources

Link to this function

list_alerts_for_org(org, opts \\ [])

View Source
@spec list_alerts_for_org(
  String.t(),
  keyword()
) ::
  {:ok, [GitHub.Organization.SecretScanningAlert.t()]}
  | {:error, GitHub.Error.t()}

List secret scanning alerts for an organization

options

Options

  • state (String.t()): Set to open or resolved to only list secret scanning alerts in a specific state.
  • secret_type (String.t()): A comma-separated list of secret types to return. By default all secret types are returned. See "Secret scanning patterns" for a complete list of secret types.
  • resolution (String.t()): A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests.
  • sort (String.t()): The property to sort the results by. created means when the alert was created. updated means when the alert was updated or resolved.
  • direction (String.t()): The direction to sort the results by.
  • page (integer): Page number of the results to fetch.
  • per_page (integer): The number of results per page (max 100).
  • before (String.t()): A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string.
  • after (String.t()): A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string.

resources

Resources

Link to this function

list_alerts_for_repo(owner, repo, opts \\ [])

View Source
@spec list_alerts_for_repo(String.t(), String.t(), keyword()) ::
  {:ok, [GitHub.SecretScanning.Alert.t()]} | {:error, GitHub.Error.t()}

List secret scanning alerts for a repository

options

Options

  • state (String.t()): Set to open or resolved to only list secret scanning alerts in a specific state.
  • secret_type (String.t()): A comma-separated list of secret types to return. By default all secret types are returned. See "Secret scanning patterns" for a complete list of secret types.
  • resolution (String.t()): A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests.
  • sort (String.t()): The property to sort the results by. created means when the alert was created. updated means when the alert was updated or resolved.
  • direction (String.t()): The direction to sort the results by.
  • page (integer): Page number of the results to fetch.
  • per_page (integer): The number of results per page (max 100).
  • before (String.t()): A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string.
  • after (String.t()): A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string.

resources

Resources

Link to this function

list_locations_for_alert(owner, repo, alert_number, opts \\ [])

View Source
@spec list_locations_for_alert(String.t(), String.t(), integer(), keyword()) ::
  {:ok, [GitHub.SecretScanning.Location.t()]} | {:error, GitHub.Error.t()}

List locations for a secret scanning alert

options

Options

  • page (integer): Page number of the results to fetch.
  • per_page (integer): The number of results per page (max 100).

resources

Resources

Link to this function

update_alert(owner, repo, alert_number, body, opts \\ [])

View Source
@spec update_alert(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.SecretScanning.Alert.t()} | {:error, GitHub.Error.t()}

Update a secret scanning alert

resources

Resources