mirror of
https://github.com/jlengrand/jetbrains-client-api-repository.git
synced 2026-03-10 08:31:24 +00:00
117 lines
3.4 KiB
HTTP
117 lines
3.4 KiB
HTTP
## SecurityAdvisoriesApi
|
|
|
|
### Create a temporary private fork
|
|
## Create a temporary private fork
|
|
POST https://api.github.com/repos/{{owner}}/{{repo}}/security-advisories/{{ghsa_id}}/forks
|
|
Accept: application/json
|
|
Accept: application/scim+json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
### Privately report a security vulnerability
|
|
## Privately report a security vulnerability
|
|
POST https://api.github.com/repos/{{owner}}/{{repo}}/security-advisories/reports
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
{
|
|
"summary" : "A newly discovered vulnerability",
|
|
"description" : "A more in-depth description of what the problem is.",
|
|
"severity" : "high",
|
|
"vulnerabilities" : [ {
|
|
"package" : {
|
|
"name" : "a-package",
|
|
"ecosystem" : "npm"
|
|
},
|
|
"vulnerable_version_range" : "< 1.0.0",
|
|
"patched_versions" : "1.0.0",
|
|
"vulnerable_functions" : [ "important_function" ]
|
|
} ],
|
|
"cwe_ids" : [ "CWE-123" ]
|
|
}
|
|
|
|
|
|
### Create a repository security advisory
|
|
## Create a repository security advisory
|
|
POST https://api.github.com/repos/{{owner}}/{{repo}}/security-advisories
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
{
|
|
"summary" : "A new important advisory",
|
|
"description" : "A more in-depth description of what the problem is.",
|
|
"severity" : "high",
|
|
"cve_id" : null,
|
|
"vulnerabilities" : [ {
|
|
"package" : {
|
|
"name" : "a-package",
|
|
"ecosystem" : "npm"
|
|
},
|
|
"vulnerable_version_range" : "< 1.0.0",
|
|
"patched_versions" : "1.0.0",
|
|
"vulnerable_functions" : [ "important_function" ]
|
|
} ],
|
|
"cwe_ids" : [ "CWE-1101", "CWE-20" ],
|
|
"credits" : [ {
|
|
"login" : "monalisa",
|
|
"type" : "reporter"
|
|
}, {
|
|
"login" : "octocat",
|
|
"type" : "analyst"
|
|
} ]
|
|
}
|
|
|
|
|
|
### Request a CVE for a repository security advisory
|
|
## Request a CVE for a repository security advisory
|
|
POST https://api.github.com/repos/{{owner}}/{{repo}}/security-advisories/{{ghsa_id}}/cve
|
|
Accept: application/json
|
|
Accept: application/scim+json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
### Get a global security advisory
|
|
## Get a global security advisory
|
|
GET https://api.github.com/advisories/{{ghsa_id}}
|
|
Accept: application/json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
### Get a repository security advisory
|
|
## Get a repository security advisory
|
|
GET https://api.github.com/repos/{{owner}}/{{repo}}/security-advisories/{{ghsa_id}}
|
|
Accept: application/json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
### List global security advisories
|
|
## List global security advisories
|
|
GET https://api.github.com/advisories
|
|
Accept: application/json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
### List repository security advisories for an organization
|
|
## List repository security advisories for an organization
|
|
GET https://api.github.com/orgs/{{org}}/security-advisories
|
|
Accept: application/json
|
|
Accept: application/scim+json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
### List repository security advisories
|
|
## List repository security advisories
|
|
GET https://api.github.com/repos/{{owner}}/{{repo}}/security-advisories
|
|
Accept: application/json
|
|
Accept: application/scim+json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
### Update a repository security advisory
|
|
## Update a repository security advisory
|
|
PATCH https://api.github.com/repos/{{owner}}/{{repo}}/security-advisories/{{ghsa_id}}
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer={{bearerToken}}
|
|
|
|
{
|
|
"severity" : "critical",
|
|
"state" : "published"
|
|
}
|
|
|