-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-attestationrelated to the gh attestation commandrelated to the gh attestation commandp2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Description
Describe the bug
gh attestation verify always returns a 0 exit code, even when it does not find the correct attestation.
Affected version
gh version 2.66.1 (2025-01-31)
https://github.com/cli/cli/releases/tag/v2.66.1
Steps to reproduce the behavior
#!/bin/bash
# Run a command
gh attestation verify oci://ghcr.io/repo:5.20.6 --repo repo --signer-repo signer-repo --predicate-type https://slsa.dev/provenance/v1
# Capture the exit code
exit_code=$?
# Show the exit code
echo "Exit code: $exit_code"✗ No attestations found with predicate type: https://slsa.dev/provenance/v1
Exit code: 0Expected vs actual behavior
Is this the intended behaviour ? I would expect to get a non-zero exit code if the command fails to find any attestations.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-attestationrelated to the gh attestation commandrelated to the gh attestation commandp2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions