1
0
mirror of synced 2025-12-23 21:07:12 -05:00

Merge pull request #9255 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2021-08-24 07:08:48 +10:00
committed by GitHub
2 changed files with 488 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -51004,6 +51004,381 @@
}
}
},
"/organizations/:organization_id/secret-scanning/alerts": {
"get": {
"summary": "Lists secret scanning alerts by organization",
"description": "Lists all secret scanning alerts for all eligible repositories in an organization, from newest to oldest.\nTo 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.\n\nGitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.",
"tags": [
"secret-scanning"
],
"operationId": "secret-scanning/list-alerts-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-by-organization"
},
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"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"
]
}
},
{
"name": "secret_type",
"in": "query",
"description": "A comma separated list of secret types to return. By default all secret types are returned.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "page",
"description": "Page number of the results to fetch.",
"in": "query",
"schema": {
"type": "integer",
"default": 1
}
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"number": {
"type": "integer",
"description": "The security alert number.",
"readOnly": true,
"nullable": false
},
"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,
"nullable": false
},
"url": {
"type": "string",
"description": "The REST API URL of the alert resource.",
"format": "uri",
"readOnly": true,
"nullable": false
},
"html_url": {
"type": "string",
"description": "The GitHub URL of the alert resource.",
"format": "uri",
"readOnly": true,
"nullable": false
},
"state": {
"description": "Sets the state of the secret scanning alert. Can be either `open` or `resolved`. 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. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`.",
"nullable": true,
"enum": [
null,
"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": "Simple User",
"type": "object",
"properties": {
"name": {
"nullable": true,
"type": "string"
},
"email": {
"nullable": true,
"type": "string"
},
"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",
"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\""
}
},
"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
},
"secret_type": {
"type": "string",
"description": "The type of secret that secret scanning detected."
},
"secret": {
"type": "string",
"description": "The secret that was detected."
}
}
}
},
"examples": {
"default": {
"value": [
{
"number": 2,
"created_at": "2020-11-06T18:48:51Z",
"url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/2",
"html_url": "https://github.com/owner/private-repo/security/secret-scanning/2",
"state": "resolved",
"resolution": "false_positive",
"resolved_at": "2020-11-07T02:47:13Z",
"resolved_by": {
"login": "monalisa",
"id": 2,
"node_id": "MDQ6VXNlcjI=",
"avatar_url": "https://alambic.github.com/avatars/u/2?",
"gravatar_id": "",
"url": "https://api.github.com/users/monalisa",
"html_url": "https://github.com/monalisa",
"followers_url": "https://api.github.com/users/monalisa/followers",
"following_url": "https://api.github.com/users/monalisa/following{/other_user}",
"gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}",
"starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/monalisa/subscriptions",
"organizations_url": "https://api.github.com/users/monalisa/orgs",
"repos_url": "https://api.github.com/users/monalisa/repos",
"events_url": "https://api.github.com/users/monalisa/events{/privacy}",
"received_events_url": "https://api.github.com/users/monalisa/received_events",
"type": "User",
"site_admin": true
},
"secret_type": "adafruit_io_key",
"secret": "aio_XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
{
"number": 1,
"created_at": "2020-11-06T18:18:30Z",
"url": "https://api.github.com/repos/owner/repo/secret-scanning/alerts/1",
"html_url": "https://github.com/owner/repo/security/secret-scanning/1",
"state": "open",
"resolution": null,
"resolved_at": null,
"resolved_by": null,
"secret_type": "mailchimp_api_key",
"secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2"
}
]
}
}
}
},
"headers": {
"Link": {
"example": "<https://api.github.com/resource?page=2>; rel=\"next\", <https://api.github.com/resource?page=5>; rel=\"last\"",
"schema": {
"type": "string"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"title": "Basic Error",
"description": "Basic Error",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"url": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}
},
"503": {
"description": "Service unavailable",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
}
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
],
"category": "secret-scanning",
"subcategory": null
}
}
},
"/orgs/{org}": {
"get": {
"summary": "Get an organization",