Add the CVSS vector field to the analyzer's report module
Why are we doing this work
The library will need to support the additional field added to the security report schema's for CVSS vectors.
Relevant links
https://gitlab.com/gitlab-org/security-products/analyzers/report
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing: Ensure that the JSON representation passes the schema validation.
Implementation plan
-
Add a new file for the CVSS vector struct: cvss_vector.go
andcvss_vector_test.go
. -
Add a struct that contains the following fields: vendor
andvector
. Both strings and with JSON tags. -
Add the struct as omitempty
to theVulnerability
struct with JSON tagcvss_vectors
. -
Add a test that the vectors are printed out.
Verification steps
- Verify that all tests pass and that it's usable in the latest report module version.
Edited by Oscar Tovar