Skip to content

Commit

Permalink
cr review finish
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Sep 30, 2024
1 parent 882ec7b commit b33b31f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions utils/results/output/securityJobSummary.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,8 @@ func RecordSarifOutput(cmdResults *results.SecurityCommandResults, includeVulner
if err != nil || manager == nil {
return
}
if !cmdResults.EntitledForJas {
if !cmdResults.EntitledForJas || !commandsummary.StaticMarkdownConfig.IsExtendedSummary() {
// If no JAS no GHAS
return
}
extended := true
if !extended && !commandsummary.StaticMarkdownConfig.IsExtendedSummary() {
log.Info("Results can be uploaded to Github security tab automatically by upgrading your JFrog subscription.")
return
}
Expand Down
3 changes: 3 additions & 0 deletions utils/xsc/analyticsmetrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func TestAnalyticsMetricsService_createAuditResultsFromXscAnalyticsBasicGeneralE
}
}

// Create a dummy content for general event. 1 SCA scan with 1 vulnerability
// withJas - Add 2 JAS results for each scan type.
// withErr - Add an error to the results.
func getDummyContentForGeneralEvent(withJas, withErr bool) *results.SecurityCommandResults {
vulnerabilities := []services.Vulnerability{{IssueId: "XRAY-ID", Severity: "medium", Cves: []services.Cve{{Id: "CVE-123"}}, Components: map[string]services.Component{"issueId_2_direct_dependency": {}}}}

Expand Down

0 comments on commit b33b31f

Please sign in to comment.