Skip to content

Commit

Permalink
fix breaks (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
eranturgeman authored Dec 15, 2024
1 parent ff61ceb commit 59b44ba
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ require (
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/urfave/cli v1.22.16 // indirect
github.com/vbauerster/mpb/v8 v8.8.3 // indirect
github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 // indirect
github.com/xanzy/go-gitlab v0.110.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
Expand All @@ -120,7 +121,7 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
)

// replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security dev
replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.13.5-0.20241215113932-a42170d6675e

// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 dev

Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-core/v2 v2.57.0 h1:3ON0J6Sjc2+4HZrzh4eSbdciXx3sJsJUIJ3TPQXh/5c=
github.com/jfrog/jfrog-cli-core/v2 v2.57.0/go.mod h1:SThaC/fniC96oN8YgCsHjvOxp5rBM7IppuIybn1oxT0=
github.com/jfrog/jfrog-cli-security v1.13.3 h1:eaZ3Os3bcho8Gm2Kw07xdKvmQLchSJljRqBtZ6iFmnw=
github.com/jfrog/jfrog-cli-security v1.13.3/go.mod h1:GNf/qXZuSsYXfGBH9qobE6Vz5glaGqNpRgU3LWnBrAQ=
github.com/jfrog/jfrog-cli-security v1.13.5-0.20241215113932-a42170d6675e h1:r3maOgLE14EGTi1owQGzOJr+VfMNcoKjKI7J19XwRAU=
github.com/jfrog/jfrog-cli-security v1.13.5-0.20241215113932-a42170d6675e/go.mod h1:j0v2KSW4WGWlNYEhbQ94kIOkeH//sCYhNF6cjl/Nhrs=
github.com/jfrog/jfrog-client-go v1.48.2 h1:YVAIiNWuBEa4NbWL54I+YzvXHaxoHDk532USDKTvgLU=
github.com/jfrog/jfrog-client-go v1.48.2/go.mod h1:1a7bmQHkRmPEza9wva2+WVrYzrGbosrMymq57kyG5gU=
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA=
Expand Down Expand Up @@ -267,6 +267,8 @@ github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8=
github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ=
github.com/vbauerster/mpb/v8 v8.8.3 h1:dTOByGoqwaTJYPubhVz3lO5O6MK553XVgUo33LdnNsQ=
github.com/vbauerster/mpb/v8 v8.8.3/go.mod h1:JfCCrtcMsJwP6ZwMn9e5LMnNyp3TVNpUWWkN+nd4EWk=
github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 h1:JwtAtbp7r/7QSyGz8mKUbYJBg2+6Cd7OjM8o/GNOcVo=
github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74/go.mod h1:RmMWU37GKR2s6pgrIEB4ixgpVCt/cf7dnJv3fuH1J1c=
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
github.com/xanzy/go-gitlab v0.110.0 h1:hsFIFp01v/0D0sdUXoZfRk6CROzZbHQplk6NzKSFKhc=
Expand Down
6 changes: 3 additions & 3 deletions scanpullrequest/scanallpullrequests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package scanpullrequest
import (
"context"
"fmt"
"github.com/jfrog/jfrog-cli-security/utils/xsc"
"path/filepath"
"testing"
"time"
Expand All @@ -14,7 +15,6 @@ import (
"github.com/jfrog/frogbot/v2/utils/outputwriter"
"github.com/jfrog/froggit-go/vcsclient"
"github.com/jfrog/froggit-go/vcsutils"
"github.com/jfrog/jfrog-cli-security/cli"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -103,7 +103,7 @@ func TestShouldNotScanPullRequestError(t *testing.T) {
func TestScanAllPullRequestsMultiRepo(t *testing.T) {
server, restoreEnv := utils.VerifyEnv(t)
defer restoreEnv()
xrayVersion, xscVersion, err := cli.GetJfrogServicesVersion(&server)
xrayVersion, xscVersion, err := xsc.GetJfrogServicesVersion(&server)
assert.NoError(t, err)

_, restoreJfrogHomeFunc := utils.CreateTempJfrogHomeWithCallback(t)
Expand Down Expand Up @@ -168,7 +168,7 @@ func TestScanAllPullRequests(t *testing.T) {
// This integration test, requires JFrog platform connection details
server, restoreEnv := utils.VerifyEnv(t)
defer restoreEnv()
xrayVersion, xscVersion, err := cli.GetJfrogServicesVersion(&server)
xrayVersion, xscVersion, err := xsc.GetJfrogServicesVersion(&server)
assert.NoError(t, err)

falseVal := false
Expand Down
4 changes: 2 additions & 2 deletions scanpullrequest/scanpullrequest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"errors"
"fmt"
"github.com/jfrog/jfrog-cli-security/utils/xsc"
"io"
"net/http"
"net/http/httptest"
Expand All @@ -19,7 +20,6 @@ import (
"github.com/jfrog/froggit-go/vcsclient"
"github.com/jfrog/froggit-go/vcsutils"
coreconfig "github.com/jfrog/jfrog-cli-core/v2/utils/config"
"github.com/jfrog/jfrog-cli-security/cli"
"github.com/jfrog/jfrog-cli-security/utils/formats"
"github.com/jfrog/jfrog-cli-security/utils/formats/sarifutils"
"github.com/jfrog/jfrog-cli-security/utils/jasutils"
Expand Down Expand Up @@ -636,7 +636,7 @@ func testScanPullRequest(t *testing.T, configPath, projectName string, failOnSec
params, restoreEnv := utils.VerifyEnv(t)
defer restoreEnv()

xrayVersion, xscVersion, err := cli.GetJfrogServicesVersion(&params)
xrayVersion, xscVersion, err := xsc.GetJfrogServicesVersion(&params)
assert.NoError(t, err)

// Create mock GitLab server
Expand Down
4 changes: 2 additions & 2 deletions scanrepository/scanmultiplerepositories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/jfrog/jfrog-cli-security/utils/xsc"
"net/http"
"net/http/httptest"
"os"
Expand All @@ -17,7 +18,6 @@ import (
"github.com/jfrog/frogbot/v2/utils"
"github.com/jfrog/froggit-go/vcsclient"
"github.com/jfrog/froggit-go/vcsutils"
"github.com/jfrog/jfrog-cli-security/cli"
"github.com/stretchr/testify/assert"
)

Expand All @@ -30,7 +30,7 @@ func TestScanAndFixRepos(t *testing.T) {
_, restoreJfrogHomeFunc := utils.CreateTempJfrogHomeWithCallback(t)
defer restoreJfrogHomeFunc()

xrayVersion, xscVersion, err := cli.GetJfrogServicesVersion(&serverParams)
xrayVersion, xscVersion, err := xsc.GetJfrogServicesVersion(&serverParams)
assert.NoError(t, err)

baseWd, err := os.Getwd()
Expand Down
8 changes: 4 additions & 4 deletions scanrepository/scanrepository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package scanrepository
import (
"errors"
"fmt"
"github.com/jfrog/jfrog-cli-security/utils/xsc"
"net/http/httptest"
"os"
"os/exec"
Expand All @@ -17,7 +18,6 @@ import (
"github.com/jfrog/froggit-go/vcsclient"
"github.com/jfrog/froggit-go/vcsutils"
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"
"github.com/jfrog/jfrog-cli-security/cli"
"github.com/jfrog/jfrog-cli-security/utils/formats"
"github.com/jfrog/jfrog-cli-security/utils/results"
"github.com/jfrog/jfrog-cli-security/utils/techutils"
Expand Down Expand Up @@ -172,7 +172,7 @@ func TestScanRepositoryCmd_Run(t *testing.T) {
assert.NoError(t, os.Setenv(utils.AllowPartialResultsEnv, "false"))
}()
}
xrayVersion, xscVersion, err := cli.GetJfrogServicesVersion(&serverParams)
xrayVersion, xscVersion, err := xsc.GetJfrogServicesVersion(&serverParams)
assert.NoError(t, err)

var port string
Expand Down Expand Up @@ -304,7 +304,7 @@ pr body
defer restoreEnv()
testDir, cleanup := utils.CopyTestdataProjectsToTemp(t, filepath.Join(rootTestDir, "aggregate-pr-lifecycle"))
defer cleanup()
xrayVersion, xscVersion, err := cli.GetJfrogServicesVersion(&serverParams)
xrayVersion, xscVersion, err := xsc.GetJfrogServicesVersion(&serverParams)
assert.NoError(t, err)
for _, test := range tests {
t.Run(test.testName, func(t *testing.T) {
Expand Down Expand Up @@ -399,7 +399,7 @@ func TestGenerateFixBranchName(t *testing.T) {
func TestPackageTypeFromScan(t *testing.T) {
environmentVars, restoreEnv := utils.VerifyEnv(t)
defer restoreEnv()
xrayVersion, xscVersion, err := cli.GetJfrogServicesVersion(&environmentVars)
xrayVersion, xscVersion, err := xsc.GetJfrogServicesVersion(&environmentVars)
assert.NoError(t, err)

testScan := &ScanRepositoryCmd{OutputWriter: &outputwriter.StandardOutput{}}
Expand Down
3 changes: 1 addition & 2 deletions utils/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"golang.org/x/exp/slices"

"github.com/jfrog/frogbot/v2/utils/outputwriter"
"github.com/jfrog/jfrog-cli-security/cli"
securityutils "github.com/jfrog/jfrog-cli-security/utils"
"github.com/jfrog/jfrog-cli-security/utils/severityutils"

Expand Down Expand Up @@ -422,7 +421,7 @@ func GetFrogbotDetails(commandName string) (frogbotDetails *FrogbotDetails, err
if err != nil {
return
}
xrayVersion, xscVersion, err := cli.GetJfrogServicesVersion(jfrogServer)
xrayVersion, xscVersion, err := xsc.GetJfrogServicesVersion(jfrogServer)
if err != nil {
return
}
Expand Down

0 comments on commit 59b44ba

Please sign in to comment.