Get-GitHubDependabotAlertsForRepo

SYNOPSIS

List Dependabot alerts for a repository

SYNTAX

__AllParameterSets

Get-GitHubDependabotAlertsForRepo [-Owner] <string> [-Repo] <string> [-Classification <string>]
 [-State <string>] [-Severity <string>] [-Ecosystem <string>] [-Package <string>]
 [-Manifest <string>] [-EpssPercentage <string>] [-Has <Object>] [-Assignee <string>]
 [-Scope <string>] [-Relationship <string>] [-Sort <string>] [-Direction <string>]
 [-Before <string>] [-After <string>] [-PerPage <long>] [-AllResults] [-Accept <string>]

ALIASES

This cmdlet has the following aliases,

  • Get-GHDependabotAlertsForRepo

DESCRIPTION

The Get-GitHubDependabotAlertsForRepo cmdlet invokes the GET method of the /repos/{owner}/{repo}/dependabot/alerts endpoint (List Dependabot alerts for a repository)

OAuth app tokens and personal access tokens (classic) need the ‘security_events’ scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the ‘public_repo’ scope instead.

Endpoint: GET /repos/{owner}/{repo}/dependabot/alerts API version: 2026-03-10

EXAMPLES

EXAMPLE 1

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

Invokes GET /repos/{owner}/{repo}/dependabot/alerts

EXAMPLE 2

Get-GitHubDependabotAlertsForRepo -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: ''

-Assignee

Filter alerts by assignees. Provide a comma-separated list of user handles (e.g., ‘octocat’ or ‘octocat,hubot’) to return alerts assigned to any of the specified users. Use ‘*’ to list alerts with at least one assignee or ‘none’ to list alerts with no assignees.

Query parameter [ assignee ]

Type: System.String
DefaultValue: ''
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: ''

-Classification

A comma-separated list of vulnerability classifications. If specified, only alerts for vulnerabilities with these classifications will be returned.

Can be: ‘malware’, ‘general’

Query parameter [ classification ]

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: ''

-Ecosystem

A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.

Can be: ‘composer’, ‘go’, ‘maven’, ‘npm’, ‘nuget’, ‘pip’, ‘pub’, ‘rubygems’, ‘rust’

Query parameter [ ecosystem ]

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

-EpssPercentage

CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:

  • An exact number (‘n’)
  • Comparators such as ‘>n’, ‘<n’, ‘>=n’, ‘<=n’
  • A range like ‘n..n’, where ‘n’ is a number from 0.0 to 1.0

Filters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned.

Query parameter [ epss_percentage ]

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

-Has

Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. Multiple ‘has’ filters can be passed to filter for alerts that have all of the values. Currently, only ‘patch’ is supported.

Query parameter [ has ]

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

-Manifest

A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned.

Query parameter [ manifest ]

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: ''

-Package

A comma-separated list of package names. If specified, only alerts for these packages will be returned.

Query parameter [ package ]

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

-PerPage

The number of results per page (max 100). 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: ''

-Relationship

A comma-separated list of relationships of the vulnerable dependency to your project. If specified, only alerts with these relationships will be returned. [!NOTE] We are rolling out support for dependency relationship across ecosystems. This value will be “unknown” for all dependencies in unsupported ecosystems.

Query parameter [ relationship ]

Type: System.String
DefaultValue: ''
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: ''

-Scope

The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned.

Query parameter [ scope ]

Allowed values: ‘development’, ‘runtime’

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

-Severity

A comma-separated list of severities. If specified, only alerts with these severities will be returned.

Can be: ‘low’, ‘medium’, ‘high’, ‘critical’

Query parameter [ severity ]

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

-Sort

The property by which to sort the results. ‘created’ means when the alert was created. ‘updated’ means when the alert’s state last changed. ‘epss_percentage’ sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage.

Query parameter [ sort ]

Default value: created

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

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

A comma-separated list of states. If specified, only alerts with these states will be returned.

Can be: ‘auto_dismissed’, ‘dismissed’, ‘fixed’, ‘open’

Query parameter [ state ]

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: dependabot/list-alerts-for-repo Category: dependabot / alerts