Skip to content

Commit e6f03e3

Browse files
committed
Get Extended value for SARIF record
1 parent 10e3822 commit e6f03e3

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

commands/audit/sca/pnpm/pnpm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func installProjectIfNeeded(pnpmExecPath, workingDir string) (dirForDependencies
117117
}
118118
}()
119119

120-
// Exclude Visual Studio inner directorty since it is not neccessary for the scan process and may cause race condition.
120+
// Exclude Visual Studio inner directorty since it is not neccessary for the scan process and may cause race condition.
121121
err = biutils.CopyDir(workingDir, dirForDependenciesCalculation, true, []string{sca.DotVsRepoSuffix})
122122
if err != nil {
123123
err = fmt.Errorf("failed copying project to temp dir: %w", err)

commands/audit/sca/python/python.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func getDependencies(auditPython *AuditPython) (dependenciesGraph map[string][]s
9494
)
9595
}()
9696

97-
// Exclude Visual Studio inner directorty since it is not neccessary for the scan process and may cause race condition.
97+
// Exclude Visual Studio inner directorty since it is not neccessary for the scan process and may cause race condition.
9898
err = biutils.CopyDir(wd, tempDirPath, true, []string{sca.DotVsRepoSuffix})
9999
if err != nil {
100100
return

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ require (
111111
gopkg.in/warnings.v0 v0.1.2 // indirect
112112
)
113113

114-
// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 dev
114+
// eyalbe4:expose-checkExtendedSummaryEntitled
115+
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyalbe4/jfrog-cli-core/v2 v2.31.1-0.20241103143946-b834dc94c11b
115116

116117
// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go dev
117118

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej
6060
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
6161
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
6262
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
63+
github.com/eyalbe4/jfrog-cli-core/v2 v2.31.1-0.20241103143946-b834dc94c11b h1:OnxP1FB4rXh0FOFD3VQ3kGgeu7LV5KAE8I1SvMe1yZQ=
64+
github.com/eyalbe4/jfrog-cli-core/v2 v2.31.1-0.20241103143946-b834dc94c11b/go.mod h1:7oHMWVSnX+l9Pj3IkyibQrGnrdkBVD2bf1pBbUAgv/k=
6365
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
6466
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
6567
github.com/forPelevin/gomoji v1.2.0 h1:9k4WVSSkE1ARO/BWywxgEUBvR/jMnao6EZzrql5nxJ8=
@@ -130,8 +132,6 @@ github.com/jfrog/gofrog v1.7.6 h1:QmfAiRzVyaI7JYGsB7cxfAJePAZTzFz0gRWZSE27c6s=
130132
github.com/jfrog/gofrog v1.7.6/go.mod h1:ntr1txqNOZtHplmaNd7rS4f8jpA5Apx8em70oYEe7+4=
131133
github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY=
132134
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
133-
github.com/jfrog/jfrog-cli-core/v2 v2.56.4 h1:LqByz2FmVTDQm/u2xGeTL6O8Hs9JadaTj3QMpel9ZwY=
134-
github.com/jfrog/jfrog-cli-core/v2 v2.56.4/go.mod h1:AwQ9WuOA64g3torX9K5kP0xFAAbchfRInhZwbufoW+Q=
135135
github.com/jfrog/jfrog-client-go v1.47.3 h1:99/JSSgU0rvnM2zWYos2n+Gz1IYLCUoIorE4Xco+Dew=
136136
github.com/jfrog/jfrog-client-go v1.47.3/go.mod h1:NepfaidmK/xiKsVC+0Ur9sANOqL6io8Y7pSaCau7J6o=
137137
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=

utils/results/output/securityJobSummary.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,17 @@ func RecordSecurityCommandSummary(content ScanCommandResultSummary) (err error)
184184
return manager.Record(content)
185185
}
186186

187-
func RecordSarifOutput(cmdResults *results.SecurityCommandResults, includeVulnerabilities, hasViolationContext bool, requestedScans ...utils.SubScanType) (err error) {
187+
func RecordSarifOutput(cmdResults *results.SecurityCommandResults, serverDetails *config.ServerDetails, includeVulnerabilities, hasViolationContext bool, requestedScans ...utils.SubScanType) (err error) {
188188
// Verify if we should record the results
189189
manager, err := getRecordManager()
190190
if err != nil || manager == nil {
191191
return
192192
}
193-
if !cmdResults.EntitledForJas || !commandsummary.StaticMarkdownConfig.IsExtendedSummary() {
193+
extended, err := commandsummary.CheckExtendedSummaryEntitled(serverDetails.Url)
194+
if err != nil {
195+
return
196+
}
197+
if !cmdResults.EntitledForJas || !extended {
194198
// If no JAS no GHAS
195199
log.Info("Results can be uploaded to Github security tab automatically by upgrading your JFrog subscription.")
196200
return

0 commit comments

Comments
 (0)