Skip to content

Commit 7e4a1ab

Browse files
committed
Merge branch 'dev' into fix-sbom-component-ref-compare
# Conflicts: # go.mod # go.sum
2 parents 0f00a97 + b1e195a commit 7e4a1ab

File tree

4 files changed

+33
-15
lines changed

4 files changed

+33
-15
lines changed

cli/docs/flags.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ var commandFlags = map[string][]string{
168168
XrCurl: {ServerId},
169169
OfflineUpdate: {LicenseId, From, To, Version, Target, Stream, Periodic},
170170
XrScan: {
171-
Url, user, password, accessToken, ServerId, SpecFlag, Threads, scanRecursive, scanRegexp, scanAnt,
171+
Url, XrayUrl, user, password, accessToken, ServerId, SpecFlag, Threads, scanRecursive, scanRegexp, scanAnt,
172172
scanProjectKey, Watches, RepoPath, Licenses, Sbom, OutputFormat, Fail, ExtendedTable, BypassArchiveLimits, MinSeverity, FixableOnly, ScanVuln, InsecureTls,
173173
binarySca, binarySecrets, binaryWithoutCA, SecretValidation,
174174
},
175175
Enrich: {
176176
Url, user, password, accessToken, ServerId, Threads, InsecureTls,
177177
},
178178
BuildScan: {
179-
Url, user, password, accessToken, ServerId, scanProjectKey, BuildVuln, OutputFormat, Fail, ExtendedTable, Rescan, InsecureTls, TriggerScanRetries,
179+
Url, XrayUrl, user, password, accessToken, ServerId, scanProjectKey, BuildVuln, OutputFormat, Fail, ExtendedTable, Rescan, InsecureTls, TriggerScanRetries,
180180
},
181181
DockerScan: {
182182
Url, XrayUrl, user, password, accessToken, ServerId, scanProjectKey, Watches, RepoPath, Licenses, Sbom, OutputFormat, Fail, ExtendedTable, BypassArchiveLimits, MinSeverity, FixableOnly, ScanVuln, InsecureTls,

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ require (
1111
github.com/gookit/color v1.6.0
1212
github.com/hashicorp/go-hclog v1.6.3
1313
github.com/hashicorp/go-plugin v1.6.3
14-
github.com/jfrog/build-info-go v1.12.5-0.20251209031413-f5f0e93dc8db
15-
github.com/jfrog/froggit-go v1.20.6
14+
github.com/jfrog/build-info-go v1.12.5-0.20251209171349-eb030db986f9
15+
github.com/jfrog/froggit-go v1.20.4
1616
github.com/jfrog/gofrog v1.7.6
1717
github.com/jfrog/jfrog-apps-config v1.0.1
18-
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210074251-c15fabe27f7f
18+
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210120128-176c677fed4c
1919
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251125083543-e689762c4ff0
2020
github.com/jfrog/jfrog-client-go v1.55.1-0.20251209090954-d6b1c70d3a5e
2121
github.com/magiconair/properties v1.8.10
@@ -135,7 +135,7 @@ require (
135135
gopkg.in/warnings.v0 v0.1.2 // indirect
136136
)
137137

138-
// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go dev
138+
// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go master
139139

140140
// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 master
141141

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,16 @@ github.com/jedib0t/go-pretty/v6 v6.7.5 h1:9dJSWTJnsXJVVAbvxIFxeHf/JxoJd7GUl5o3Uz
146146
github.com/jedib0t/go-pretty/v6 v6.7.5/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU=
147147
github.com/jfrog/archiver/v3 v3.6.1 h1:LOxnkw9pOn45DzCbZNFV6K0+6dCsQ0L8mR3ZcujO5eI=
148148
github.com/jfrog/archiver/v3 v3.6.1/go.mod h1:VgR+3WZS4N+i9FaDwLZbq+jeU4B4zctXL+gL4EMzfLw=
149-
github.com/jfrog/build-info-go v1.12.5-0.20251209031413-f5f0e93dc8db h1:5q4hUqZVl7Xt+R+ono5lDH1/lkvV1spnfDtp0VtJqlo=
150-
github.com/jfrog/build-info-go v1.12.5-0.20251209031413-f5f0e93dc8db/go.mod h1:9W4U440fdTHwW1HiB/R0VQvz/5q8ZHsms9MWcq+JrdY=
151-
github.com/jfrog/froggit-go v1.20.6 h1:Xp7+LlEh0m1KGrQstb+u0aGfjRUtv1eh9xQBV3571jQ=
152-
github.com/jfrog/froggit-go v1.20.6/go.mod h1:obSG1SlsWjktkuqmKtpq7MNTTL63e0ot+ucTnlOMV88=
149+
github.com/jfrog/build-info-go v1.12.5-0.20251209171349-eb030db986f9 h1:CL7lp7Y7srwQ1vy1btX66t4wbztzEGQbqi/9tdEz7xk=
150+
github.com/jfrog/build-info-go v1.12.5-0.20251209171349-eb030db986f9/go.mod h1:9W4U440fdTHwW1HiB/R0VQvz/5q8ZHsms9MWcq+JrdY=
151+
github.com/jfrog/froggit-go v1.20.4 h1:N9XkNV00HNjpI8p6xXlF9DrWmvE9hz3z2XRDAYJDweQ=
152+
github.com/jfrog/froggit-go v1.20.4/go.mod h1:obSG1SlsWjktkuqmKtpq7MNTTL63e0ot+ucTnlOMV88=
153153
github.com/jfrog/gofrog v1.7.6 h1:QmfAiRzVyaI7JYGsB7cxfAJePAZTzFz0gRWZSE27c6s=
154154
github.com/jfrog/gofrog v1.7.6/go.mod h1:ntr1txqNOZtHplmaNd7rS4f8jpA5Apx8em70oYEe7+4=
155155
github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY=
156156
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
157-
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210074251-c15fabe27f7f h1:aoYtLX8ImiaYmStWeTXllidkMy1Hpet/TGOjicf1WhU=
158-
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210074251-c15fabe27f7f/go.mod h1:wKTWZqomaLxrHuvVF4iryZ8V4rn6h2y09jbuOBVRQUY=
157+
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210120128-176c677fed4c h1:uMs18TfF/472CsaoI3HAsvyo9B8ChFh855BdicqoT4c=
158+
github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20251210120128-176c677fed4c/go.mod h1:7cCaRhXorlbyXZgiW5bplCExFxlnROaG21K12d8inpQ=
159159
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251125083543-e689762c4ff0 h1:EsasTBE5i2MyCESS/icZxKIlObpGiOyW9K67MAaEWco=
160160
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251125083543-e689762c4ff0/go.mod h1:d9aADumiyjCBvZLffp8wldvP9XFHxcvk2PoOSUYms2g=
161161
github.com/jfrog/jfrog-client-go v1.55.1-0.20251209090954-d6b1c70d3a5e h1:9le3a99UGdBHZXv7vZ7aqxLyBpwMq+sbTWiOaI9pwCU=

utils/xsc/analyticsmetrics.go

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ import (
1111
"github.com/jfrog/jfrog-cli-core/v2/utils/config"
1212
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"
1313
"github.com/jfrog/jfrog-cli-core/v2/utils/usage"
14-
"github.com/jfrog/jfrog-cli-security/jas"
15-
"github.com/jfrog/jfrog-cli-security/utils/results"
16-
"github.com/jfrog/jfrog-cli-security/utils/results/conversion"
1714
clientutils "github.com/jfrog/jfrog-client-go/utils"
1815
"github.com/jfrog/jfrog-client-go/utils/log"
1916
xscservices "github.com/jfrog/jfrog-client-go/xsc/services"
17+
18+
"github.com/jfrog/jfrog-cli-security/jas"
19+
"github.com/jfrog/jfrog-cli-security/utils/results"
20+
"github.com/jfrog/jfrog-cli-security/utils/results/conversion"
2021
)
2122

2223
func CreateAnalyticsEvent(product xscservices.ProductName, eventType xscservices.EventType, serviceDetails *config.ServerDetails) *xscservices.XscAnalyticsGeneralEvent {
@@ -117,6 +118,23 @@ func CreateFinalizedEvent(xrayVersion, multiScanId string, startTime time.Time,
117118
}
118119
}
119120

121+
func SendGitIntegrationEvent(serverDetails *config.ServerDetails, xrayVersion, projectKey, eventType, gitProvider, gitOwner, gitRepository, gitBranch, eventStatus, failureReason string) error {
122+
xscService, err := CreateXscService(serverDetails, xray.WithScopedProjectKey(projectKey))
123+
if err != nil {
124+
return err
125+
}
126+
gitIntegrationEvent := xscservices.GitIntegrationEvent{
127+
EventType: eventType,
128+
GitProvider: gitProvider,
129+
GitOwner: gitOwner,
130+
GitRepository: gitRepository,
131+
GitBranch: gitBranch,
132+
EventStatus: eventStatus,
133+
FailureReason: failureReason,
134+
}
135+
return xscService.SendGitIntegrationEvent(gitIntegrationEvent, xrayVersion)
136+
}
137+
120138
func checkVersionForGitRepoKeyAnalytics(xrayVersion string) bool {
121139
// TODO: Private patch, remove when not needed anymore
122140
if xrayVersion == "3.111.13" {

0 commit comments

Comments
 (0)