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

Update to latest 1.6-dev schema and add MLBOM, CBOM data tests #77

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions acdx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": 1,
"bomFormat": "CycloneDX",
"specVersion": "1.4",
"components": [
{
"name": "@ace/otc-components-react-3.0.11.tgz",
"version": "3.0.11",
"licenses": [
{
"license": {
"id": "Requires Review"
}
}
]
},
{
"name": "@ace/otc-components-react-3.0.14.tgz",
"version": "3.0.14",
"licenses": [
{
"license": {
"id": "Requires Review"
}
}
]
}
]
}
19 changes: 19 additions & 0 deletions cmd/validate_cdx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ const (
TEST_CDX_1_6_MIN_REQUIRED = "test/cyclonedx/1.6/cdx-1-6-min-required.json"
)

// Tests for BOM subtypes
const (
TEST_CDX_1_6_MACHINE_LEARNING_BOM = "test/cyclonedx/1.6/cdx-1-6-valid-mlbom-environmental-considerations.json"
TEST_CDX_1_6_CRYPTO_BOM = "test/cyclonedx/1.6/cdx-1-6-valid-cbom-full-1.6.json"
)

// Mature SBOMs used to test various schemas and queries
const (
TEST_CDX_1_3_MATURITY_EXAMPLE_1_BASE = "test/cyclonedx/cdx-1-3-mature-example-1.json"
Expand Down Expand Up @@ -84,6 +90,19 @@ func TestValidateCdx15Mature(t *testing.T) {
innerTestValidate(t, *vti)
}

// Test BOM variants (e.g., MLBOM, CBOM, etc.)
func TestValidateCdx16MachineLearningBOM(t *testing.T) {
vti := NewValidateTestInfoMinimum(TEST_CDX_1_6_MACHINE_LEARNING_BOM)
vti.SchemaVariant = SCHEMA_VARIANT_DEVELOPMENT
innerTestValidate(t, *vti)
}

func TestValidateCdx16CryptographicBOM(t *testing.T) {
vti := NewValidateTestInfoMinimum(TEST_CDX_1_6_CRYPTO_BOM)
vti.SchemaVariant = SCHEMA_VARIANT_DEVELOPMENT
innerTestValidate(t, *vti)
}

// -----------------------------------------------------------
// CycloneDX - (invalid) schema tests
// -----------------------------------------------------------
Expand Down
Loading
Loading