Description
When the --detection-priority comprehensive flag is used, Trivy takes the minimum version for a package (see docs).
However, if the package version is specified as a range, Trivy doesn’t trim the end-of-range suffix.
e.g for requests>=2.31.0,<3:
- now:
requests + 2.31.0,<3
- correct:
requests + 2.31.0
Required changes:
Add logic to trim the end-of-range suffix.
We can rely on separators such as , , <, =.
Discussed in #9607