Skip to content

Commit

Permalink
array initialization for schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahCx committed Aug 20, 2024
1 parent efc0b72 commit d012ed8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/commands/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,10 @@ func exportGlSastResults(targetFile string, results *wrappers.ScanResultsCollect

func exportGlScaResults(targetFile string, results *wrappers.ScanResultsCollection, summary *wrappers.ResultSummary) error {
log.Println("Creating Gl-sca Report: ", targetFile)
glScaResult := &wrappers.GlScaResultsCollection{}
glScaResult := &wrappers.GlScaResultsCollection{
Vulnerabilities: []wrappers.GlScaDepVulnerabilities{}, // Ensure this is an array
ScaDependencyFiles: []wrappers.ScaDependencyFile{}, // Ensure this is an array
}
err := addScanToGlScaReport(summary, glScaResult)
if err != nil {
return errors.Wrapf(err, "%s: failed to denerate GL-Sca report ", failedListingResults)
Expand Down

0 comments on commit d012ed8

Please sign in to comment.