diff --git a/go.mod b/go.mod index 3aa65f9c3..53e9d3489 100644 --- a/go.mod +++ b/go.mod @@ -119,9 +119,9 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect ) -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 dev +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240213075115-4bf1fe83505d -// 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.0.2-0.20240214091334-d8ecf2a2cf76 // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go dev diff --git a/go.sum b/go.sum index 1f1452769..c3b6c71a8 100644 --- a/go.sum +++ b/go.sum @@ -886,10 +886,10 @@ github.com/jfrog/gofrog v1.5.1 h1:2AXL8hHu1jJFMIoCqTp2OyRUfEqEp4nC7J8fwn6KtwE= github.com/jfrog/gofrog v1.5.1/go.mod h1:SZ1EPJUruxrVGndOzHd+LTiwWYKMlHqhKD+eu+v5Hqg= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-core/v2 v2.47.12 h1:xsEVdzbdhNGkI8Ey4Othx5+zpgCMnT99Uy71LOn+Q7k= -github.com/jfrog/jfrog-cli-core/v2 v2.47.12/go.mod h1:RVn4pIkR5fPUnr8gFXt61ou3pCNrrDdRQUpcolP4lhw= -github.com/jfrog/jfrog-cli-security v1.0.1 h1:zSyqM+E4QP1GItVYO+JnOCRC/65yV+hWH5BmqOJ+sEE= -github.com/jfrog/jfrog-cli-security v1.0.1/go.mod h1:EH7WtHS6Lg3NCQ3wBcrQ2tjAN9O+4whEW48A20bYq0k= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240213075115-4bf1fe83505d h1:9efTE8NyZV6XtF9XoGq0g3XiEIYjCPdiHVEanxhhnlk= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240213075115-4bf1fe83505d/go.mod h1:+eraSKhahQf7tj09+g3rAA2Z+XPnZGfMc0y8uUDecZw= +github.com/jfrog/jfrog-cli-security v1.0.2-0.20240214091334-d8ecf2a2cf76 h1:VK5FPJgi1OpWxTvUyAzqyO6a1NSX0sjvQ1K5zwgXGUY= +github.com/jfrog/jfrog-cli-security v1.0.2-0.20240214091334-d8ecf2a2cf76/go.mod h1:39Y1SHOpaG8iNTEgBhRqaUBKHaiYrZ5Joa6OwPCFQ64= github.com/jfrog/jfrog-client-go v1.36.1 h1:22Ucy5XdEP1yHEjbN8zOt2dZys5rbwcwhC3l3pcOdf4= github.com/jfrog/jfrog-client-go v1.36.1/go.mod h1:y1WF6eiZ7V2DortiwjpMEicEH6NIJH+hOXI5QI2W3NU= github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA= diff --git a/packagehandlers/mavenpackagehandler.go b/packagehandlers/mavenpackagehandler.go index dc9d2afe2..58e0e82ae 100644 --- a/packagehandlers/mavenpackagehandler.go +++ b/packagehandlers/mavenpackagehandler.go @@ -133,12 +133,13 @@ type pomDependencyDetails struct { func NewMavenPackageHandler(scanDetails *utils.ScanDetails) *MavenPackageHandler { depTreeParams := &java.DepTreeParams{ - Server: scanDetails.ServerDetails, - DepsRepo: scanDetails.DepsRepo, + Server: scanDetails.ServerDetails, + DepsRepo: scanDetails.DepsRepo, + IsMavenDepTreeInstalled: true, } // The mvn-dep-tree plugin has already been installed during the audit dependency tree build phase, // Therefore, we set the `isDepTreeInstalled` flag to true - mavenDepTreeManager := java.NewMavenDepTreeManager(depTreeParams, java.Projects, true) + mavenDepTreeManager := java.NewMavenDepTreeManager(depTreeParams, java.Projects) return &MavenPackageHandler{MavenDepTreeManager: mavenDepTreeManager} } diff --git a/packagehandlers/packagehandlers_test.go b/packagehandlers/packagehandlers_test.go index 1573c47d5..38ced39df 100644 --- a/packagehandlers/packagehandlers_test.go +++ b/packagehandlers/packagehandlers_test.go @@ -511,7 +511,7 @@ func TestGetDependenciesFromDependencyManagement(t *testing.T) { } func TestGetProjectPoms(t *testing.T) { - mvnHandler := &MavenPackageHandler{MavenDepTreeManager: java.NewMavenDepTreeManager(&java.DepTreeParams{}, java.Projects, false)} + mvnHandler := &MavenPackageHandler{MavenDepTreeManager: java.NewMavenDepTreeManager(&java.DepTreeParams{IsMavenDepTreeInstalled: false}, java.Projects)} currDir, err := os.Getwd() assert.NoError(t, err) tmpDir, err := os.MkdirTemp("", "")