diff --git a/pkg/scorecard/scorecard_result.go b/pkg/scorecard/scorecard_result.go index 367638d219b..595a6bd3fda 100644 --- a/pkg/scorecard/scorecard_result.go +++ b/pkg/scorecard/scorecard_result.go @@ -157,10 +157,12 @@ func FormatResults( } err = results.AsJSON2(output, doc, o) case options.FormatStatement: - o := &AsJSON2ResultOption{ - Details: opts.ShowDetails, - Annotations: opts.ShowAnnotations, - LogLevel: log.ParseLevel(opts.LogLevel), + o := &AsStatementResultOption{ + AsJSON2ResultOption: AsJSON2ResultOption{ + Details: opts.ShowDetails, + Annotations: opts.ShowAnnotations, + LogLevel: log.ParseLevel(opts.LogLevel), + }, } err = results.AsStatement(output, doc, o) case options.FormatProbe: diff --git a/pkg/scorecard/statement.go b/pkg/scorecard/statement.go index 4eb3470e4c7..809fc7ae8f7 100644 --- a/pkg/scorecard/statement.go +++ b/pkg/scorecard/statement.go @@ -47,7 +47,7 @@ type AsStatementResultOption struct { } // AsStatement converts the results as an in-toto statement. -func (r *Result) AsStatement(writer io.Writer, checkDocs docs.Doc, opt *AsJSON2ResultOption) error { +func (r *Result) AsStatement(writer io.Writer, checkDocs docs.Doc, opt *AsStatementResultOption) error { // Build the attestation subject from the result Repo. subject := intoto.ResourceDescriptor{ Name: r.Repo.Name,