jfrog / jfrog-cli

JFrog CLI is a client that provides a simple interface that automates access to the JFrog products.
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
Apache License 2.0
519 stars 224 forks source link

jf scan does not order/sort results consistently #2523

Open anessi opened 2 months ago

anessi commented 2 months ago

Describe the bug

I'm using the following command to scan docker images and save the result as text file in a CI/CD pipeline. We use this result file to track changes between different scans, resp. see if an updated image version fixes or adds some vulnerabilities.

jf scan --extended-table '--watches=min-severity-critical' '--fail=false' <tar>

Current behavior

The issues is that the order of the vulnerabilities is changing each time which makes it impossible to compare the results.

Reproduction steps

Run the command multiple times and compare the resulting content

Expected behavior

It is expected that the result order is consistent. We want to keep the --extended-table format as this is human readable and not use e.g. JSON output with a sorting post processing step (which could be a workaround).

Additionally a CLI option could be provided to control the sorting, but that's not a necessity.

JFrog CLI version

2.55.0

Operating system type and version

Docker Image, Linux

JFrog Artifactory version

No response

JFrog Xray version

3.87.8