← All tags

Security-Advisories API Reference

Manage security advisories.

10 endpoints tagged security-advisories, each listing its parameters and possible responses. Search or scroll the index below to jump to a specific endpoint.

No endpoints match your search.

List global security advisories

GET /advisories

Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.

Parameters

NameInRequiredDescription
ghsa_idquerynoIf specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned.
typequerynoIf specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware.
cve_idquerynoIf specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned.
ecosystemquerynoIf specified, only advisories for these ecosystems will be returned.
severityquerynoIf specified, only advisories with these severities will be returned.
cwesquerynoIf specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned.
is_withdrawnquerynoWhether to only return advisories that have been withdrawn.
affectsquerynoIf specified, only return advisories that affect any of package or package@version. A maximum of 1000 packages can be specified.
publishedquerynoIf specified, only return advisories that were published on a date or date range.
updatedquerynoIf specified, only return advisories that were updated on a date or date range.
modifiedquerynoIf specified, only show advisories that were updated or published on a date or date range.
epss_percentagequerynoIf specified, only return advisories that have an EPSS percentage score that matches the provided value.
epss_percentilequerynoIf specified, only return advisories that have an EPSS percentile score that matches the provided value.
beforequerynoA cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."
afterquerynoA cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."
directionquerynoThe direction to sort the results by.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
sortquerynoThe property to sort the results by.

Responses

StatusDescriptionHas JSON body
200Responseyes
429Too many requestsyes
422Validation failed, or the endpoint has been spammed.yes

Get a global security advisory

GET /advisories/{ghsa_id}

Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.

Parameters

NameInRequiredDescription
ghsa_idpathyesThe GHSA (GitHub Security Advisory) identifier of the advisory.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

List repository security advisories for an organization

GET /orgs/{org}/security-advisories

Lists repository security advisories for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
directionquerynoThe direction to sort the results by.
sortquerynoThe property to sort the results by.
beforequerynoA cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."
afterquerynoA cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."
per_pagequerynoThe number of advisories to return per page. For more information, see "Using pagination in the REST API."
statequerynoFilter by the state of the repository advisories. Only advisories of this state will be returned.

Responses

StatusDescriptionHas JSON body
200Responseyes
400Bad Requestyes
404Resource not foundyes

List repository security advisories

GET /repos/{owner}/{repo}/security-advisories

Lists security advisories in a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
directionquerynoThe direction to sort the results by.
sortquerynoThe property to sort the results by.
beforequerynoA cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."
afterquerynoA cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."
per_pagequerynoThe number of advisories to return per page. For more information, see "Using pagination in the REST API."
statequerynoFilter by state of the repository advisories. Only advisories of this state will be returned.

Responses

StatusDescriptionHas JSON body
200Responseyes
400Bad Requestyes
404Resource not foundyes

Create a repository security advisory

POST /repos/{owner}/{repo}/security-advisories

Creates a new repository security advisory.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Privately report a security vulnerability

POST /repos/{owner}/{repo}/security-advisories/reports

Report a security vulnerability to the maintainers of the repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get a repository security advisory

GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}

Get a repository security advisory using its GitHub Security Advisory (GHSA) identifier.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
ghsa_idpathyesThe GHSA (GitHub Security Advisory) identifier of the advisory.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Update a repository security advisory

PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}

Update a repository security advisory using its GitHub Security Advisory (GHSA) identifier.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
ghsa_idpathyesThe GHSA (GitHub Security Advisory) identifier of the advisory.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Request a CVE for a repository security advisory

POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve

If you want a CVE identification number for the security vulnerability in your project, and don't already have one, you can request a CVE identification number from GitHub. For more information see "Requesting a CVE identification number."

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
ghsa_idpathyesThe GHSA (GitHub Security Advisory) identifier of the advisory.

Responses

StatusDescriptionHas JSON body
202Acceptedyes
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Create a temporary private fork

POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks

Create a temporary private fork to collaborate on fixing a security vulnerability in your repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
ghsa_idpathyesThe GHSA (GitHub Security Advisory) identifier of the advisory.

Responses

StatusDescriptionHas JSON body
202Responseyes
400Bad Requestyes
422Validation failed, or the endpoint has been spammed.yes
403Forbiddenyes
404Resource not foundyes