Skip to content

fix(suse): save CVSSScoreSets as array#401

Open
DmitriyLewen wants to merge 2 commits intoaquasecurity:mainfrom
DmitriyLewen:fix/suse/cvss-scores-as-array
Open

fix(suse): save CVSSScoreSets as array#401
DmitriyLewen wants to merge 2 commits intoaquasecurity:mainfrom
DmitriyLewen:fix/suse/cvss-scores-as-array

Conversation

@DmitriyLewen
Copy link
Contributor

@DmitriyLewen DmitriyLewen commented Jan 26, 2026

Description

Change CVSSScoreSets field from single object to array in SUSE CVRF parser to support multiple CVSS scores per vulnerability (e.g., NVD score and SUSE score)
e.g. https://ftp.suse.com/pub/projects/security/cvrf/cvrf-suse-su-2016%3A0304-1.xml

Test plan

  • Add test case with multiple CVSSScoreSets in XML test data
  • Update golden files to reflect new array format
  • Verify empty CVSSScoreSets fields are omitted from output

- add test case with multiple CVSSScoreSets
- remove empty CVSSScoreSets fields
@knqyf263
Copy link
Collaborator

knqyf263 commented Jan 27, 2026

Won't it cause the same problem as #398 since it changes the type of the existing field?

@DmitriyLewen
Copy link
Contributor Author

yeah, I also thought about this.
I wait response from Trivy Premium team.

@DmitriyLewen DmitriyLewen marked this pull request as ready for review February 2, 2026 07:37
@DmitriyLewen
Copy link
Contributor Author

@knqyf263 Premium team approved these changes.
They don't use CVSSScoreSets field.

@knqyf263
Copy link
Collaborator

knqyf263 commented Feb 2, 2026

However, it is used in trivy-db. And if they are unable to update trivy-db to the latest commit, wouldn’t parsing still fail?
https://github.com/aquasecurity/trivy-db/blob/b8dd3abe2347b4da5a7a2f1bbb2457dbbe74e806/pkg/vulnsrc/suse-cvrf/types.go#L49

@DmitriyLewen
Copy link
Contributor Author

Nice catch!
I wrote them about this.

@gshanbhag525
Copy link
Contributor

can we add a new field with updated type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants