Skip to content

JSON object is out printed when verification fails on notation verify #546

@shizhMSFT

Description

@shizhMSFT

What is the areas you experience the issue in?

Notation CLI

What is not working as expected?

On verification failure,

$ notation verify <image_ref> --output json
signature verification failed for all the signatures associated with <image_ref>

The output is not in the JSON format and there is no failure details. Therefore, scripts cannot further process it.

What did you expect to happen?

The expected output would be

$ notation verify <image_ref> --output json
{
    "reference": "<image_ref>",
    "reason": "signature verification failed for all the signatures associated with <image_ref>",
    "details": [
        // detailed outcome
    ],
    "result": "Failed"
}

Related to #527 (comment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions