Skip to content

gh attestation verify partially suppresses output when no TTY present #9613

@bdehamer

Description

@bdehamer

Describe the bug

The gh attestation verify command displays partial output when running in an environment with no TTY.

Steps to reproduce the behavior

Run gh attestation verify in a GH Actions workflow

Expected vs actual behavior

The output will looking something like the following:

actions/attest-build-provenance	https://slsa.dev/provenance/v1	.github/workflows/prober.yml@refs/heads/main

This is just a portion of the normal output when a TTY is present:

Loaded digest sha256:d4b1e5cbc005e80684a73826a62ee81ea63a81f26c2df4d5a1a64d89cf386d06 for file:///Users/bdehamer/Downloads/artifact
Loaded 1 attestation from /Users/bdehamer/Downloads/actions-attest-build-provenance-attestation-2032782.sigstore.json
✓ Verification succeeded!

sha256:d4b1e5cbc005e80684a73826a62ee81ea63a81f26c2df4d5a1a64d89cf386d06 was attested by:
REPO                             PREDICATE_TYPE                  WORKFLOW                                    
actions/attest-build-provenance  https://slsa.dev/provenance/v1  .github/workflows/prober.yml@refs/heads/main

If some of the output is going to be suppressed in a no-TTY environment, ALL of the output should be suppressed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-attestationrelated to the gh attestation command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions