Skip to content

Commit

Permalink
⚠️ Replace v4 module references with v5 (#4027)
Browse files Browse the repository at this point in the history
Signed-off-by: Spencer Schrock <[email protected]>
  • Loading branch information
spencerschrock authored Apr 12, 2024
1 parent f939ab1 commit 0b9dfb6
Show file tree
Hide file tree
Showing 403 changed files with 1,409 additions and 1,409 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,4 @@ linters-settings:
require-specific: true
wrapcheck:
ignorePackageGlobs:
- github.com/ossf/scorecard/v4/checks/fileparser
- github.com/ossf/scorecard/v5/checks/fileparser
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ scorecard-ko: | $(KO) $(KOCACHE_PATH)
--sbom=none \
--platform=$(PLATFORM) \
--tags latest,$(GIT_VERSION),$(GIT_HASH) \
github.com/ossf/scorecard/v4
github.com/ossf/scorecard/v5

cron-controller-ko: | $(KO) $(KOCACHE_PATH)
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
Expand All @@ -386,7 +386,7 @@ cron-controller-ko: | $(KO) $(KOCACHE_PATH)
--sbom=none \
--platform=$(PLATFORM) \
--tags latest,$(GIT_VERSION),$(GIT_HASH) \
github.com/ossf/scorecard/v4/cron/internal/controller
github.com/ossf/scorecard/v5/cron/internal/controller

cron-worker-ko: | $(KO) $(KOCACHE_PATH)
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
Expand All @@ -398,7 +398,7 @@ cron-worker-ko: | $(KO) $(KOCACHE_PATH)
--sbom=none \
--platform=$(PLATFORM) \
--tags latest,$(GIT_VERSION),$(GIT_HASH) \
github.com/ossf/scorecard/v4/cron/internal/worker
github.com/ossf/scorecard/v5/cron/internal/worker

cron-cii-worker-ko: | $(KO) $(KOCACHE_PATH)
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
Expand All @@ -410,7 +410,7 @@ cron-cii-worker-ko: | $(KO) $(KOCACHE_PATH)
--sbom=none \
--platform=$(PLATFORM)\
--tags latest,$(GIT_VERSION),$(GIT_HASH) \
github.com/ossf/scorecard/v4/cron/internal/cii
github.com/ossf/scorecard/v5/cron/internal/cii

cron-bq-transfer-ko: | $(KO) $(KOCACHE_PATH)
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
Expand All @@ -422,7 +422,7 @@ cron-bq-transfer-ko: | $(KO) $(KOCACHE_PATH)
--sbom=none \
--platform=$(PLATFORM) \
--tags latest,$(GIT_VERSION),$(GIT_HASH) \
github.com/ossf/scorecard/v4/cron/internal/bq
github.com/ossf/scorecard/v5/cron/internal/bq

cron-webhook-ko: | $(KO) $(KOCACHE_PATH)
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
Expand All @@ -434,7 +434,7 @@ cron-webhook-ko: | $(KO) $(KOCACHE_PATH)
--sbom=none \
--platform=$(PLATFORM) \
--tags latest,$(GIT_VERSION),$(GIT_HASH) \
github.com/ossf/scorecard/v4/cron/internal/webhook
github.com/ossf/scorecard/v5/cron/internal/webhook

cron-github-server-ko: | $(KO) $(KOCACHE_PATH)
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
Expand All @@ -446,6 +446,6 @@ cron-github-server-ko: | $(KO) $(KOCACHE_PATH)
--sbom=none \
--platform=$(PLATFORM) \
--tags latest,$(GIT_VERSION),$(GIT_HASH) \
github.com/ossf/scorecard/v4/clients/githubrepo/roundtripper/tokens/server
github.com/ossf/scorecard/v5/clients/githubrepo/roundtripper/tokens/server

###############################################################################
10 changes: 5 additions & 5 deletions attestor/command/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"fmt"
"os"

"github.com/ossf/scorecard/v4/attestor/policy"
"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/checks"
sclog "github.com/ossf/scorecard/v4/log"
"github.com/ossf/scorecard/v4/pkg"
"github.com/ossf/scorecard/v5/attestor/policy"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/checks"
sclog "github.com/ossf/scorecard/v5/log"
"github.com/ossf/scorecard/v5/pkg"
)

type EmptyParameterError struct {
Expand Down
2 changes: 1 addition & 1 deletion attestor/command/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/grafeas/kritis/pkg/kritis/signer"
"github.com/grafeas/kritis/pkg/kritis/util"

sclog "github.com/ossf/scorecard/v4/log"
sclog "github.com/ossf/scorecard/v5/log"
)

const scorecardNoteID = "ossf-scorecard-attestation"
Expand Down
10 changes: 5 additions & 5 deletions attestor/policy/attestation_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"github.com/gobwas/glob"
"gopkg.in/yaml.v2"

"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/checks"
sce "github.com/ossf/scorecard/v4/errors"
"github.com/ossf/scorecard/v4/finding"
sclog "github.com/ossf/scorecard/v4/log"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/checks"
sce "github.com/ossf/scorecard/v5/errors"
"github.com/ossf/scorecard/v5/finding"
sclog "github.com/ossf/scorecard/v5/log"
)

//nolint:govet
Expand Down
8 changes: 4 additions & 4 deletions attestor/policy/attestation_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (

"github.com/google/go-cmp/cmp"

"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/clients"
sce "github.com/ossf/scorecard/v4/errors"
sclog "github.com/ossf/scorecard/v4/log"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/clients"
sce "github.com/ossf/scorecard/v5/errors"
sclog "github.com/ossf/scorecard/v5/log"
)

func (ap *AttestationPolicy) ToJSON() string {
Expand Down
2 changes: 1 addition & 1 deletion attestor/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package main

import "github.com/ossf/scorecard/v4/attestor/command"
import "github.com/ossf/scorecard/v5/attestor/command"

func main() {
command.Execute()
Expand Down
2 changes: 1 addition & 1 deletion checker/check_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package checker
import (
"context"

"github.com/ossf/scorecard/v4/clients"
"github.com/ossf/scorecard/v5/clients"
)

// CheckRequest struct encapsulates all data to be passed into a CheckFn.
Expand Down
4 changes: 2 additions & 2 deletions checker/check_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"math"

sce "github.com/ossf/scorecard/v4/errors"
"github.com/ossf/scorecard/v4/finding"
sce "github.com/ossf/scorecard/v5/errors"
"github.com/ossf/scorecard/v5/finding"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion checker/check_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"

sce "github.com/ossf/scorecard/v4/errors"
sce "github.com/ossf/scorecard/v5/errors"
)

func TestAggregateScores(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions checker/check_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
opencensusstats "go.opencensus.io/stats"
"go.opencensus.io/tag"

sce "github.com/ossf/scorecard/v4/errors"
"github.com/ossf/scorecard/v4/stats"
sce "github.com/ossf/scorecard/v5/errors"
"github.com/ossf/scorecard/v5/stats"
)

const checkRetries = 3
Expand Down
12 changes: 6 additions & 6 deletions checker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
"context"
"fmt"

"github.com/ossf/scorecard/v4/clients"
ghrepo "github.com/ossf/scorecard/v4/clients/githubrepo"
glrepo "github.com/ossf/scorecard/v4/clients/gitlabrepo"
"github.com/ossf/scorecard/v4/clients/localdir"
"github.com/ossf/scorecard/v4/clients/ossfuzz"
"github.com/ossf/scorecard/v4/log"
"github.com/ossf/scorecard/v5/clients"
ghrepo "github.com/ossf/scorecard/v5/clients/githubrepo"
glrepo "github.com/ossf/scorecard/v5/clients/gitlabrepo"
"github.com/ossf/scorecard/v5/clients/localdir"
"github.com/ossf/scorecard/v5/clients/ossfuzz"
"github.com/ossf/scorecard/v5/log"
)

// GetClients returns a list of clients for running scorecard checks.
Expand Down
2 changes: 1 addition & 1 deletion checker/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"context"
"testing"

"github.com/ossf/scorecard/v4/log"
"github.com/ossf/scorecard/v5/log"
)

func TestGetClients(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions checker/raw_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"time"

"github.com/ossf/scorecard/v4/clients"
"github.com/ossf/scorecard/v4/finding"
"github.com/ossf/scorecard/v5/clients"
"github.com/ossf/scorecard/v5/finding"
)

// RawResults contains results before a policy
Expand Down
2 changes: 1 addition & 1 deletion checker/raw_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package checker
import (
"testing"

"github.com/ossf/scorecard/v4/finding"
"github.com/ossf/scorecard/v5/finding"
)

func TestFile_Location(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion checks/all_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package checks
import (
"os"

"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v5/checker"
)

// allChecks is the list of all registered security checks.
Expand Down
2 changes: 1 addition & 1 deletion checks/all_checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package checks
import (
"testing"

"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v5/checker"
)

func Test_registerCheck(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions checks/binary_artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
package checks

import (
"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/checks/evaluation"
"github.com/ossf/scorecard/v4/checks/raw"
sce "github.com/ossf/scorecard/v4/errors"
"github.com/ossf/scorecard/v4/probes"
"github.com/ossf/scorecard/v4/probes/zrunner"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/checks/evaluation"
"github.com/ossf/scorecard/v5/checks/raw"
sce "github.com/ossf/scorecard/v5/errors"
"github.com/ossf/scorecard/v5/probes"
"github.com/ossf/scorecard/v5/probes/zrunner"
)

// CheckBinaryArtifacts is the exported name for Binary-Artifacts check.
Expand Down
10 changes: 5 additions & 5 deletions checks/binary_artifact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (

"github.com/golang/mock/gomock"

"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/clients"
"github.com/ossf/scorecard/v4/clients/localdir"
"github.com/ossf/scorecard/v4/log"
scut "github.com/ossf/scorecard/v4/utests"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/clients"
"github.com/ossf/scorecard/v5/clients/localdir"
"github.com/ossf/scorecard/v5/log"
scut "github.com/ossf/scorecard/v5/utests"
)

func TestBinaryArtifacts(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions checks/branch_protection.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
package checks

import (
"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/checks/evaluation"
"github.com/ossf/scorecard/v4/checks/raw"
sce "github.com/ossf/scorecard/v4/errors"
"github.com/ossf/scorecard/v4/probes"
"github.com/ossf/scorecard/v4/probes/zrunner"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/checks/evaluation"
"github.com/ossf/scorecard/v5/checks/raw"
sce "github.com/ossf/scorecard/v5/errors"
"github.com/ossf/scorecard/v5/probes"
"github.com/ossf/scorecard/v5/probes/zrunner"
)

// CheckBranchProtection is the exported name for Branch-Protected check.
Expand Down
10 changes: 5 additions & 5 deletions checks/branch_protection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (

"github.com/golang/mock/gomock"

"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/clients"
mockrepo "github.com/ossf/scorecard/v4/clients/mockclients"
sce "github.com/ossf/scorecard/v4/errors"
scut "github.com/ossf/scorecard/v4/utests"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/clients"
mockrepo "github.com/ossf/scorecard/v5/clients/mockclients"
sce "github.com/ossf/scorecard/v5/errors"
scut "github.com/ossf/scorecard/v5/utests"
)

func getBranchName(branch *clients.BranchRef) string {
Expand Down
12 changes: 6 additions & 6 deletions checks/ci_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
package checks

import (
"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/checks/evaluation"
"github.com/ossf/scorecard/v4/checks/raw"
sce "github.com/ossf/scorecard/v4/errors"
"github.com/ossf/scorecard/v4/probes"
"github.com/ossf/scorecard/v4/probes/zrunner"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/checks/evaluation"
"github.com/ossf/scorecard/v5/checks/raw"
sce "github.com/ossf/scorecard/v5/errors"
"github.com/ossf/scorecard/v5/probes"
"github.com/ossf/scorecard/v5/probes/zrunner"
)

const CheckCITests = "CI-Tests"
Expand Down
4 changes: 2 additions & 2 deletions checks/ci_tests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"github.com/golang/mock/gomock"

"github.com/ossf/scorecard/v4/checker"
mockrepo "github.com/ossf/scorecard/v4/clients/mockclients"
"github.com/ossf/scorecard/v5/checker"
mockrepo "github.com/ossf/scorecard/v5/clients/mockclients"
)

func TestCITestsRuntimeError(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions checks/cii_best_practices.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
package checks

import (
"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/checks/evaluation"
"github.com/ossf/scorecard/v4/checks/raw"
sce "github.com/ossf/scorecard/v4/errors"
"github.com/ossf/scorecard/v4/probes"
"github.com/ossf/scorecard/v4/probes/zrunner"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/checks/evaluation"
"github.com/ossf/scorecard/v5/checks/raw"
sce "github.com/ossf/scorecard/v5/errors"
"github.com/ossf/scorecard/v5/probes"
"github.com/ossf/scorecard/v5/probes/zrunner"
)

// CheckCIIBestPractices is the registered name for CIIBestPractices.
Expand Down
10 changes: 5 additions & 5 deletions checks/cii_best_practices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (

"github.com/golang/mock/gomock"

"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/clients"
mockrepo "github.com/ossf/scorecard/v4/clients/mockclients"
sce "github.com/ossf/scorecard/v4/errors"
scut "github.com/ossf/scorecard/v4/utests"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/clients"
mockrepo "github.com/ossf/scorecard/v5/clients/mockclients"
sce "github.com/ossf/scorecard/v5/errors"
scut "github.com/ossf/scorecard/v5/utests"
)

var errTest = errors.New("test error")
Expand Down
12 changes: 6 additions & 6 deletions checks/code_review.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
package checks

import (
"github.com/ossf/scorecard/v4/checker"
"github.com/ossf/scorecard/v4/checks/evaluation"
"github.com/ossf/scorecard/v4/checks/raw"
sce "github.com/ossf/scorecard/v4/errors"
"github.com/ossf/scorecard/v4/probes"
"github.com/ossf/scorecard/v4/probes/zrunner"
"github.com/ossf/scorecard/v5/checker"
"github.com/ossf/scorecard/v5/checks/evaluation"
"github.com/ossf/scorecard/v5/checks/raw"
sce "github.com/ossf/scorecard/v5/errors"
"github.com/ossf/scorecard/v5/probes"
"github.com/ossf/scorecard/v5/probes/zrunner"
)

// CheckCodeReview is the registered name for DoesCodeReview.
Expand Down
Loading

0 comments on commit 0b9dfb6

Please sign in to comment.