Skip to content

Unable to marshal Xray Scan Report #468

@romelusw

Description

@romelusw

Describe the bug
CVSV2 and CVSV3 Max score properties appear to be float types in the API response of https://www.jfrog.com/confluence/display/JFROG/Xray+REST+API#XrayRESTAPI-GetVulnerabilitiesReportContent. My initial PR for the new reports endpoint attempted to correct that data type in the scan.go resource:#428 (comment), however, @eyalbe4 suggested reverting the fix and is now causing marshaling issues when using the go library.

To Reproduce

Expected behavior
API response should be translatable to the models defined in https://github.com/jfrog/jfrog-client-go/tree/master/xray/services.

Versions

  • Xray_version: 3.27.4,
  • Xray_revision: 426aac5

Additional context
Sample vulnerability CVE payload:
"cves": [ { "cve": "CVE-2021-21285", "cvss_v2_score": 4.3, "cvss_v2_vector": "CVSS:2.0/AV:N/AC:M/Au:N/C:N/I:N/A:P", "cvss_v3_score": 6.5, "cvss_v3_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H" } ],

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions