Get-GitHubSecurityAdvisoryRepositoryAdvisories

SYNOPSIS

List repository security advisories

SYNTAX

__AllParameterSets

Get-GitHubSecurityAdvisoryRepositoryAdvisories [-Owner] <string> [-Repo] <string>
 [-Direction <string>] [-Sort <string>] [-Before <string>] [-After <string>] [-PerPage <long>]
 [-State <string>] [-AllResults] [-Accept <string>]

ALIASES

This cmdlet has the following aliases,

  • Get-GHSecurityAdvisoryRepositoryAdvisories

DESCRIPTION

The Get-GitHubSecurityAdvisoryRepositoryAdvisories cmdlet invokes the GET method of the /repos/{owner}/{repo}/security-advisories endpoint (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.

Endpoint: GET /repos/{owner}/{repo}/security-advisories API version: 2026-03-10

EXAMPLES

EXAMPLE 1

Get-GitHubSecurityAdvisoryRepositoryAdvisories -Owner 'octocat' -Repo 'Hello-World'

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

EXAMPLE 2

Get-GitHubSecurityAdvisoryRepositoryAdvisories -Owner 'octocat' -Repo 'Hello-World' -AllResults

Returns the items of every page

PARAMETERS

-Accept

The Accept header (media type) of the request Default value: application/vnd.github+json

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-After

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).”

Query parameter [ after ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-AllResults

Follows the pagination links & returns the items of every page. 100 items are requested per page unless the per page parameter is used

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Before

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).”

Query parameter [ before ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Direction

The direction to sort the results by.

Query parameter [ direction ]

Default value: desc

Allowed values: ‘asc’, ‘desc’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Owner

The account owner of the repository. The name is not case sensitive.

Path parameter [ owner ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-PerPage

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).”

Query parameter [ per_page ]

Default value: 30

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Repo

The name of the repository without the ‘.git’ extension. The name is not case sensitive.

Path parameter [ repo ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Sort

The property to sort the results by.

Query parameter [ sort ]

Default value: created

Allowed values: ‘created’, ‘updated’, ‘published’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-State

Filter by state of the repository advisories. Only advisories of this state will be returned.

Query parameter [ state ]

Allowed values: ‘triage’, ‘draft’, ‘published’, ‘closed’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Objects with properties named like the path parameters can be piped to this function

{{ Fill in the Description }}

System.String

{{ Fill in the Description }}

OUTPUTS

The response of the GitHub API (objects

{{ Fill in the Description }}

NOTES

OperationId: security-advisories/list-repository-advisories Category: security-advisories / repository-advisories