LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gh-at

Download and verify artifact attestations (alias for gh attestation)

TLDR

Verify an artifact against a repository's attestations
$ gh at verify [example.bin] --repo [owner/repo]
copy
Verify an artifact against an organization's attestations
$ gh at verify [example.bin] --owner [org-name]
copy
Verify an OCI image
$ gh at verify [oci://image-uri] --owner [org-name]
copy
Verify and print full JSON result
$ gh at verify [example.bin] --owner [org-name] --format [json]
copy
Download attestations for offline verification
$ gh at download [example.bin] --repo [owner/repo]
copy
Output the trusted root for offline verification
$ gh at trusted-root --repo [owner/repo]
copy

SYNOPSIS

gh at command [flags]

DESCRIPTION

gh at is the built-in alias for gh attestation, part of the official GitHub CLI. It downloads and verifies build provenance attestations, cryptographically signed records that tie an artifact back to the GitHub repository, commit, and workflow that built it (via Sigstore). It's used to confirm that a downloaded binary, package, or container image genuinely came from the claimed source and build pipeline.

PARAMETERS

verify [file-path | oci://image-uri]

Verify the integrity and provenance of an artifact using its associated attestations.
download [file-path | oci://image-uri]
Download an artifact's attestations for offline use.
trusted-root
Output trusted_root.jsonl contents, for offline verification.
-o, --owner string
GitHub organization to scope the attestation lookup by.
-R, --repo string
Repository name in the format owner/repo.

VERIFY FLAGS

-d, --digest-alg string

Digest algorithm used to compute the artifact's digest: sha256 or sha512 (default sha256).
--cert-identity string
Enforce an exact match of the certificate's SubjectAlternativeName.
-i, --cert-identity-regex string
Enforce a regex match of the certificate's SubjectAlternativeName.
--cert-oidc-issuer string
Enforce the OIDC token issuer (default https://token.actions.githubusercontent.com).
--signer-repo string
Enforce a match on the signer workflow's repository.
--signer-workflow string
Enforce a match on the signer workflow's path.
-b, --bundle string
Verify using a bundle stored on disk instead of fetching from GitHub.
--bundle-from-oci
Fetch the attestation bundle from the OCI registry instead of GitHub.
--format string
Output format; currently only json is supported.
-L, --limit int
Maximum number of attestations to fetch (default 30).

INSTALL

sudo apt install gh
copy
sudo dnf install gh
copy
sudo pacman -S github-cli
copy
sudo apk add github-cli
copy
sudo zypper install gh
copy
brew install gh
copy
nix profile install nixpkgs#gh
copy

CAVEATS

Requires either --owner or --repo to scope the lookup. Verification depends on network access to GitHub and Sigstore's public-good instance unless --custom-trusted-root or --bundle is used for fully offline verification.

SEE ALSO

gh(1), gh-release(1)

RESOURCES

Copied to clipboard
Kai