From 2cb654102d3f6f634cb27eeca3730d3b5b01da02 Mon Sep 17 00:00:00 2001 From: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> Date: Fri, 22 Apr 2022 18:33:25 -0500 Subject: [PATCH] :warning: Removing the pass field from result (#1853) - Removing the pass field from result - https://github.com/ossf/scorecard/issues/1393 Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> --- checks/binary_artifact_test.go | 5 ----- checks/code_review_test.go | 6 ------ checks/contributors_test.go | 4 ---- checks/maintained_test.go | 3 --- checks/sast_test.go | 10 +--------- checks/signed_releases_test.go | 15 --------------- checks/webhook_test.go | 7 ------- cron/format/json.go | 1 - e2e/binary_artifacts_test.go | 6 +----- e2e/branch_protection_test.go | 7 ------- e2e/cii_best_practices_test.go | 3 --- e2e/contributors_test.go | 3 --- e2e/dangerous_workflow_test.go | 12 ------------ e2e/dependency_update_tool_test.go | 6 ------ e2e/license_test.go | 6 ------ e2e/maintained_test.go | 3 --- e2e/permissions_test.go | 12 ------------ e2e/sast_test.go | 3 --- e2e/security_policy_test.go | 15 --------------- e2e/signedreleases_test.go | 3 --- e2e/vulnerabilities_test.go | 9 --------- pkg/json.go | 1 - 22 files changed, 2 insertions(+), 138 deletions(-) diff --git a/checks/binary_artifact_test.go b/checks/binary_artifact_test.go index 3146d8f9cc6..2d129b7c753 100644 --- a/checks/binary_artifact_test.go +++ b/checks/binary_artifact_test.go @@ -42,7 +42,6 @@ func TestBinaryArtifacts(t *testing.T) { err: nil, expected: checker.CheckResult{ Score: 9, - Pass: true, }, }, { @@ -51,7 +50,6 @@ func TestBinaryArtifacts(t *testing.T) { err: nil, expected: checker.CheckResult{ Score: 10, - Pass: true, }, }, } @@ -89,9 +87,6 @@ func TestBinaryArtifacts(t *testing.T) { if result.Score != tt.expected.Score { t.Errorf("BinaryArtifacts: %v, expected %v for tests %v", result.Score, tt.expected.Score, tt.name) } - if result.Pass != tt.expected.Pass { - t.Errorf("BinaryArtifacts: %v, expected %v for tests %v", result.Pass, tt.expected.Pass, tt.name) - } ctrl.Finish() }) diff --git a/checks/code_review_test.go b/checks/code_review_test.go index c616520e7c6..340b74aebe6 100644 --- a/checks/code_review_test.go +++ b/checks/code_review_test.go @@ -88,7 +88,6 @@ func TestCodereview(t *testing.T) { }, expected: checker.CheckResult{ Score: 10, - Pass: true, }, }, { @@ -112,7 +111,6 @@ func TestCodereview(t *testing.T) { }, expected: checker.CheckResult{ Score: 10, - Pass: true, }, }, { @@ -136,7 +134,6 @@ func TestCodereview(t *testing.T) { }, expected: checker.CheckResult{ Score: 10, - Pass: true, }, }, { @@ -217,9 +214,6 @@ func TestCodereview(t *testing.T) { if res.Score != tt.expected.Score { t.Errorf("Expected score %d, got %d for %v", tt.expected.Score, res.Score, tt.name) } - if res.Pass != tt.expected.Pass { - t.Errorf("Expected pass %t, got %t for %v", tt.expected.Pass, res.Pass, tt.name) - } ctrl.Finish() }) } diff --git a/checks/contributors_test.go b/checks/contributors_test.go index 6df676bf538..c21342377bb 100644 --- a/checks/contributors_test.go +++ b/checks/contributors_test.go @@ -134,7 +134,6 @@ func TestContributors(t *testing.T) { }, expected: checker.CheckResult{ Score: 10, - Pass: true, }, }, { @@ -185,9 +184,6 @@ func TestContributors(t *testing.T) { if res.Score != tt.expected.Score { t.Errorf("Expected score %d, got %d for %v", tt.expected.Score, res.Score, tt.name) } - if res.Pass != tt.expected.Pass { - t.Errorf("Expected pass %t, got %t for %v", tt.expected.Pass, res.Pass, tt.name) - } ctrl.Finish() }) } diff --git a/checks/maintained_test.go b/checks/maintained_test.go index e7fb10998fd..092d0bb5a88 100644 --- a/checks/maintained_test.go +++ b/checks/maintained_test.go @@ -355,9 +355,6 @@ func Test_Maintained(t *testing.T) { if res.Score != tt.expected.Score { t.Errorf("Expected score %d, got %d for %v", tt.expected.Score, res.Score, tt.name) } - if res.Pass != tt.expected.Pass { - t.Errorf("Expected pass %t, got %t for %v", tt.expected.Pass, res.Pass, tt.name) - } ctrl.Finish() }) } diff --git a/checks/sast_test.go b/checks/sast_test.go index 4f0ce30b49c..471fc1f8839 100644 --- a/checks/sast_test.go +++ b/checks/sast_test.go @@ -53,7 +53,7 @@ func TestSAST(t *testing.T) { commits: []clients.Commit{}, searchresult: clients.SearchResponse{}, checkRuns: []clients.CheckRun{}, - expected: checker.CheckResult{Score: -1, Pass: false}, + expected: checker.CheckResult{Score: -1}, }, { name: "Successful SAST checker should return success status", @@ -76,7 +76,6 @@ func TestSAST(t *testing.T) { }, expected: checker.CheckResult{ Score: 10, - Pass: true, }, }, { @@ -116,7 +115,6 @@ func TestSAST(t *testing.T) { }, expected: checker.CheckResult{ Score: 7, - Pass: false, }, }, { @@ -153,7 +151,6 @@ func TestSAST(t *testing.T) { }, expected: checker.CheckResult{ Score: 0, - Pass: false, }, }, { @@ -175,7 +172,6 @@ func TestSAST(t *testing.T) { }, expected: checker.CheckResult{ Score: 0, - Pass: false, }, }, { @@ -198,7 +194,6 @@ func TestSAST(t *testing.T) { }, expected: checker.CheckResult{ Score: 0, - Pass: false, }, }, } @@ -232,9 +227,6 @@ func TestSAST(t *testing.T) { if res.Score != tt.expected.Score { t.Errorf("Expected score %d, got %d for %v", tt.expected.Score, res.Score, tt.name) } - if res.Pass != tt.expected.Pass { - t.Errorf("Expected pass %t, got %t for %v", tt.expected.Pass, res.Pass, tt.name) - } ctrl.Finish() }) } diff --git a/checks/signed_releases_test.go b/checks/signed_releases_test.go index 08b1fc6c26e..2cad8493758 100644 --- a/checks/signed_releases_test.go +++ b/checks/signed_releases_test.go @@ -39,7 +39,6 @@ func TestSignedRelease(t *testing.T) { { name: "NoReleases", expected: checker.CheckResult{ - Pass: false, Score: -1, }, }, @@ -54,7 +53,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: false, Score: -1, }, }, @@ -74,7 +72,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: false, Score: 0, }, }, @@ -94,7 +91,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: true, Score: 10, }, }, @@ -114,7 +110,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: true, Score: 10, }, }, @@ -134,7 +129,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: true, Score: 10, }, }, @@ -154,7 +148,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: true, Score: 10, }, }, @@ -178,7 +171,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: true, Score: 10, }, }, @@ -217,7 +209,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: true, Score: 10, }, }, @@ -252,7 +243,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: false, Score: 5, }, }, @@ -351,7 +341,6 @@ func TestSignedRelease(t *testing.T) { }, }, expected: checker.CheckResult{ - Pass: true, Score: 10, }, }, @@ -359,7 +348,6 @@ func TestSignedRelease(t *testing.T) { name: "Error getting releases", err: errors.New("Error getting releases"), expected: checker.CheckResult{ - Pass: false, Score: -1, Error: errors.New("Error getting releases"), }, @@ -400,9 +388,6 @@ func TestSignedRelease(t *testing.T) { if res.Score != tt.expected.Score { t.Errorf("Expected score %d, got %d for %v", tt.expected.Score, res.Score, tt.name) } - if res.Pass != tt.expected.Pass { - t.Errorf("Expected pass %t, got %t for %v", tt.expected.Pass, res.Pass, tt.name) - } ctrl.Finish() }) } diff --git a/checks/webhook_test.go b/checks/webhook_test.go index e96f9122c6d..ce3ab2e9f18 100644 --- a/checks/webhook_test.go +++ b/checks/webhook_test.go @@ -40,7 +40,6 @@ func TestWebhooks(t *testing.T) { name: "No Webhooks", uri: "github.com/owner/repo", expected: checker.CheckResult{ - Pass: true, Score: 10, }, err: nil, @@ -50,7 +49,6 @@ func TestWebhooks(t *testing.T) { name: "With Webhooks and secret set", uri: "github.com/owner/repo", expected: checker.CheckResult{ - Pass: true, Score: 10, }, err: nil, @@ -65,7 +63,6 @@ func TestWebhooks(t *testing.T) { name: "With Webhooks and no secret set", uri: "github.com/owner/repo", expected: checker.CheckResult{ - Pass: false, Score: 0, }, err: nil, @@ -80,7 +77,6 @@ func TestWebhooks(t *testing.T) { name: "With 2 Webhooks with and whitout secrets configured", uri: "github.com/owner/repo", expected: checker.CheckResult{ - Pass: false, Score: 5, }, err: nil, @@ -133,9 +129,6 @@ func TestWebhooks(t *testing.T) { if res.Score != tt.expected.Score { t.Errorf("Expected score %d, got %d for %v", tt.expected.Score, res.Score, tt.name) } - if res.Pass != tt.expected.Pass { - t.Errorf("Expected pass %t, got %t for %v", tt.expected.Pass, res.Pass, tt.name) - } ctrl.Finish() }) } diff --git a/cron/format/json.go b/cron/format/json.go index f75ce379039..b994a192fa4 100644 --- a/cron/format/json.go +++ b/cron/format/json.go @@ -97,7 +97,6 @@ func AsJSON(r *pkg.ScorecardResult, showDetails bool, logLevel log.Level, writer for _, checkResult := range r.Checks { tmpResult := jsonCheckResult{ Name: checkResult.Name, - Pass: checkResult.Pass, Confidence: checkResult.Confidence, } if showDetails { diff --git a/e2e/binary_artifacts_test.go b/e2e/binary_artifacts_test.go index 807d739c1f1..495d61d14f1 100644 --- a/e2e/binary_artifacts_test.go +++ b/e2e/binary_artifacts_test.go @@ -79,14 +79,13 @@ var _ = Describe("E2E TEST:"+checks.CheckBinaryArtifacts, func() { expected := scut.TestReturn{ Error: nil, Score: checker.MinResultScore, - NumberOfWarn: 24, + NumberOfWarn: 25, NumberOfInfo: 0, NumberOfDebug: 0, } result := checks.BinaryArtifacts(&req) // UPGRADEv2: to remove. // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "binary artifacts", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -114,9 +113,6 @@ var _ = Describe("E2E TEST:"+checks.CheckBinaryArtifacts, func() { NumberOfDebug: 0, } result := checks.BinaryArtifacts(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "binary artifacts", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) diff --git a/e2e/branch_protection_test.go b/e2e/branch_protection_test.go index a42ddf2d815..00b239f9dc4 100644 --- a/e2e/branch_protection_test.go +++ b/e2e/branch_protection_test.go @@ -54,7 +54,6 @@ var _ = Describe("E2E TEST PAT:"+checks.CheckBranchProtection, func() { result := checks.BranchProtection(&req) // UPGRADEv2: to remove. // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "branch protection accessible", &expected, &result, &dl)).Should(BeTrue()) @@ -83,9 +82,6 @@ var _ = Describe("E2E TEST PAT:"+checks.CheckBranchProtection, func() { NumberOfDebug: 0, } result := checks.BranchProtection(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "branch protection accessible", &expected, &result, &dl)).Should(BeTrue()) @@ -114,9 +110,6 @@ var _ = Describe("E2E TEST PAT:"+checks.CheckBranchProtection, func() { NumberOfDebug: 3, } result := checks.BranchProtection(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "branch protection accessible", &expected, &result, &dl)).Should(BeTrue()) diff --git a/e2e/cii_best_practices_test.go b/e2e/cii_best_practices_test.go index 7889b51c1b7..1bd09cd396a 100644 --- a/e2e/cii_best_practices_test.go +++ b/e2e/cii_best_practices_test.go @@ -50,9 +50,6 @@ var _ = Describe("E2E TEST:"+checks.CheckCIIBestPractices, func() { NumberOfDebug: 0, } result := checks.CIIBestPractices(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "passing badge", &expected, &result, &dl)).Should(BeTrue()) }) diff --git a/e2e/contributors_test.go b/e2e/contributors_test.go index 1d93e47d41b..273d51cd24d 100644 --- a/e2e/contributors_test.go +++ b/e2e/contributors_test.go @@ -50,9 +50,6 @@ var _ = Describe("E2E TEST:"+checks.CheckContributors, func() { NumberOfDebug: 0, } result := checks.Contributors(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "several contributors", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) diff --git a/e2e/dangerous_workflow_test.go b/e2e/dangerous_workflow_test.go index 9acaaf0af5c..aa377c7cbd9 100644 --- a/e2e/dangerous_workflow_test.go +++ b/e2e/dangerous_workflow_test.go @@ -53,10 +53,6 @@ var _ = Describe("E2E TEST:"+checks.CheckTokenPermissions, func() { NumberOfDebug: 0, } result := checks.DangerousWorkflow(&req) - // UPGRADEv2: to remove. - // Old version. - - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "dangerous workflow", &expected, &result, &dl)).Should(BeTrue()) }) @@ -81,10 +77,6 @@ var _ = Describe("E2E TEST:"+checks.CheckTokenPermissions, func() { NumberOfDebug: 0, } result := checks.DangerousWorkflow(&req) - // UPGRADEv2: to remove. - // Old version. - - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "dangerous workflow", &expected, &result, &dl)).Should(BeTrue()) }) @@ -121,10 +113,6 @@ var _ = Describe("E2E TEST:"+checks.CheckTokenPermissions, func() { NumberOfDebug: 0, } result := checks.DangerousWorkflow(&req) - // UPGRADEv2: to remove. - // Old version. - - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "dangerous workflow", &expected, &result, &dl)).Should(BeTrue()) }) diff --git a/e2e/dependency_update_tool_test.go b/e2e/dependency_update_tool_test.go index 6e2befcd2c5..9b6ab593059 100644 --- a/e2e/dependency_update_tool_test.go +++ b/e2e/dependency_update_tool_test.go @@ -54,9 +54,6 @@ var _ = Describe("E2E TEST:"+checks.CheckDependencyUpdateTool, func() { } result := checks.DependencyUpdateTool(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "dependabot", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -83,9 +80,6 @@ var _ = Describe("E2E TEST:"+checks.CheckDependencyUpdateTool, func() { NumberOfDebug: 0, } result := checks.DependencyUpdateTool(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "renovabot", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) diff --git a/e2e/license_test.go b/e2e/license_test.go index 2a0f2e701c5..83a9a5f4cc1 100644 --- a/e2e/license_test.go +++ b/e2e/license_test.go @@ -54,8 +54,6 @@ var _ = Describe("E2E TEST:"+checks.CheckLicense, func() { } result := checks.License(&req) - Expect(result.Pass).Should(BeTrue()) - Expect(scut.ValidateTestReturn(nil, "license found", &expected, &result, &dl)).Should(BeTrue()) }) @@ -81,8 +79,6 @@ var _ = Describe("E2E TEST:"+checks.CheckLicense, func() { } result := checks.License(&req) - Expect(result.Pass).Should(BeTrue()) - Expect(scut.ValidateTestReturn(nil, "license found", &expected, &result, &dl)).Should(BeTrue()) }) @@ -120,8 +116,6 @@ var _ = Describe("E2E TEST:"+checks.CheckLicense, func() { } result := checks.License(&req) - Expect(result.Pass).Should(BeTrue()) - Expect(scut.ValidateTestReturn(nil, "license found", &expected, &result, &dl)).Should(BeTrue()) }) diff --git a/e2e/maintained_test.go b/e2e/maintained_test.go index 0292fb351d7..23e9dd29219 100644 --- a/e2e/maintained_test.go +++ b/e2e/maintained_test.go @@ -50,9 +50,6 @@ var _ = Describe("E2E TEST:"+checks.CheckMaintained, func() { NumberOfDebug: 0, } result := checks.Maintained(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "active repo", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) diff --git a/e2e/permissions_test.go b/e2e/permissions_test.go index 0c59f3c3d7c..806914a0523 100644 --- a/e2e/permissions_test.go +++ b/e2e/permissions_test.go @@ -53,10 +53,6 @@ var _ = Describe("E2E TEST:"+checks.CheckTokenPermissions, func() { NumberOfDebug: 5, } result := checks.TokenPermissions(&req) - // UPGRADEv2: to remove. - // Old version. - - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "token permissions", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -82,10 +78,6 @@ var _ = Describe("E2E TEST:"+checks.CheckTokenPermissions, func() { NumberOfDebug: 5, } result := checks.TokenPermissions(&req) - // UPGRADEv2: to remove. - // Old version. - - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "token permissions", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -123,10 +115,6 @@ var _ = Describe("E2E TEST:"+checks.CheckTokenPermissions, func() { NumberOfDebug: 5, } result := checks.TokenPermissions(&req) - // UPGRADEv2: to remove. - // Old version. - - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "token permissions", &expected, &result, &dl)).Should(BeTrue()) Expect(x.Close()).Should(BeNil()) diff --git a/e2e/sast_test.go b/e2e/sast_test.go index ed21d6d0ba6..657fd97bda6 100644 --- a/e2e/sast_test.go +++ b/e2e/sast_test.go @@ -50,9 +50,6 @@ var _ = Describe("E2E TEST:"+checks.CheckSAST, func() { NumberOfDebug: 0, } result := checks.SAST(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "sast used", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) diff --git a/e2e/security_policy_test.go b/e2e/security_policy_test.go index 8c856e21220..293e291640f 100644 --- a/e2e/security_policy_test.go +++ b/e2e/security_policy_test.go @@ -54,9 +54,6 @@ var _ = Describe("E2E TEST:"+checks.CheckSecurityPolicy, func() { NumberOfDebug: 0, } result := checks.SecurityPolicy(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "policy found", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -83,9 +80,6 @@ var _ = Describe("E2E TEST:"+checks.CheckSecurityPolicy, func() { NumberOfDebug: 0, } result := checks.SecurityPolicy(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "policy found", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -112,9 +106,6 @@ var _ = Describe("E2E TEST:"+checks.CheckSecurityPolicy, func() { NumberOfDebug: 0, } result := checks.SecurityPolicy(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "policy found", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -141,9 +132,6 @@ var _ = Describe("E2E TEST:"+checks.CheckSecurityPolicy, func() { NumberOfDebug: 0, } result := checks.SecurityPolicy(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "policy found", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -181,9 +169,6 @@ var _ = Describe("E2E TEST:"+checks.CheckSecurityPolicy, func() { NumberOfDebug: 0, } result := checks.SecurityPolicy(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "policy found", &expected, &result, &dl)).Should(BeTrue()) Expect(x.Close()).Should(BeNil()) diff --git a/e2e/signedreleases_test.go b/e2e/signedreleases_test.go index 098a1997f5e..9de7316c33c 100644 --- a/e2e/signedreleases_test.go +++ b/e2e/signedreleases_test.go @@ -50,9 +50,6 @@ var _ = Describe("E2E TEST:"+checks.CheckSignedReleases, func() { NumberOfDebug: 5, } result := checks.SignedReleases(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "verified release", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) diff --git a/e2e/vulnerabilities_test.go b/e2e/vulnerabilities_test.go index 729cc6e5ff1..11abb34778d 100644 --- a/e2e/vulnerabilities_test.go +++ b/e2e/vulnerabilities_test.go @@ -53,9 +53,6 @@ var _ = Describe("E2E TEST:"+checks.CheckVulnerabilities, func() { } result := checks.Vulnerabilities(&req) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeTrue()) // New version. Expect(scut.ValidateTestReturn(nil, "no osv vulnerabilities", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -84,9 +81,6 @@ var _ = Describe("E2E TEST:"+checks.CheckVulnerabilities, func() { NumberOfDebug: 0, } result := checks.Vulnerabilities(&checkRequest) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "osv vulnerabilities", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) @@ -114,9 +108,6 @@ var _ = Describe("E2E TEST:"+checks.CheckVulnerabilities, func() { NumberOfDebug: 0, } result := checks.Vulnerabilities(&checkRequest) - // UPGRADEv2: to remove. - // Old version. - Expect(result.Pass).Should(BeFalse()) // New version. Expect(scut.ValidateTestReturn(nil, "osv vulnerabilities", &expected, &result, &dl)).Should(BeTrue()) Expect(repoClient.Close()).Should(BeNil()) diff --git a/pkg/json.go b/pkg/json.go index ffc2a392da0..73042f219b3 100644 --- a/pkg/json.go +++ b/pkg/json.go @@ -96,7 +96,6 @@ func (r *ScorecardResult) AsJSON(showDetails bool, logLevel log.Level, writer io for _, checkResult := range r.Checks { tmpResult := jsonCheckResult{ Name: checkResult.Name, - Pass: checkResult.Pass, Confidence: checkResult.Confidence, } if showDetails {