trivy icon indicating copy to clipboard operation
trivy copied to clipboard

Split properties for SARIF result

Open nvuillam opened this issue 2 years ago • 10 comments

Hi,

Thanks for your great tool !

As SARIF format supports properties with any key / value in it, would it be possible, to make a result more exploitable, to add the following values in those extra properties ?

https://github.com/aquasecurity/trivy/blob/11f4f811236ca05cfb30827e25f312eec45ca097/pkg/report/sarif.go#L143

Properties could be the ones not already present as standalone value on a result item:

  • packageName
  • installedVersion
  • fixedVersion
message: fmt.Sprintf("Package: %v\nInstalled Version: %v\nVulnerability %v\nSeverity: %v\nFixed Version: %v\nLink: [%v](%v)",
					vuln.PkgName, vuln.InstalledVersion, vuln.VulnerabilityID, vuln.Severity, vuln.FixedVersion, vuln.VulnerabilityID, vuln.PrimaryURL)

Many thanks & best regards :)

nvuillam avatar Feb 16 '22 07:02 nvuillam

@nvuillam thanks for your interest in trivy. we'll definitely consider this suggestion.

afdesk avatar Feb 17 '22 05:02 afdesk

Many thanks ! :)

nvuillam avatar Feb 17 '22 07:02 nvuillam

it seems that SARIF format returns many less details than the JSON one :/

image

Would it be possible to also return in "properties" SARIF item everything that is returned by JSON result ? thanks :)

image

Also, as we woud need that soon, would it be possible to have an estimated time for delivery of this feature ? Or if you have not enough bandwith, I coudl eventually make my first PR is GO ?

nvuillam avatar Feb 23 '22 18:02 nvuillam

@nvuillam sorry, i missed your comment.

Or if you have not enough bandwith, I coudl eventually make my first PR is GO ?

it would be great! we welcome contributors!

afdesk avatar Mar 03 '22 15:03 afdesk

This issue is stale because it has been labeled with inactivity.

github-actions[bot] avatar May 03 '22 00:05 github-actions[bot]

Not stale :(

nvuillam avatar May 03 '22 01:05 nvuillam

This issue is stale because it has been labeled with inactivity.

github-actions[bot] avatar Jul 03 '22 00:07 github-actions[bot]

Still not stale :(

nvuillam avatar Jul 07 '22 14:07 nvuillam

This issue is stale because it has been labeled with inactivity.

github-actions[bot] avatar Sep 06 '22 00:09 github-actions[bot]

And again not stale 🤡

nvuillam avatar Sep 06 '22 00:09 nvuillam