Skip to content

Commit 246ea66

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents fa02a0f + c5461c1 commit 246ea66

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

common/format/output.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ const (
1515
Json OutputFormat = "json"
1616
SimpleJson OutputFormat = "simple-json"
1717
Sarif OutputFormat = "sarif"
18+
CycloneDx OutputFormat = "cyclonedx"
1819
)
1920

20-
var OutputFormats = []string{string(Table), string(Json), string(SimpleJson), string(Sarif)}
21+
var OutputFormats = []string{string(Table), string(Json), string(SimpleJson), string(Sarif), string(CycloneDx)}
2122

2223
func GetOutputFormat(formatFlagVal string) (format OutputFormat, err error) {
2324
// Default print format is table.
@@ -32,6 +33,8 @@ func GetOutputFormat(formatFlagVal string) (format OutputFormat, err error) {
3233
format = SimpleJson
3334
case string(Sarif):
3435
format = Sarif
36+
case string(CycloneDx):
37+
format = CycloneDx
3538
default:
3639
err = errorutils.CheckErrorf("only the following output formats are supported: " + coreutils.ListToText(OutputFormats))
3740
}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/jedib0t/go-pretty/v6 v6.6.5
1616
github.com/jfrog/build-info-go v1.10.14
1717
github.com/jfrog/gofrog v1.7.6
18-
github.com/jfrog/jfrog-client-go v1.54.1
18+
github.com/jfrog/jfrog-client-go v1.54.2
1919
github.com/magiconair/properties v1.8.9
2020
github.com/manifoldco/promptui v0.9.0
2121
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
@@ -114,7 +114,7 @@ require (
114114
sigs.k8s.io/yaml v1.4.0 // indirect
115115
)
116116

117-
replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20250629142537-bb24db402fe1
117+
// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20250707095624-7062538a0961
118118

119119
// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20250611113558-c1a092f216fd
120120

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ github.com/jfrog/build-info-go v1.10.14 h1:PWnw+rBwiQTHZ5q+84+E8MHFjtAQkB3+Oc2sK
113113
github.com/jfrog/build-info-go v1.10.14/go.mod h1:JcISnovFXKx3wWf3p1fcMmlPdt6adxScXvoJN4WXqIE=
114114
github.com/jfrog/gofrog v1.7.6 h1:QmfAiRzVyaI7JYGsB7cxfAJePAZTzFz0gRWZSE27c6s=
115115
github.com/jfrog/gofrog v1.7.6/go.mod h1:ntr1txqNOZtHplmaNd7rS4f8jpA5Apx8em70oYEe7+4=
116-
github.com/jfrog/jfrog-client-go v1.28.1-0.20250629142537-bb24db402fe1 h1:0t6dQHoalUDNVrfZujD3iCmDGLDl+ndHclFkmONSpq0=
117-
github.com/jfrog/jfrog-client-go v1.28.1-0.20250629142537-bb24db402fe1/go.mod h1:1v0eih4thdPA4clBo9TuvAMT25sGDr1IQJ81DXQ/lBY=
116+
github.com/jfrog/jfrog-client-go v1.54.2 h1:z7GjCyIbV5Wx35USVDCF/0vf/fCWki++pZ7lcKt0gj0=
117+
github.com/jfrog/jfrog-client-go v1.54.2/go.mod h1:1v0eih4thdPA4clBo9TuvAMT25sGDr1IQJ81DXQ/lBY=
118118
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
119119
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
120120
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=

utils/config/config.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
accessAuth "github.com/jfrog/jfrog-client-go/access/auth"
1818
artifactoryAuth "github.com/jfrog/jfrog-client-go/artifactory/auth"
1919
"github.com/jfrog/jfrog-client-go/auth"
20+
catalogAuth "github.com/jfrog/jfrog-client-go/catalog/auth"
2021
distributionAuth "github.com/jfrog/jfrog-client-go/distribution/auth"
2122
evidenceAuth "github.com/jfrog/jfrog-client-go/evidence/auth"
2223
lifecycleAuth "github.com/jfrog/jfrog-client-go/lifecycle/auth"
@@ -578,6 +579,7 @@ type ServerDetails struct {
578579
DistributionUrl string `json:"distributionUrl,omitempty"`
579580
XrayUrl string `json:"xrayUrl,omitempty"`
580581
XscUrl string `json:"xscUrl,omitempty"`
582+
CatalogUrl string `json:"catalogUrl,omitempty"`
581583
MissionControlUrl string `json:"missionControlUrl,omitempty"`
582584
PipelinesUrl string `json:"pipelinesUrl,omitempty"`
583585
AccessUrl string `json:"accessUrl,omitempty"`
@@ -659,6 +661,10 @@ func (serverDetails *ServerDetails) GetXrayUrl() string {
659661
return serverDetails.XrayUrl
660662
}
661663

664+
func (serverDetails *ServerDetails) GetCatalogUrl() string {
665+
return serverDetails.CatalogUrl
666+
}
667+
662668
func (serverDetails *ServerDetails) GetMissionControlUrl() string {
663669
return serverDetails.MissionControlUrl
664670
}
@@ -729,6 +735,12 @@ func (serverDetails *ServerDetails) CreateXrayAuthConfig() (auth.ServiceDetails,
729735
return serverDetails.createAuthConfig(artAuth)
730736
}
731737

738+
func (serverDetails *ServerDetails) CreateCatalogAuthConfig() (auth.ServiceDetails, error) {
739+
catAuth := catalogAuth.NewCatalogDetails()
740+
catAuth.SetUrl(utils.AddTrailingSlashIfNeeded(serverDetails.Url) + "catalog/")
741+
return serverDetails.createAuthConfig(catAuth)
742+
}
743+
732744
func (serverDetails *ServerDetails) CreateXscAuthConfig() (auth.ServiceDetails, error) {
733745
ascAuth := xscAuth.NewXscDetails()
734746
ascAuth.SetUrl(serverDetails.convertXrayUrlToXscUrl())

0 commit comments

Comments
 (0)