trivy icon indicating copy to clipboard operation
trivy copied to clipboard

Incorrect CPE generated for Debian package

Open 37b opened this issue 1 year ago • 5 comments

Description

The CPE for a Debian package should be cpe:2.3:a:debian:dpkg:1.20.9:*:*:*:*:*:*:* but Trivy reports it as cpe:2.3:a:dpkg:dpkg:1.20.9:*:*:*:*:*:*:*

What did you expect to happen?

The correct CPE cpe:2.3:a:debian:dpkg:1.20.9:*:*:*:*:*:*:*

What happened instead?

The incorrect CPE was generated cpe:2.3:a:dpkg:dpkg:1.20.9:*:*:*:*:*:*:*

37b avatar Jul 26 '22 18:07 37b

@37b thanks for your report. I'll try to clarify this issue

afdesk avatar Aug 02 '22 10:08 afdesk

@37b could you tell me there are any images for tests?

afdesk avatar Aug 03 '22 12:08 afdesk

@afdesk There's no pre-built image for the project, but the code is here https://github.com/DefectDojo/django-DefectDojo

37b avatar Aug 03 '22 18:08 37b

@37b thanks! i can see that this project uses python:3.8.13-slim. it depends on debian 11.4, right?

which format is sensitive for you? i mean where do you see incorrect outpur: cpe:2.3:a:dpkg:dpkg:1.20.9:*:*:*:*:*:*:*?

thanks a lot!

afdesk avatar Aug 04 '22 07:08 afdesk

@afdesk According to the spec (from Wikipedia, I am not an expert)

cpe:<cpe_version>:<part>:<vendor>:<product>:<version>:<update>:<edition>:<language>:<sw_edition>:<target_sw>:<target_hw>:<other>

the first dpkg entry should be the vendor, in this case debian

37b avatar Aug 04 '22 19:08 37b

@37b sorry, I meant where do you see this CPE string? how can i reproduce it? thanks

afdesk avatar Aug 22 '22 13:08 afdesk

@37b sorry, i missed your issue. It seems I asked a weird question.

Trivy depends on several data sources, and it doesn't generate CPE strings. I'd like to figure out where it came from.

so could you confirm that this issue is still appears and where/when Trivy shows the incorrect CPE string?

thanks a lot

afdesk avatar Nov 13 '22 17:11 afdesk

Trivy doesn't generate CPE as of today.

knqyf263 avatar May 15 '23 12:05 knqyf263