Skip to content

feat: serialize/normalizer bom.vulnerabilities#722

Merged
jkowalleck merged 12 commits intomainfrom
normalize-vulnerability
May 15, 2023
Merged

feat: serialize/normalizer bom.vulnerabilities#722
jkowalleck merged 12 commits intomainfrom
normalize-vulnerability

Conversation

@jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented May 8, 2023

fixes #164

)

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@codacy-production
Copy link

codacy-production bot commented May 8, 2023

Coverage summary from Codacy

Merging #722 (74a8f11) into main (7fa0716) - See PR on Codacy

Coverage variation Diff coverage
+0.08% (target: -1.00%) 96.60% (target: 90.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (7fa0716) 5898 5799 98.32%
Head commit (74a8f11) 6679 (+781) 6572 (+773) 98.40% (+0.08%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#722) 883 853 96.60%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

jkowalleck and others added 3 commits May 8, 2023 13:58
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
* feat: `bom.vulnerabilities` JSON normalization/serialization (#164)

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Address straightforward PR comments

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Address comments on time-based properties

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `bom-ref` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Correct `references` of serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `ratings` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `cwes` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `advisories` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `credits` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `tools` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `analysis` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `properties` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Add `affects` to serialized `vulnerability`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Refactor type names for `Normalized.Vulnerability.*`

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* Discrimate `Vulnerability.bomRef`s

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>

* cs-fix

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>

* tests: fix expected

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>

---------

Signed-off-by: Xavier Maso <xavier.maso@oracle.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck
Copy link
Member Author

MODELS REVIEWED, JSON REVIEWED.
will continue writing XML soon

supportsToolReferences: boolean
requiresComponentVersion: boolean
supportsProperties: (model: any) => boolean
supportsVulnerabilities: boolean
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚡ breaking change

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
…es/154 (#727)

implement XML normalization according to CycloneDX/specification#154

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck marked this pull request as ready for review May 12, 2023 10:30
@jkowalleck jkowalleck requested a review from a team as a code owner May 12, 2023 10:30
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck changed the title [WIP] feat: serialize/normalizer bom.vulnerabilities feat: serialize/normalizer bom.vulnerabilities May 15, 2023
@jkowalleck jkowalleck merged commit 28cd418 into main May 15, 2023
@jkowalleck jkowalleck deleted the normalize-vulnerability branch May 15, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

complete support for Bom.Vulnerabilities

2 participants