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

Cdx1.6 #318

Merged
merged 29 commits into from
Aug 24, 2024
Merged

Cdx1.6 #318

merged 29 commits into from
Aug 24, 2024

Conversation

andreas-hilti
Copy link
Contributor

No description provided.

mtsfoni and others added 25 commits May 19, 2024 16:16
CI/CD: Fix wrong snapshooter path.

Snapshooter was incorrectly searching for snapshots under /_/ on all operating systems. This was resolved on Linux and Windows by creating a symlink to /_/ or [Drive]:/_/. However, macOS does not permit this symlink, so I have decided to skip tests on macOS for now and prioritize other issues.

---

Signed-off-by: Michael Tsfoni <[email protected]>
CycloneDX#265

Update to newer version of JsonSchema.Net 
---------

Signed-off-by: andreas hilti <[email protected]>
Properties needs to be in front of Components.

Signed-off-by: andreas hilti <[email protected]>
Apparently, when implementing 1.5 the enum was implemented twice for two different locations.
=> remove one implementaion

Signed-off-by: Jim Klimov <[email protected]>
Reflects the update in the specification repo: CycloneDX/specification@4017ce4

Signed-off-by: Akshay Bhat <[email protected]>
Fix serialization of enums VolumeMode and DataType
Add test to validate SBOM after round trip

---------

Signed-off-by: andreas hilti <[email protected]>
Co-authored-by: MTsfoni <[email protected]>
Signed-off-by: MTsfoni <[email protected]>
E.g. after downgrading a bom, tools was null, and thus a null value was written. However, an empty array was expected.

Signed-off-by: andreas hilti <[email protected]>
The combination of CycloneDX#246 (add testcase) and CycloneDX#286 (activate strict mode) caused this 'conflict'

Signed-off-by: MTsfoni <[email protected]>
also added roundtrip validation tests for xml

Signed-off-by: MTsfoni <[email protected]>
Signed-off-by: Michael Tsfoni <[email protected]>
CVSSv3.1 was used instead of the correct CVSSv31

Signed-off-by: Bálint József Jánvári <[email protected]>
* Fix serializing multiple licenses to XML

Signed-off-by: andreas hilti <[email protected]>

* Address Static Code Analysis issues

Signed-off-by: andreas hilti <[email protected]>

* Fix tests (remove empty licenses elements)

Signed-off-by: andreas hilti <[email protected]>

* Fix Codacy Static Code Analysis issue

Signed-off-by: andreas hilti <[email protected]>

* Postrebase fixes

Signed-off-by: MTsfoni <[email protected]>

* Fixing testcases after rebase + adding Protoignore to LicenseChoiceList

Somehow without protoIgnore an error was thrown in the deep copy. I assumed that everything that has no ProtoMember was excluded automatically. Seems that assumption was wrong.

---------

Signed-off-by: andreas hilti <[email protected]>
Signed-off-by: MTsfoni <[email protected]>
Co-authored-by: andreas hilti <[email protected]>
Signed-off-by: Michael Tsfoni <[email protected]>
Bumps System.Text.Json from 7.0.2 to 8.0.4.

---
updated-dependencies:
- dependency-name: System.Text.Json
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Michael Tsfoni <[email protected]>
* improve merge performance

Signed-off-by: andreas hilti <[email protected]>

* Override also Equals(object)

Signed-off-by: andreas hilti <[email protected]>

---------

Signed-off-by: andreas hilti <[email protected]>
* Fix metadata tools components

Signed-off-by: andreas hilti <[email protected]>

* namespace tool components and services

Signed-off-by: andreas hilti <[email protected]>

* avoid writing null value in tools

Signed-off-by: andreas hilti <[email protected]>

* namespace also nested tools components

Signed-off-by: andreas hilti <[email protected]>

---------

Signed-off-by: andreas hilti <[email protected]>
Reflects the update in the specification repo: CycloneDX/specification@5f3ee80

Signed-off-by: Akshay Bhat <[email protected]>
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.6.3 to 17.10.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](microsoft/vstest@v17.6.3...v17.10.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps xunit.runner.visualstudio from 2.5.0 to 2.8.2.

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Michael Tsfoni <[email protected]>
Signed-off-by: andreas hilti <[email protected]>
@andreas-hilti andreas-hilti marked this pull request as draft August 18, 2024 12:16
Signed-off-by: andreas hilti <[email protected]>
Signed-off-by: andreas hilti <[email protected]>
Signed-off-by: andreas hilti <[email protected]>
@andreas-hilti
Copy link
Contributor Author

@mtsfoni I have merged main and I have fixed most tests. There are at the moment only 7 failures. One issue is for sure that something goes wrong when downgrading metadata tools (which is based on the protobuf serialization).

@mtsfoni
Copy link
Contributor

mtsfoni commented Aug 18, 2024

The 1.6 branch is a wip with failing tests itself, so it's natuiral that this pr would have failing tests too.

Thank you a lot for the help. Is this ready to merge?

Signed-off-by: andreas hilti <[email protected]>
@andreas-hilti
Copy link
Contributor Author

The 1.6 branch is a wip with failing tests itself, so it's natuiral that this pr would have failing tests too.

Thank you a lot for the help. Is this ready to merge?

Yes, from my point of view the above 4 commits are fine and can be merged into your branch.
The remaining 4 failing tests all go back to the same issue related to metadata tools (from what I can see, the current protobuf serialization implementation only supports the legacy tools, not the components and services:

[XmlElement("tools")]
public ToolChoices Tools { get; set; }
// this is to support a bug in v1.5 of the protobuf spec
[XmlIgnore]
[JsonIgnore]
[ProtoMember(2)]
#pragma warning disable 618
public List<Tool> ProtobufTools
#pragma warning restore 618
{
get => Tools?.Tools;
set
{
if (value == null)
{
Tools = null;
}
else
{
Tools = new ToolChoices
{
Tools = value
};
}
}
}
, but I don't see how this can be changed easily.)

@andreas-hilti andreas-hilti marked this pull request as ready for review August 18, 2024 16:48
@andreas-hilti
Copy link
Contributor Author

The remaining issues are related to CycloneDX/specification#276.

@andreas-hilti
Copy link
Contributor Author

andreas-hilti commented Aug 19, 2024

@mtsfoni andreas-hilti@c3a4c70 would be a workaround for the above issue (it does not fix the underlying issue, though). Like this, all tests would pass.

@mtsfoni mtsfoni merged commit 4a70618 into CycloneDX:cdx1.6 Aug 24, 2024
3 of 7 checks passed
@mtsfoni
Copy link
Contributor

mtsfoni commented Aug 24, 2024

@mtsfoni andreas-hilti@c3a4c70 would be a workaround for the above issue (it does not fix the underlying issue, though). Like this, all tests would pass.

Black magic. But the tests are green. I take it

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.

5 participants