bug(conan): Trivy doesn't parse the .conan2/p
directory to detect the license for the v2 lock file.
#6931
Closed
2 tasks done
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/license
Issues relating to license scanning
Discussed in #6926
Originally posted by manifestori June 14, 2024
Description
I have used Trivy to generate SBOMs for Conan projects using lockfiles v2.
Unfortuantly, even though its supported in V1, license parsing using
cache
dir doesn't work.The root cause is:
It's an easy fix, but
cacheDir = path.Join(cacheDir, ".conan", "data")
is not the path for v2.v2 uses
~/.conan2/p/
, so usingCONAN_USER_HOME
still won't work. even if you set it to~/.conan2/p/
it will appenddata
. thus, unable to parse license data from cache.I have copied my files to v1 location and parsing went perfectly.
Desired Behavior
Licenses should be parse on lockfile v2
Actual Behavior
No license data was found in the non-existent cache.
Reproduction Steps
Target
Filesystem
Scanner
None
Output Format
JSON
Mode
None
Debug Output
Operating System
OSX
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: