provider security-advisories GET
/repos/{owner}/{repo}/security-advisories @utdk/github
/repos/{owner}/{repo}/security-advisories List repository security advisories
Lists security advisories in a repository.
The authenticated user can access unpublished security advisories from a repository if they are a security manager or administrator of that repository, or if they are a collaborator on any security advisory.
OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to.
- owner path required
- The account owner of the repository. The name is not case sensitive.
- string
- repo path required
- The name of the repository without the `.git` extension. The name is not case sensitive.
- string
- direction query
- The direction to sort the results by.
- enum: asc, desc
- sort query
- The property to sort the results by.
- enum: created, updated, published
- before query
- A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
- string
- after query
- A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
- string
- per_page query
- The number of advisories to return per page. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
- integer
- state query
- Filter by state of the repository advisories. Only advisories of this state will be returned.
- enum: triage, draft, published, closed
Try it
Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import github from '@utdk/github';
await github.securityAdvisories.listRepositoryAdvisories({
"direction": "desc",
"sort": "created",
"per_page": 30
})