diff --git a/cmd/rekor-cli/app/get.go b/cmd/rekor-cli/app/get.go index df5bdea6d..6c8522219 100644 --- a/cmd/rekor-cli/app/get.go +++ b/cmd/rekor-cli/app/get.go @@ -150,13 +150,16 @@ func parseEntry(uuid string, e models.LogEntryAnon) (interface{}, error) { } obj := getCmdOutput{ - Attestation: string(e.Attestation.Data), - AttestationType: e.Attestation.MediaType, - Body: eimpl, - UUID: uuid, - IntegratedTime: *e.IntegratedTime, - LogIndex: int(*e.LogIndex), - LogID: *e.LogID, + Body: eimpl, + UUID: uuid, + IntegratedTime: *e.IntegratedTime, + LogIndex: int(*e.LogIndex), + LogID: *e.LogID, + } + + if e.Attestation != nil { + obj.Attestation = string(e.Attestation.Data) + obj.AttestationType = e.Attestation.MediaType } return &obj, nil