Skip to content

Commit 9f1d392

Browse files
author
Marc-Andre Giroux
authored
Merge pull request #110 from github/openapi-update-2f6fd99e1543c14fedba51dcefd83159bf61829718f507ef835ae3858623639e
Updating OpenAPI descriptions
2 parents 3c1e5fd + 015ac73 commit 9f1d392

28 files changed

+2568
-80
lines changed

descriptions/api.github.com/api.github.com.json

+395-15
Large diffs are not rendered by default.

descriptions/api.github.com/api.github.com.yaml

+290-15
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ tags:
6464
description: Provisioning of GitHub organization membership for SCIM-enabled providers.
6565
- name: search
6666
description: Look for stuff on GitHub.
67+
- name: secret-scanning
68+
description: Retrieve secret scanning alerts from a repository.
6769
- name: teams
6870
description: Interact with GitHub Teams.
6971
- name: users
@@ -26249,6 +26251,148 @@ paths:
2624926251
previews: []
2625026252
category: repos
2625126253
subcategory: releases
26254+
"/repos/{owner}/{repo}/secret-scanning/alerts":
26255+
get:
26256+
summary: List secret scanning alerts for a repository
26257+
description: |-
26258+
Lists all secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
26259+
26260+
GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
26261+
tags:
26262+
- secret-scanning
26263+
operationId: secret-scanning/list-alerts-for-repo
26264+
externalDocs:
26265+
description: API method documentation
26266+
url: https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository
26267+
parameters:
26268+
- "$ref": "#/components/parameters/owner"
26269+
- "$ref": "#/components/parameters/repo"
26270+
- name: state
26271+
in: query
26272+
description: Set to `open` or `resolved` to only list secret scanning alerts
26273+
in a specific state.
26274+
required: false
26275+
schema:
26276+
type: string
26277+
enum:
26278+
- open
26279+
- resolved
26280+
- "$ref": "#/components/parameters/page"
26281+
- "$ref": "#/components/parameters/per_page"
26282+
responses:
26283+
'200':
26284+
description: Response
26285+
content:
26286+
application/json:
26287+
schema:
26288+
type: array
26289+
items:
26290+
"$ref": "#/components/schemas/secret-scanning-alert"
26291+
examples:
26292+
default:
26293+
"$ref": "#/components/examples/secret-scanning-alert-list"
26294+
'404':
26295+
description: Repository is public or secret scanning is disabled for the
26296+
repository
26297+
'503':
26298+
"$ref": "#/components/responses/service_unavailable"
26299+
x-github:
26300+
githubCloudOnly: false
26301+
enabledForGitHubApps: true
26302+
previews: []
26303+
category: secret-scanning
26304+
subcategory:
26305+
"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}":
26306+
get:
26307+
summary: Get a secret scanning alert
26308+
description: |-
26309+
Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
26310+
26311+
GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
26312+
tags:
26313+
- secret-scanning
26314+
operationId: secret-scanning/get-alert
26315+
externalDocs:
26316+
description: API method documentation
26317+
url: https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert
26318+
parameters:
26319+
- "$ref": "#/components/parameters/owner"
26320+
- "$ref": "#/components/parameters/repo"
26321+
- "$ref": "#/components/parameters/alert_number"
26322+
responses:
26323+
'200':
26324+
description: Default response
26325+
content:
26326+
application/json:
26327+
schema:
26328+
"$ref": "#/components/schemas/secret-scanning-alert"
26329+
examples:
26330+
default:
26331+
"$ref": "#/components/examples/secret-scanning-alert-open"
26332+
'404':
26333+
description: Repository is public, or secret scanning is disabled for the
26334+
repository, or the resource is not found
26335+
'503':
26336+
"$ref": "#/components/responses/service_unavailable"
26337+
x-github:
26338+
githubCloudOnly: false
26339+
enabledForGitHubApps: true
26340+
previews: []
26341+
category: secret-scanning
26342+
subcategory:
26343+
patch:
26344+
summary: Update a secret scanning alert
26345+
description: |-
26346+
Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.
26347+
26348+
GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint.
26349+
operationId: secret-scanning/update-alert
26350+
tags:
26351+
- secret-scanning
26352+
externalDocs:
26353+
description: API method documentation
26354+
url: https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert
26355+
parameters:
26356+
- "$ref": "#/components/parameters/owner"
26357+
- "$ref": "#/components/parameters/repo"
26358+
- "$ref": "#/components/parameters/alert_number"
26359+
requestBody:
26360+
content:
26361+
application/json:
26362+
schema:
26363+
type: object
26364+
properties:
26365+
state:
26366+
"$ref": "#/components/schemas/secret-scanning-alert-state"
26367+
resolution:
26368+
"$ref": "#/components/schemas/secret-scanning-alert-resolution"
26369+
required:
26370+
- state
26371+
example:
26372+
state: resolved
26373+
resolution: false_positive
26374+
responses:
26375+
'200':
26376+
description: Default response
26377+
content:
26378+
application/json:
26379+
schema:
26380+
"$ref": "#/components/schemas/secret-scanning-alert"
26381+
examples:
26382+
default:
26383+
"$ref": "#/components/examples/secret-scanning-alert-resolved"
26384+
'404':
26385+
description: Repository is public, or secret scanning is disabled for the
26386+
repository, or the resource is not found
26387+
'422':
26388+
description: State does not match the resolution
26389+
'503':
26390+
"$ref": "#/components/responses/service_unavailable"
26391+
x-github:
26392+
enabledForGitHubApps: true
26393+
githubCloudOnly: false
26394+
previews: []
26395+
category: secret-scanning
2625226396
"/repos/{owner}/{repo}/stargazers":
2625326397
get:
2625426398
summary: List stargazers
@@ -41892,24 +42036,24 @@ components:
4189242036
code-scanning-alert-ref:
4189342037
type: string
4189442038
description: The full Git reference, formatted as `refs/heads/<branch name>`.
41895-
code-scanning-alert-number:
42039+
alert-number:
4189642040
type: integer
41897-
description: The code scanning alert number.
42041+
description: The security alert number.
4189842042
readOnly: true
4189942043
nullable: false
41900-
code-scanning-alert-created-at:
42044+
alert-created-at:
4190142045
type: string
4190242046
description: 'The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.'
4190342047
format: date-time
4190442048
readOnly: true
4190542049
nullable: false
41906-
code-scanning-alert-url:
42050+
alert-url:
4190742051
type: string
4190842052
description: The REST API URL of the alert resource.
4190942053
format: uri
4191042054
readOnly: true
4191142055
nullable: false
41912-
code-scanning-alert-html-url:
42056+
alert-html-url:
4191342057
type: string
4191442058
description: The GitHub URL of the alert resource.
4191542059
format: uri
@@ -41970,13 +42114,13 @@ components:
4197042114
type: object
4197142115
properties:
4197242116
number:
41973-
"$ref": "#/components/schemas/code-scanning-alert-number"
42117+
"$ref": "#/components/schemas/alert-number"
4197442118
created_at:
41975-
"$ref": "#/components/schemas/code-scanning-alert-created-at"
42119+
"$ref": "#/components/schemas/alert-created-at"
4197642120
url:
41977-
"$ref": "#/components/schemas/code-scanning-alert-url"
42121+
"$ref": "#/components/schemas/alert-url"
4197842122
html_url:
41979-
"$ref": "#/components/schemas/code-scanning-alert-html-url"
42123+
"$ref": "#/components/schemas/alert-html-url"
4198042124
state:
4198142125
"$ref": "#/components/schemas/code-scanning-alert-state"
4198242126
dismissed_by:
@@ -42019,13 +42163,13 @@ components:
4201942163
type: object
4202042164
properties:
4202142165
number:
42022-
"$ref": "#/components/schemas/code-scanning-alert-number"
42166+
"$ref": "#/components/schemas/alert-number"
4202342167
created_at:
42024-
"$ref": "#/components/schemas/code-scanning-alert-created-at"
42168+
"$ref": "#/components/schemas/alert-created-at"
4202542169
url:
42026-
"$ref": "#/components/schemas/code-scanning-alert-url"
42170+
"$ref": "#/components/schemas/alert-url"
4202742171
html_url:
42028-
"$ref": "#/components/schemas/code-scanning-alert-html-url"
42172+
"$ref": "#/components/schemas/alert-html-url"
4202942173
instances:
4203042174
"$ref": "#/components/schemas/code-scanning-alert-instances"
4203142175
state:
@@ -46397,6 +46541,54 @@ components:
4639746541
- target_commitish
4639846542
- assets
4639946543
- url
46544+
secret-scanning-alert-state:
46545+
description: Sets the state of the secret scanning alert. Can be either `open`
46546+
or `resolved`. You must provide `resolution` when you set the state to `resolved`.
46547+
type: string
46548+
enum:
46549+
- open
46550+
- resolved
46551+
secret-scanning-alert-resolution:
46552+
type: string
46553+
description: "**Required when the `state` is `resolved`.** The reason for resolving
46554+
the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`."
46555+
nullable: true
46556+
oneOf:
46557+
- enum:
46558+
- false_positive
46559+
- wont_fix
46560+
- revoked
46561+
- used_in_tests
46562+
- enum:
46563+
-
46564+
secret-scanning-alert:
46565+
type: object
46566+
properties:
46567+
number:
46568+
"$ref": "#/components/schemas/alert-number"
46569+
created_at:
46570+
"$ref": "#/components/schemas/alert-created-at"
46571+
url:
46572+
"$ref": "#/components/schemas/alert-url"
46573+
html_url:
46574+
"$ref": "#/components/schemas/alert-html-url"
46575+
state:
46576+
"$ref": "#/components/schemas/secret-scanning-alert-state"
46577+
resolution:
46578+
"$ref": "#/components/schemas/secret-scanning-alert-resolution"
46579+
resolved_at:
46580+
type: string
46581+
format: date-time
46582+
description: 'The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.'
46583+
nullable: true
46584+
resolved_by:
46585+
"$ref": "#/components/schemas/simple-user"
46586+
secret_type:
46587+
type: string
46588+
description: The type of secret that secret scanning detected.
46589+
secret:
46590+
type: string
46591+
description: The secret that was detected.
4640046592
stargazer:
4640146593
title: Stargazer
4640246594
description: Stargazer
@@ -60765,6 +60957,88 @@ components:
6076560957
received_events_url: https://api.github.com/users/octocat/received_events
6076660958
type: User
6076760959
site_admin: false
60960+
secret-scanning-alert-list:
60961+
value:
60962+
- number: 2
60963+
created_at: '2020-11-06T18:48:51Z'
60964+
url: https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/2
60965+
html_url: https://github.com/owner/private-repo/security/secret-scanning/2
60966+
state: resolved
60967+
resolution: false_positive
60968+
resolved_at: '2020-11-07T02:47:13Z'
60969+
resolved_by:
60970+
login: monalisa
60971+
id: 2
60972+
node_id: MDQ6VXNlcjI=
60973+
avatar_url: https://alambic.github.com/avatars/u/2?
60974+
gravatar_id: ''
60975+
url: https://api.github.com/users/monalisa
60976+
html_url: https://github.com/monalisa
60977+
followers_url: https://api.github.com/users/monalisa/followers
60978+
following_url: https://api.github.com/users/monalisa/following{/other_user}
60979+
gists_url: https://api.github.com/users/monalisa/gists{/gist_id}
60980+
starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo}
60981+
subscriptions_url: https://api.github.com/users/monalisa/subscriptions
60982+
organizations_url: https://api.github.com/users/monalisa/orgs
60983+
repos_url: https://api.github.com/users/monalisa/repos
60984+
events_url: https://api.github.com/users/monalisa/events{/privacy}
60985+
received_events_url: https://api.github.com/users/monalisa/received_events
60986+
type: User
60987+
site_admin: true
60988+
secret_type: adafruit_io_key
60989+
secret: aio_XXXXXXXXXXXXXXXXXXXXXXXXXXXX
60990+
- number: 1
60991+
created_at: '2020-11-06T18:18:30Z'
60992+
url: https://api.github.com/repos/owner/repo/secret-scanning/alerts/1
60993+
html_url: https://github.com/owner/repo/security/secret-scanning/1
60994+
state: open
60995+
resolution:
60996+
resolved_at:
60997+
resolved_by:
60998+
secret_type: mailchimp_api_key
60999+
secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2
61000+
secret-scanning-alert-open:
61001+
value:
61002+
number: 42
61003+
created_at: '2020-11-06T18:18:30Z'
61004+
url: https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42
61005+
html_url: https://github.com/owner/private-repo/security/secret-scanning/42
61006+
state: open
61007+
resolution:
61008+
resolved_at:
61009+
resolved_by:
61010+
secret_type: mailchimp_api_key
61011+
secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2
61012+
secret-scanning-alert-resolved:
61013+
value:
61014+
number: 42
61015+
created_at: '2020-11-06T18:18:30Z'
61016+
url: https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42
61017+
html_url: https://github.com/owner/private-repo/security/secret-scanning/42
61018+
state: resolved
61019+
resolution: used_in_tests
61020+
resolved_at: '2020-11-16T22:42:07Z'
61021+
resolved_by:
61022+
login: monalisa
61023+
id: 2
61024+
node_id: MDQ6VXNlcjI=
61025+
avatar_url: https://alambic.github.com/avatars/u/2?
61026+
gravatar_id: ''
61027+
url: https://api.github.com/users/monalisa
61028+
html_url: https://github.com/monalisa
61029+
followers_url: https://api.github.com/users/monalisa/followers
61030+
following_url: https://api.github.com/users/monalisa/following{/other_user}
61031+
gists_url: https://api.github.com/users/monalisa/gists{/gist_id}
61032+
starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo}
61033+
subscriptions_url: https://api.github.com/users/monalisa/subscriptions
61034+
organizations_url: https://api.github.com/users/monalisa/orgs
61035+
repos_url: https://api.github.com/users/monalisa/repos
61036+
events_url: https://api.github.com/users/monalisa/events{/privacy}
61037+
received_events_url: https://api.github.com/users/monalisa/received_events
61038+
type: User
61039+
site_admin: true
61040+
secret_type: mailchimp_api_key
61041+
secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2
6076861042
simple-user-items-default-response:
6076961043
summary: Default response
6077061044
value:
@@ -64237,10 +64511,11 @@ components:
6423764511
alert_number:
6423864512
name: alert_number
6423964513
in: path
64240-
description: The code scanning alert number.
64514+
description: The security alert number, found at the end of the security alert's
64515+
URL.
6424164516
required: true
6424264517
schema:
64243-
"$ref": "#/components/schemas/code-scanning-alert-number"
64518+
"$ref": "#/components/schemas/alert-number"
6424464519
commit_sha:
6424564520
name: commit_sha
6424664521
description: commit_sha+ parameter

0 commit comments

Comments
 (0)