Skip to content

Commit

Permalink
Upload result to GHAS only if JAS entitled
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Sep 5, 2024
1 parent bce4aee commit d5f3ebc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scanrepository/scanrepository.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (cfp *ScanRepositoryCmd) scanAndFixProject(repository *utils.Repository) er
cfp.analyticsService.AddScanFindingsToXscAnalyticsGeneralEventFinalize(scanResults.CountScanResultsFindings(true, true))
}

if repository.GitProvider.String() == vcsutils.GitHub.String() {
if scanResults.ExtendedScanResults != nil && scanResults.ExtendedScanResults.EntitledForJas && repository.GitProvider.String() == vcsutils.GitHub.String() {
// Uploads Sarif results to GitHub in order to view the scan in the code scanning UI
// Currently available on GitHub only
if err = utils.UploadSarifResultsToGithubSecurityTab(scanResults, repository, cfp.scanDetails.BaseBranch(), cfp.scanDetails.Client()); err != nil {
Expand Down

0 comments on commit d5f3ebc

Please sign in to comment.