Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing Properties #39

Merged
merged 8 commits into from
May 20, 2022
Merged

Conversation

desenna
Copy link
Contributor

@desenna desenna commented May 19, 2022

Closes #38

desenna added 2 commits May 19, 2022 09:35
Signed-off-by: Mike de Senna <desenna@gmail.com>
Signed-off-by: Mike de Senna <desenna@gmail.com>
@desenna desenna force-pushed the fix/vuln-properties branch from 2b2b2d8 to db25930 Compare May 19, 2022 13:35
Signed-off-by: Mike de Senna <desenna@gmail.com>
@desenna desenna marked this pull request as ready for review May 19, 2022 13:43
@desenna desenna requested a review from a team as a code owner May 19, 2022 13:43
Signed-off-by: Mike de Senna <desenna@gmail.com>
Copy link
Member

@nscuro nscuro left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @desenna!

Besides TestVulnerability_Properties currently panicking, the snapshot files for valid-vulnerability.json and valid-vulnerability.xml have to be updated.

You can do that by running

UPDATE_SNAPSHOTS=true make test

cyclonedx_test.go Show resolved Hide resolved
desenna added 2 commits May 19, 2022 15:19
Signed-off-by: Mike de Senna <desenna@gmail.com>
Signed-off-by: Mike de Senna <desenna@gmail.com>
@desenna desenna requested a review from nscuro May 19, 2022 19:22
@nscuro
Copy link
Member

nscuro commented May 19, 2022

Welp, looks like you discovered a bug in the XML schema! 🚀

I filed a bug for this in the specification repo: CycloneDX/specification#147

Unfortunate, but it may take some time for the schema to be updated. For now you could comment out the properties in valid-vulnerability.xml (but not the JSON file) and regenerate the snapshots. That should make the test pass.

@desenna
Copy link
Contributor Author

desenna commented May 19, 2022

Yep, discovered a bug. Just wanted to check with my teammate that I wasn't crazy. Ok, going to add new commit now.

desenna added 2 commits May 19, 2022 16:46
This reverts commit 75c4a5f.

Signed-off-by: Mike de Senna <desenna@gmail.com>
Signed-off-by: Mike de Senna <desenna@gmail.com>
@@ -116,6 +116,12 @@
</versions>
</target>
</affects>
<!-- <properties>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: #40

@nscuro nscuro merged commit 5f285ff into CycloneDX:master May 20, 2022
@desenna desenna deleted the fix/vuln-properties branch May 20, 2022 13:28
@desenna
Copy link
Contributor Author

desenna commented May 20, 2022

Thanks for merging @nscuro . Any idea when this can be released as a v0.5.3 so we can use it? If easy to do, would it be possible to release today so I don't have to code a workaround on my side and then undo it? 😉

@nscuro
Copy link
Member

nscuro commented May 20, 2022

I'm on the go currently but I'll most likely release v0.6.0 later today. Give me 1-2 hours.

@nscuro
Copy link
Member

nscuro commented May 20, 2022

@desenna Just pushed v0.6.0. Thanks again for your PR!

@desenna
Copy link
Contributor Author

desenna commented May 20, 2022

@desenna Just pushed v0.6.0. Thanks again for your PR!

Thanks @nscuro !!

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.

[bug] Add Properties to cyclonedx.Vulnerability
2 participants