Skip to content

Commit

Permalink
Merge branch 'main' into check_suite
Browse files Browse the repository at this point in the history
  • Loading branch information
azeemshaikh38 authored Mar 2, 2023
2 parents 5c99f59 + 82a122b commit b07f6b9
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publishimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
make install
make scorecard-ko
- name: Install Cosign
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b
uses: sigstore/cosign-installer@c3667d99424e7e6047999fb6246c0da843953c65
- name: Sign image
run: |
cosign sign ghcr.io/${{github.repository_owner}}/scorecard/v4:${{ github.sha }}
3 changes: 2 additions & 1 deletion pkg/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"encoding/json"
"fmt"
"io"
"time"

"github.com/ossf/scorecard/v4/checker"
docs "github.com/ossf/scorecard/v4/docs/checks"
Expand Down Expand Up @@ -163,7 +164,7 @@ func (r *ScorecardResult) AsJSON2(showDetails bool,
Version: r.Scorecard.Version,
Commit: r.Scorecard.CommitSHA,
},
Date: r.Date.Format("2006-01-02"),
Date: r.Date.Format(time.RFC3339),
Metadata: r.Metadata,
AggregateScore: jsonFloatScore(score),
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ func TestJSONOutput(t *testing.T) {
scorecardCommit := "ccbc59901773ab4c051dfcea0cc4201a1567abdd"
scorecardVersion := "1.2.3"
repoName := "org/name"
date, e := time.Parse("2006-01-02", "2021-08-25")
date, e := time.Parse(time.RFC3339, "2023-03-02T10:30:43-06:00")
t.Logf("date: %v", date)
if e != nil {
panic(fmt.Errorf("time.Parse: %w", e))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/testdata/check1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"date": "2021-08-25",
"date": "2023-03-02T10:30:43-06:00",
"repo": {
"name": "org/name",
"commit": "68bc59901773ab4c051dfcea0cc4201a1567ab32"
Expand Down
2 changes: 1 addition & 1 deletion pkg/testdata/check2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"date": "2021-08-25",
"date": "2023-03-02T10:30:43-06:00",
"repo": {
"name": "org/name",
"commit": "68bc59901773ab4c051dfcea0cc4201a1567ab32"
Expand Down
2 changes: 1 addition & 1 deletion pkg/testdata/check3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"date": "2021-08-25",
"date": "2023-03-02T10:30:43-06:00",
"repo": {
"name": "org/name",
"commit": "68bc59901773ab4c051dfcea0cc4201a1567ab32"
Expand Down
2 changes: 1 addition & 1 deletion pkg/testdata/check4.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"date": "2021-08-25",
"date": "2023-03-02T10:30:43-06:00",
"repo": {
"name": "org/name",
"commit": "68bc59901773ab4c051dfcea0cc4201a1567ab32"
Expand Down
2 changes: 1 addition & 1 deletion pkg/testdata/check5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"date": "2021-08-25",
"date": "2023-03-02T10:30:43-06:00",
"repo": {
"name": "org/name",
"commit": "68bc59901773ab4c051dfcea0cc4201a1567ab32"
Expand Down
2 changes: 1 addition & 1 deletion pkg/testdata/check6.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"date": "2021-08-25",
"date": "2023-03-02T10:30:43-06:00",
"repo": {
"name": "org/name",
"commit": "68bc59901773ab4c051dfcea0cc4201a1567ab32"
Expand Down

0 comments on commit b07f6b9

Please sign in to comment.