CSAF example not working #8165
-
DescriptionHello trivy developers, Unless I am wrong, the "Scan with CSAF VEX" example provided in the v0.58 documentation https://trivy.dev/v0.58/docs/supply-chain/vex/file/#csaf doesn't seem to work as expected: Desired BehaviorI would expect the same behavior described in the mentioned documentation: Actual BehaviorReproduction Steps1. Install trivy 0.58
2. Create the CSAF VEX document as described at https://trivy.dev/v0.58/docs/supply-chain/vex/file/#create-the-csaf-document
3. Run `trivy image debian:11 --vex debian11.vex.csaf`TargetContainer Image ScannerNone Output FormatNone ModeNone Debug OutputThe same as the actual behaviour.Operating SystemLinux Version$ trivy --version
Version: 0.58.0
Vulnerability DB:
Version: 2
UpdatedAt: 2024-12-23 18:16:41.542223648 +0000 UTC
NextUpdate: 2024-12-24 18:16:41.542223197 +0000 UTC
DownloadedAt: 2024-12-23 20:05:15.012377942 +0000 UTCChecklist
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
Hello @santiagorr CSAF example uses example: Anyway i created #8166 to update docs Regards, Dmitriy |
Beta Was this translation helpful? Give feedback.
-
|
#8166 was merged |
Beta Was this translation helpful? Give feedback.
-
|
Hi @DmitriyLewen , First, thanks for replying to this request and trying to improve the docs, that's appreciated. However, I'd like to understand, from trivy's perspective, why do you need to rely on the minor version of the Debian release in this case. In Debian, we are trying to implement proper CSAF version 2.0 documents for our security advisories, but testing them with trivy is very difficult because it is very picky regarding the version number. For instance, if we generate a CSAF document for a specific security advisory, and then later a Debian point release happens (increase the minor version, let's say from 11.8 to 11.9), the generated CSAF document does not work anymore. This is not practical since we would need to update all CSAF documents (security advisories) to point to this new point release. Something interesting to say here, is that a fix that reaches a new Debian point release (minor version) is also available for all the previous minor version. When we increase the minor version a new installer is provided containing all the latest updates, but users can have access to them simply upgrading their system (via terminal for instance), no need to reinstall the system with the new installer. I am not sure how trivy fetches this data, but it would be really helpful if it could use, for instance, the Debian codename (i.e. Debian 11 == Debian bullseye) or simple the major version (ignore the minor). Then our CSAF documents will work for the whole lifetime of that major release. Could you please try to elucidate that to us? TIA! |
Beta Was this translation helpful? Give feedback.
Hello @santiagorr
Thanks for your interest to Trivy.
CSAF example uses
distroqualifier (pkg:deb/debian/[email protected]%2Bdfsg1-0.8?arch=amd64\u0026distro=debian-11.8).So this purl doesn't match
libdbfrom debian11.11.example:
Anyway i crea…