Open Context Protocol is live! 🚀 Read the launch post
secretScanningListAlertsForRepo

secretScanningListAlertsForRepo

List secret scanning alerts for a repository

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/secret-scanning/alerts
  • Operation ID: secret-scanning/list-alerts-for-repo

Parameters

{
  "owner": {
    "description": "The account owner of the repository. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "repo": {
    "description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "state": {
    "description": "Set to `open` or `resolved` to only list secret scanning alerts in a specific state.",
    "required": false,
    "location": "query",
    "type": "string",
    "enum": [
      "open",
      "resolved"
    ]
  },
  "secret_type": {
    "description": "A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See \"[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)\" for a complete list of secret types.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "resolution": {
    "description": "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`.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "assignee": {
    "description": "Filters alerts by assignee. Use `*` to get all assigned alerts, `none` to get all unassigned alerts, or a GitHub username to get alerts assigned to a specific user.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "sort": {
    "description": "The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved.",
    "required": false,
    "location": "query",
    "type": "string",
    "enum": [
      "created",
      "updated"
    ]
  },
  "direction": {
    "description": "The direction to sort the results by.",
    "required": false,
    "location": "query",
    "type": "string",
    "enum": [
      "asc",
      "desc"
    ]
  },
  "page": {
    "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "per_page": {
    "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "before": {
    "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). 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.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "after": {
    "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). 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.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "validity": {
    "description": "A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are `active`, `inactive`, and `unknown`.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "is_publicly_leaked": {
    "description": "A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "is_multi_repo": {
    "description": "A boolean value representing whether or not to filter alerts by the multi-repo tag being present.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "hide_secret": {
    "description": "A boolean value representing whether or not to hide literal secrets in the results.",
    "required": false,
    "location": "query",
    "type": "boolean"
  }
}

Response Schema

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "number": {
        "type": "integer",
        "description": "The security alert number.",
        "readOnly": true
      },
      "created_at": {
        "type": "string",
        "description": "The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
        "format": "date-time",
        "readOnly": true
      },
      "updated_at": {
        "type": "string",
        "description": "The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
        "format": "date-time",
        "readOnly": true,
        "nullable": true
      },
      "url": {
        "type": "string",
        "description": "The REST API URL of the alert resource.",
        "format": "uri",
        "readOnly": true
      },
      "html_url": {
        "type": "string",
        "description": "The GitHub URL of the alert resource.",
        "format": "uri",
        "readOnly": true
      },
      "locations_url": {
        "type": "string",
        "format": "uri",
        "description": "The REST API URL of the code locations for this alert."
      },
      "state": {
        "description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
        "type": "string",
        "enum": [
          "open",
          "resolved"
        ]
      },
      "resolution": {
        "type": "string",
        "description": "**Required when the `state` is `resolved`.** The reason for resolving the alert.",
        "nullable": true,
        "enum": [
          "false_positive",
          "wont_fix",
          "revoked",
          "used_in_tests"
        ]
      },
      "resolved_at": {
        "type": "string",
        "format": "date-time",
        "description": "The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
        "nullable": true
      },
      "resolved_by": {
        "title": "Simple User",
        "description": "A GitHub user.",
        "type": "object",
        "properties": {
          "name": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "login": {
            "type": "string",
            "example": "octocat"
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "node_id": {
            "type": "string",
            "example": "MDQ6VXNlcjE="
          },
          "avatar_url": {
            "type": "string",
            "format": "uri",
            "example": "https://github.com/images/error/octocat_happy.gif"
          },
          "gravatar_id": {
            "type": "string",
            "example": "41d064eb2195891e12d0413f63227ea7",
            "nullable": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat"
          },
          "html_url": {
            "type": "string",
            "format": "uri",
            "example": "https://github.com/octocat"
          },
          "followers_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/followers"
          },
          "following_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/following{/other_user}"
          },
          "gists_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/gists{/gist_id}"
          },
          "starred_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
          },
          "subscriptions_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/subscriptions"
          },
          "organizations_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/orgs"
          },
          "repos_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/repos"
          },
          "events_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/events{/privacy}"
          },
          "received_events_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/received_events"
          },
          "type": {
            "type": "string",
            "example": "User"
          },
          "site_admin": {
            "type": "boolean"
          },
          "starred_at": {
            "type": "string",
            "example": "\"2020-07-09T00:17:55Z\""
          },
          "user_view_type": {
            "type": "string",
            "example": "public"
          }
        },
        "required": [
          "avatar_url",
          "events_url",
          "followers_url",
          "following_url",
          "gists_url",
          "gravatar_id",
          "html_url",
          "id",
          "node_id",
          "login",
          "organizations_url",
          "received_events_url",
          "repos_url",
          "site_admin",
          "starred_url",
          "subscriptions_url",
          "type",
          "url"
        ],
        "nullable": true
      },
      "resolution_comment": {
        "type": "string",
        "description": "An optional comment to resolve an alert.",
        "nullable": true
      },
      "secret_type": {
        "type": "string",
        "description": "The type of secret that secret scanning detected."
      },
      "secret_type_display_name": {
        "type": "string",
        "description": "User-friendly name for the detected secret, matching the `secret_type`.\nFor a list of built-in patterns, see \"[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets).\""
      },
      "secret": {
        "type": "string",
        "description": "The secret that was detected."
      },
      "push_protection_bypassed": {
        "type": "boolean",
        "description": "Whether push protection was bypassed for the detected secret.",
        "nullable": true
      },
      "push_protection_bypassed_by": {
        "title": "Simple User",
        "description": "A GitHub user.",
        "type": "object",
        "properties": {
          "name": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "login": {
            "type": "string",
            "example": "octocat"
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "node_id": {
            "type": "string",
            "example": "MDQ6VXNlcjE="
          },
          "avatar_url": {
            "type": "string",
            "format": "uri",
            "example": "https://github.com/images/error/octocat_happy.gif"
          },
          "gravatar_id": {
            "type": "string",
            "example": "41d064eb2195891e12d0413f63227ea7",
            "nullable": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat"
          },
          "html_url": {
            "type": "string",
            "format": "uri",
            "example": "https://github.com/octocat"
          },
          "followers_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/followers"
          },
          "following_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/following{/other_user}"
          },
          "gists_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/gists{/gist_id}"
          },
          "starred_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
          },
          "subscriptions_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/subscriptions"
          },
          "organizations_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/orgs"
          },
          "repos_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/repos"
          },
          "events_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/events{/privacy}"
          },
          "received_events_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/received_events"
          },
          "type": {
            "type": "string",
            "example": "User"
          },
          "site_admin": {
            "type": "boolean"
          },
          "starred_at": {
            "type": "string",
            "example": "\"2020-07-09T00:17:55Z\""
          },
          "user_view_type": {
            "type": "string",
            "example": "public"
          }
        },
        "required": [
          "avatar_url",
          "events_url",
          "followers_url",
          "following_url",
          "gists_url",
          "gravatar_id",
          "html_url",
          "id",
          "node_id",
          "login",
          "organizations_url",
          "received_events_url",
          "repos_url",
          "site_admin",
          "starred_url",
          "subscriptions_url",
          "type",
          "url"
        ],
        "nullable": true
      },
      "push_protection_bypassed_at": {
        "type": "string",
        "format": "date-time",
        "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
        "nullable": true
      },
      "push_protection_bypass_request_reviewer": {
        "title": "Simple User",
        "description": "A GitHub user.",
        "type": "object",
        "properties": {
          "name": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "login": {
            "type": "string",
            "example": "octocat"
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "node_id": {
            "type": "string",
            "example": "MDQ6VXNlcjE="
          },
          "avatar_url": {
            "type": "string",
            "format": "uri",
            "example": "https://github.com/images/error/octocat_happy.gif"
          },
          "gravatar_id": {
            "type": "string",
            "example": "41d064eb2195891e12d0413f63227ea7",
            "nullable": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat"
          },
          "html_url": {
            "type": "string",
            "format": "uri",
            "example": "https://github.com/octocat"
          },
          "followers_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/followers"
          },
          "following_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/following{/other_user}"
          },
          "gists_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/gists{/gist_id}"
          },
          "starred_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
          },
          "subscriptions_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/subscriptions"
          },
          "organizations_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/orgs"
          },
          "repos_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/repos"
          },
          "events_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/events{/privacy}"
          },
          "received_events_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/received_events"
          },
          "type": {
            "type": "string",
            "example": "User"
          },
          "site_admin": {
            "type": "boolean"
          },
          "starred_at": {
            "type": "string",
            "example": "\"2020-07-09T00:17:55Z\""
          },
          "user_view_type": {
            "type": "string",
            "example": "public"
          }
        },
        "required": [
          "avatar_url",
          "events_url",
          "followers_url",
          "following_url",
          "gists_url",
          "gravatar_id",
          "html_url",
          "id",
          "node_id",
          "login",
          "organizations_url",
          "received_events_url",
          "repos_url",
          "site_admin",
          "starred_url",
          "subscriptions_url",
          "type",
          "url"
        ],
        "nullable": true
      },
      "push_protection_bypass_request_reviewer_comment": {
        "type": "string",
        "description": "An optional comment when reviewing a push protection bypass.",
        "nullable": true
      },
      "push_protection_bypass_request_comment": {
        "type": "string",
        "description": "An optional comment when requesting a push protection bypass.",
        "nullable": true
      },
      "push_protection_bypass_request_html_url": {
        "type": "string",
        "format": "uri",
        "description": "The URL to a push protection bypass request.",
        "nullable": true
      },
      "validity": {
        "type": "string",
        "description": "The token status as of the latest validity check.",
        "enum": [
          "active",
          "inactive",
          "unknown"
        ]
      },
      "publicly_leaked": {
        "type": "boolean",
        "description": "Whether the detected secret was publicly leaked.",
        "nullable": true
      },
      "multi_repo": {
        "type": "boolean",
        "description": "Whether the detected secret was found in multiple repositories under the same organization or enterprise.",
        "nullable": true
      },
      "is_base64_encoded": {
        "type": "boolean",
        "description": "A boolean value representing whether or not alert is base64 encoded",
        "nullable": true
      },
      "first_location_detected": {
        "oneOf": [
          {
            "description": "Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository.",
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The file path in the repository",
                "example": "/example/secrets.txt"
              },
              "start_line": {
                "type": "number",
                "description": "Line number at which the secret starts in the file"
              },
              "end_line": {
                "type": "number",
                "description": "Line number at which the secret ends in the file"
              },
              "start_column": {
                "type": "number",
                "description": "The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII"
              },
              "end_column": {
                "type": "number",
                "description": "The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII"
              },
              "blob_sha": {
                "type": "string",
                "description": "SHA-1 hash ID of the associated blob",
                "example": "af5626b4a114abcb82d63db7c8082c3c4756e51b"
              },
              "blob_url": {
                "type": "string",
                "description": "The API URL to get the associated blob resource"
              },
              "commit_sha": {
                "type": "string",
                "description": "SHA-1 hash ID of the associated commit",
                "example": "af5626b4a114abcb82d63db7c8082c3c4756e51b"
              },
              "commit_url": {
                "type": "string",
                "description": "The API URL to get the associated commit resource"
              }
            },
            "required": [
              "path",
              "start_line",
              "end_line",
              "start_column",
              "end_column",
              "blob_sha",
              "blob_url",
              "commit_sha",
              "commit_url"
            ]
          },
          {
            "description": "Represents a 'wiki_commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository wiki.",
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The file path of the wiki page",
                "example": "/example/Home.md"
              },
              "start_line": {
                "type": "number",
                "description": "Line number at which the secret starts in the file"
              },
              "end_line": {
                "type": "number",
                "description": "Line number at which the secret ends in the file"
              },
              "start_column": {
                "type": "number",
                "description": "The column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII."
              },
              "end_column": {
                "type": "number",
                "description": "The column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII."
              },
              "blob_sha": {
                "type": "string",
                "description": "SHA-1 hash ID of the associated blob",
                "example": "af5626b4a114abcb82d63db7c8082c3c4756e51b"
              },
              "page_url": {
                "type": "string",
                "description": "The GitHub URL to get the associated wiki page",
                "example": "https://github.com/octocat/Hello-World/wiki/Home/302c0b7e200761c9dd9b57e57db540ee0b4293a5"
              },
              "commit_sha": {
                "type": "string",
                "description": "SHA-1 hash ID of the associated commit",
                "example": "302c0b7e200761c9dd9b57e57db540ee0b4293a5"
              },
              "commit_url": {
                "type": "string",
                "description": "The GitHub URL to get the associated wiki commit",
                "example": "https://github.com/octocat/Hello-World/wiki/_compare/302c0b7e200761c9dd9b57e57db540ee0b4293a5"
              }
            },
            "required": [
              "path",
              "start_line",
              "end_line",
              "start_column",
              "end_column",
              "blob_sha",
              "page_url",
              "commit_sha",
              "commit_url"
            ]
          },
          {
            "description": "Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue.",
            "type": "object",
            "properties": {
              "issue_title_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the issue where the secret was detected.",
                "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347"
              }
            },
            "required": [
              "issue_title_url"
            ]
          },
          {
            "description": "Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue.",
            "type": "object",
            "properties": {
              "issue_body_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the issue where the secret was detected.",
                "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347"
              }
            },
            "required": [
              "issue_body_url"
            ]
          },
          {
            "description": "Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue.",
            "type": "object",
            "properties": {
              "issue_comment_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the issue comment where the secret was detected.",
                "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451"
              }
            },
            "required": [
              "issue_comment_url"
            ]
          },
          {
            "description": "Represents a 'discussion_title' secret scanning location type. This location type shows that a secret was detected in the title of a discussion.",
            "type": "object",
            "properties": {
              "discussion_title_url": {
                "type": "string",
                "format": "uri",
                "description": "The URL to the discussion where the secret was detected.",
                "example": "https://github.com/community/community/discussions/39082"
              }
            },
            "required": [
              "discussion_title_url"
            ]
          },
          {
            "description": "Represents a 'discussion_body' secret scanning location type. This location type shows that a secret was detected in the body of a discussion.",
            "type": "object",
            "properties": {
              "discussion_body_url": {
                "type": "string",
                "format": "uri",
                "description": "The URL to the discussion where the secret was detected.",
                "example": "https://github.com/community/community/discussions/39082#discussion-4566270"
              }
            },
            "required": [
              "discussion_body_url"
            ]
          },
          {
            "description": "Represents a 'discussion_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a discussion.",
            "type": "object",
            "properties": {
              "discussion_comment_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the discussion comment where the secret was detected.",
                "example": "https://github.com/community/community/discussions/39082#discussioncomment-4158232"
              }
            },
            "required": [
              "discussion_comment_url"
            ]
          },
          {
            "description": "Represents a 'pull_request_title' secret scanning location type. This location type shows that a secret was detected in the title of a pull request.",
            "type": "object",
            "properties": {
              "pull_request_title_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the pull request where the secret was detected.",
                "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846"
              }
            },
            "required": [
              "pull_request_title_url"
            ]
          },
          {
            "description": "Represents a 'pull_request_body' secret scanning location type. This location type shows that a secret was detected in the body of a pull request.",
            "type": "object",
            "properties": {
              "pull_request_body_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the pull request where the secret was detected.",
                "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846"
              }
            },
            "required": [
              "pull_request_body_url"
            ]
          },
          {
            "description": "Represents a 'pull_request_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a pull request.",
            "type": "object",
            "properties": {
              "pull_request_comment_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the pull request comment where the secret was detected.",
                "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451"
              }
            },
            "required": [
              "pull_request_comment_url"
            ]
          },
          {
            "description": "Represents a 'pull_request_review' secret scanning location type. This location type shows that a secret was detected in a review on a pull request.",
            "type": "object",
            "properties": {
              "pull_request_review_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the pull request review where the secret was detected.",
                "example": "https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80"
              }
            },
            "required": [
              "pull_request_review_url"
            ]
          },
          {
            "description": "Represents a 'pull_request_review_comment' secret scanning location type. This location type shows that a secret was detected in a review comment on a pull request.",
            "type": "object",
            "properties": {
              "pull_request_review_comment_url": {
                "type": "string",
                "format": "uri",
                "description": "The API URL to get the pull request review comment where the secret was detected.",
                "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/12"
              }
            },
            "required": [
              "pull_request_review_comment_url"
            ]
          }
        ],
        "description": "Details on the location where the token was initially detected. This can be a commit, wiki commit, issue, discussion, pull request.\n",
        "nullable": true
      },
      "has_more_locations": {
        "type": "boolean",
        "description": "A boolean value representing whether or not the token in the alert was detected in more than one location."
      },
      "assigned_to": {
        "title": "Simple User",
        "description": "A GitHub user.",
        "type": "object",
        "properties": {
          "name": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "login": {
            "type": "string",
            "example": "octocat"
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "node_id": {
            "type": "string",
            "example": "MDQ6VXNlcjE="
          },
          "avatar_url": {
            "type": "string",
            "format": "uri",
            "example": "https://github.com/images/error/octocat_happy.gif"
          },
          "gravatar_id": {
            "type": "string",
            "example": "41d064eb2195891e12d0413f63227ea7",
            "nullable": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat"
          },
          "html_url": {
            "type": "string",
            "format": "uri",
            "example": "https://github.com/octocat"
          },
          "followers_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/followers"
          },
          "following_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/following{/other_user}"
          },
          "gists_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/gists{/gist_id}"
          },
          "starred_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
          },
          "subscriptions_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/subscriptions"
          },
          "organizations_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/orgs"
          },
          "repos_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/repos"
          },
          "events_url": {
            "type": "string",
            "example": "https://api.github.com/users/octocat/events{/privacy}"
          },
          "received_events_url": {
            "type": "string",
            "format": "uri",
            "example": "https://api.github.com/users/octocat/received_events"
          },
          "type": {
            "type": "string",
            "example": "User"
          },
          "site_admin": {
            "type": "boolean"
          },
          "starred_at": {
            "type": "string",
            "example": "\"2020-07-09T00:17:55Z\""
          },
          "user_view_type": {
            "type": "string",
            "example": "public"
          }
        },
        "required": [
          "avatar_url",
          "events_url",
          "followers_url",
          "following_url",
          "gists_url",
          "gravatar_id",
          "html_url",
          "id",
          "node_id",
          "login",
          "organizations_url",
          "received_events_url",
          "repos_url",
          "site_admin",
          "starred_url",
          "subscriptions_url",
          "type",
          "url"
        ],
        "nullable": true
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('github')

# Call this tool
result = await agent.call_tool('secretScanningListAlertsForRepo', {
    # Add required parameters here
})