GitHub Secret-Scanning API

Retrieve secret scanning alerts from a repository.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-secret-scanning-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: GitHub v3 REST Secret Scanning API
  description: GitHub's v3 REST API.
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Secret-Scanning
  description: Retrieve secret scanning alerts from a repository.
paths:
  /enterprises/{enterprise}/secret-scanning/alerts:
    get:
      summary: GitHub List Secret Scanning Alerts for an Enterprise
      description: 'Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.

        To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).'
      tags:
      - Secret-Scanning
      operationId: secret-scanning/list-alerts-for-enterprise
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise
      parameters:
      - $ref: '#/components/parameters/enterprise'
      - $ref: '#/components/parameters/secret-scanning-alert-state'
      - $ref: '#/components/parameters/secret-scanning-alert-secret-type'
      - $ref: '#/components/parameters/secret-scanning-alert-resolution'
      - $ref: '#/components/parameters/secret-scanning-alert-sort'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/pagination-before'
      - $ref: '#/components/parameters/pagination-after'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/organization-secret-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/organization-secret-scanning-alert-list'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '404':
          $ref: '#/components/responses/not_found'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: secret-scanning
        subcategory: secret-scanning
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/secret-scanning/alerts:
    get:
      summary: GitHub List Secret Scanning Alerts for an Organization
      description: '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.'
      tags:
      - Secret-Scanning
      operationId: secret-scanning/list-alerts-for-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/secret-scanning-alert-state'
      - $ref: '#/components/parameters/secret-scanning-alert-secret-type'
      - $ref: '#/components/parameters/secret-scanning-alert-resolution'
      - $ref: '#/components/parameters/secret-scanning-alert-sort'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/secret-scanning-pagination-before-org-repo'
      - $ref: '#/components/parameters/secret-scanning-pagination-after-org-repo'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/organization-secret-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/organization-secret-scanning-alert-list'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '404':
          $ref: '#/components/responses/not_found'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: secret-scanning
        subcategory: secret-scanning
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/secret-scanning/alerts:
    get:
      summary: GitHub List Secret Scanning Alerts for a Repository
      description: '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.'
      tags:
      - Secret-Scanning
      operationId: secret-scanning/list-alerts-for-repo
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/secret-scanning-alert-state'
      - $ref: '#/components/parameters/secret-scanning-alert-secret-type'
      - $ref: '#/components/parameters/secret-scanning-alert-resolution'
      - $ref: '#/components/parameters/secret-scanning-alert-sort'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/secret-scanning-pagination-before-org-repo'
      - $ref: '#/components/parameters/secret-scanning-pagination-after-org-repo'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/secret-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/secret-scanning-alert-list'
        '404':
          description: Repository is public or secret scanning is disabled for the repository
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: secret-scanning
        subcategory: secret-scanning
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}:
    get:
      summary: GitHub Get a Secret Scanning Alert
      description: '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.'
      tags:
      - Secret-Scanning
      operationId: secret-scanning/get-alert
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#get-a-secret-scanning-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/alert-number'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secret-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/secret-scanning-alert-open'
        '304':
          $ref: '#/components/responses/not_modified'
        '404':
          description: Repository is public, or secret scanning is disabled for the repository, or the resource is not found
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: secret-scanning
        subcategory: secret-scanning
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update a Secret Scanning Alert
      description: '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.'
      operationId: secret-scanning/update-alert
      tags:
      - Secret-Scanning
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#update-a-secret-scanning-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/alert-number'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  $ref: '#/components/schemas/secret-scanning-alert-state'
                resolution:
                  $ref: '#/components/schemas/secret-scanning-alert-resolution'
                resolution_comment:
                  $ref: '#/components/schemas/secret-scanning-alert-resolution-comment'
              required:
              - state
            examples:
              default:
                value:
                  state: resolved
                  resolution: false_positive
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secret-scanning-alert'
              examples:
                default:
                  $ref: '#/components/examples/secret-scanning-alert-resolved'
        '400':
          description: Bad request, resolution comment is invalid or the resolution was not changed.
        '404':
          description: Repository is public, or secret scanning is disabled for the repository, or the resource is not found
        '422':
          description: State does not match the resolution or resolution comment
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        enabledForGitHubApps: true
        githubCloudOnly: false
        category: secret-scanning
        subcategory: secret-scanning
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations:
    get:
      summary: GitHub List Locations for a Secret Scanning Alert
      description: '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.'
      tags:
      - Secret-Scanning
      operationId: secret-scanning/list-locations-for-alert
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/secret-scanning/secret-scanning#list-locations-for-a-secret-scanning-alert
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/alert-number'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                description: List of locations where the secret was detected
                items:
                  $ref: '#/components/schemas/secret-scanning-location'
              examples:
                default:
                  $ref: '#/components/examples/secret-scanning-location-list'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '404':
          description: Repository is public, or secret scanning is disabled for the repository, or the resource is not found
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: secret-scanning
        subcategory: secret-scanning
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    secret-scanning-alert-secret-type:
      name: secret_type
      in: query
      description: 'A comma-separated list of secret types to return. By default all secret types are returned.

        See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.9/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)"

        for a complete list of secret types.'
      required: false
      schema:
        type: string
    alert-number:
      name: alert_number
      in: path
      description: The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation.
      required: true
      schema:
        $ref: '#/components/schemas/alert-number'
    per-page:
      name: 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/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 30
    direction:
      name: direction
      description: The direction to sort the results by.
      in: query
      required: false
      schema:
        type: string
        enum:
        - asc
        - desc
        default: desc
    pagination-before:
      name: before
      description: A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.9/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      required: false
      schema:
        type: string
    secret-scanning-alert-resolution:
      name: resolution
      in: query
      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
      schema:
        type: string
    secret-scanning-alert-sort:
      name: 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.
      in: query
      required: false
      schema:
        type: string
        enum:
        - created
        - updated
        default: created
    pagination-after:
      name: after
      description: A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.9/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      required: false
      schema:
        type: string
    org:
      name: org
      description: The organization name. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    repo:
      name: repo
      description: The name of the repository without the `.git` extension. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    secret-scanning-pagination-before-org-repo:
      name: before
      description: A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.9/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.
      in: query
      required: false
      schema:
        type: string
    secret-scanning-pagination-after-org-repo:
      name: after
      description: A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.9/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.
      in: query
      required: false
      schema:
        type: string
    page:
      name: page
      description: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 1
    secret-scanning-alert-state:
      name: state
      in: query
      description: Set to `open` or `resolved` to only list secret scanning alerts in a specific state.
      required: false
      schema:
        type: string
        enum:
        - open
        - resolved
    enterprise:
      name: enterprise
      description: The slug version of the enterprise name. You can also substitute this value with the enterprise id.
      in: path
      required: true
      schema:
        type: string
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
  schemas:
    secret-scanning-alert-resolution:
      type:
      - string
      - 'null'
      description: '**Required when the `state` is `resolved`.** The reason for resolving the alert.'
      enum:
      - false_positive
      - wont_fix
      - revoked
      - used_in_tests
    alert-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
    secret-scanning-location:
      type: object
      properties:
        type:
          type: string
          enum:
          - commit
          - issue_title
          - issue_body
          - issue_comment
          - discussion_title
          - discussion_body
          - discussion_comment
          - pull_request_title
          - pull_request_body
          - pull_request_comment
          - pull_request_review
          - pull_request_review_comment
          description: The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found.
          example: commit
        details:
          oneOf:
          - $ref: '#/components/schemas/secret-scanning-location-commit'
          - $ref: '#/components/schemas/secret-scanning-location-issue-title'
          - $ref: '#/components/schemas/secret-scanning-location-issue-body'
          - $ref: '#/components/schemas/secret-scanning-location-issue-comment'
          - $ref: '#/components/schemas/secret-scanning-location-discussion-title'
          - $ref: '#/components/schemas/secret-scanning-location-discussion-body'
          - $ref: '#/components/schemas/secret-scanning-location-discussion-comment'
          - $ref: '#/components/schemas/secret-scanning-location-pull-request-title'
          - $ref: '#/components/schemas/secret-scanning-location-pull-request-body'
          - $ref: '#/components/schemas/secret-scanning-location-pull-request-comment'
          - $ref: '#/components/schemas/secret-scanning-location-pull-request-review'
          - $ref: '#/components/schemas/secret-scanning-location-pull-request-review-comment'
          example: example_value
      required:
      - type
      - details
    alert-html-url:
      type: string
      description: The GitHub URL of the alert resource.
      format: uri
      readOnly: true
    secret-scanning-alert-resolution-comment:
      description: An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`.
      type:
      - string
      - 'null'
    secret-scanning-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
    secret-scanning-location-discussion-body:
      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
    secret-scanning-location-issue-body:
      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
    simple-user:
      title: Simple User
      description: A GitHub user.
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
          example: octocat
        email:
          type:
          - string
          - 'null'
          example: octocat@github.com
        login:
          type: string
          example: octocat
        id:
          type: integer
          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
          - 'null'
          example: 41d064eb2195891e12d0413f63227ea7
        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
          example: true
        starred_at:
          type: string
          example: '"2020-07-09T00:17:55Z"'
      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
    organization-secret-scanning-alert:
      type: object
      properties:
        number:
          $ref: '#/components/schemas/alert-number'
        created_at:
          $ref: '#/components/schemas/alert-created-at'
        updated_at:
          $ref: '#/components/schemas/nullable-alert-updated-at'
        url:
          $ref: '#/components/schemas/alert-url'
        html_url:
          $ref: '#/components/schemas/alert-html-url'
        locations_url:
          type: string
          format: uri
          description: The REST API URL of the code locations for this alert.
          example: https://api.github.com/repos/octocat/Hello-World
        state:
          $ref: '#/components/schemas/secret-scanning-alert-state'
        resolution:
          $ref: '#/components/schemas/secret-scanning-alert-resolution'
        resolved_at:
          type:
          - string
          - 'null'
          format: date-time
          description: 'The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.'
          example: '2026-04-17T12:00:00Z'
        resolved_by:
          $ref: '#/components/schemas/nullable-simple-user'
        secret_type:
          type: string
          description: The type of secret that secret scanning detected.
          example: User
        secret_type_display_name:
          type: string
          description: 'User-friendly name for the detected secret, matching the `secret_type`.

            For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.9/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)."'
          example: octocat
        secret:
          type: string
          description: The secret that was detected.
          example: example_value
        repository:
          $ref: '#/components/schemas/simple-repository'
        push_protection_bypassed:
          type:
          - boolean
          - 'null'
          description: Whether push protection was bypassed for the detected secret.
          example: true
        push_protection_bypassed_by:
          $ref: '#/components/schemas/nullable-simple-user'
        push_protection_bypassed_at:
          type:
          - string
          - 'null'
          format: date-time
          description: 'The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.'
          example: '2026-04-17T12:00:00Z'
        resolution_comment:
          type:
          - string
          - 'null'
          description: The comment that was optionally added when this alert was closed
          example: example_value
    secret-scanning-location-issue-comment:
      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
    secret-scanning-location-pull-request-body:
      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/pull/2846
      required:
      - pull_request_body_url
    simple-repository:
      title: Simple Repository
      description: A GitHub repository.
      type: object
      properties:
        id:
          type: integer
          example: 1296269
          description: A unique identifier of the repository.
        node_id:
          type: string
          example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5
          description: The GraphQL identifier of the repository.
        name:
          type: string
          example: Hello-World
          description: The name of the repository.
        full_name:
          type: string
          example: octocat/Hello-World
          description: The full, globally unique, name of the repository.
        owner:
          $ref: '#/components/schemas/simple-user'
        private:
          type: boolean
          description: Whether the repository is private.
          example: true
        html_url:
          type: string
          format: uri
          example: https://github.com/octocat/Hello-World
          description: The URL to view the repository on GitHub.com.
        description:
          type:
          - string
          - 'null'
          example: This your first repo!
          description: The repository description.
        fork:
          type: boolean
          description: Whether the repository is a fork.
          example: true
        url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
          description: The URL to get more information about the repository from the GitHub API.
        archive_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}
          description: A template for the API URL to download the repository as an archive.
        assignees_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World/assignees{/user}
          description: A template for the API URL to list the available assignees for issues in the repository.
        blobs_url:
          type: string
          example

# --- truncated at 32 KB (73 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-secret-scanning-api-openapi.yml