Get-GitHubOrganizationAttestations

SYNOPSIS

List attestations

SYNTAX

__AllParameterSets

Get-GitHubOrganizationAttestations [-Org] <string> [-SubjectDigest] <string> [-PerPage <long>]
 [-Before <string>] [-After <string>] [-PredicateType <string>] [-AllResults] [-Accept <string>]

ALIASES

This cmdlet has the following aliases,

  • Get-GHOrganizationAttestations

DESCRIPTION

The Get-GitHubOrganizationAttestations cmdlet invokes the GET method of the /orgs/{org}/attestations/{subject_digest} endpoint (List attestations)

List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.

The collection of attestations returned by this endpoint is filtered according to the authenticated user’s permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the ‘attestations:read’ permission is required.

Please note: in order to offer meaningful security benefits, an attestation’s signature and timestamps must be cryptographically verified, and the identity of the attestation signer must be validated. Attestations can be verified using the GitHub CLI ‘attestation verify’ command (https://cli.github.com/manual/gh_attestation_verify). For more information, see our guide on how to use artifact attestations to establish a build’s provenance (https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).

Endpoint: GET /orgs/{org}/attestations/{subject_digest} API version: 2026-03-10

EXAMPLES

EXAMPLE 1

'

Invokes GET /orgs/{org}/attestations/{subject_digest}

EXAMPLE 2

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

-Org

The organization name. The name is not case sensitive.

Path parameter [ org ]

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

-PredicateType

Optional filter for fetching attestations with a given predicate type. This option accepts ‘provenance’, ‘sbom’, ‘release’, or freeform text for custom predicate types.

Query parameter [ predicate_type ]

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

-SubjectDigest

The parameter should be set to the attestation’s subject’s SHA256 digest, in the form ‘sha256:HEX_DIGEST’.

Path parameter [ subject_digest ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  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: orgs/list-attestations Category: orgs / attestations