Skip to content

Commit

Permalink
fix text
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Oct 17, 2023
1 parent e72129a commit c576584
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xray/utils/resultwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func addXrayLicenseViolationToSarifRun(license formats.LicenseRow, run *sarif.Ru
license.Severity,
MissingCveScore,
getLicenseViolationSummary(license.ImpactedDependencyName, license.ImpactedDependencyVersion, license.LicenseKey),
getLicenseViolationMarkdown(formattedDirectDependencies),
getLicenseViolationMarkdown(license.ImpactedDependencyName, license.ImpactedDependencyVersion, license.LicenseKey, formattedDirectDependencies),
license.Components,
nil,
run,
Expand Down Expand Up @@ -427,8 +427,8 @@ func getLicenseViolationSummary(depName, version, key string) string {
return fmt.Sprintf("Dependency %s version %s is using a license (%s) that is not allowed.", depName, version, key)
}

func getLicenseViolationMarkdown(formattedDirectDependencies string) string {
return fmt.Sprintf("**The following direct dependencies are utilizing the `%s %s` dependency with a `%s` license violation:**\n%s", formattedDirectDependencies)
func getLicenseViolationMarkdown(depName, version, key, formattedDirectDependencies string) string {
return fmt.Sprintf("**The following direct dependencies are utilizing the `%s %s` dependency with `%s` license violation:**\n%s", depName, version, key, formattedDirectDependencies)
}

func getDirectDependenciesFormatted(directDependencies []formats.ComponentRow) (string, error) {
Expand Down

0 comments on commit c576584

Please sign in to comment.