Skip to content

Commit

Permalink
refactor(sbom): add intermediate representation for BOM (aquasecurity…
Browse files Browse the repository at this point in the history
…#6240)

Signed-off-by: knqyf263 <knqyf263@gmail.com>
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
  • Loading branch information
knqyf263 and DmitriyLewen authored Mar 12, 2024
1 parent fb8c516 commit 8fcef35
Show file tree
Hide file tree
Showing 148 changed files with 4,910 additions and 6,141 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ require (
github.com/kylelemons/godebug v1.1.0
github.com/liamg/jfather v0.0.7
github.com/magefile/mage v1.15.0
github.com/mailru/easyjson v0.7.7
github.com/mailru/easyjson v0.7.7 // indirect
github.com/masahiro331/go-disk v0.0.0-20220919035250-c8da316f91ac
github.com/masahiro331/go-ebs-file v0.0.0-20240112135404-d5fbb1d46323
github.com/masahiro331/go-ext4-filesystem v0.0.0-20231208112839-4339555a0cd4
Expand Down
18 changes: 9 additions & 9 deletions integration/testdata/conda-cyclonedx.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"serialNumber": "urn:uuid:3ff14136-e09f-4df9-80ea-000000000001",
"serialNumber": "urn:uuid:3ff14136-e09f-4df9-80ea-000000000004",
"version": 1,
"metadata": {
"timestamp": "2021-08-25T12:20:30+00:00",
Expand All @@ -17,7 +17,7 @@
]
},
"component": {
"bom-ref": "3ff14136-e09f-4df9-80ea-000000000002",
"bom-ref": "3ff14136-e09f-4df9-80ea-000000000001",
"type": "application",
"name": "testdata/fixtures/repo/conda",
"properties": [
Expand All @@ -30,7 +30,7 @@
},
"components": [
{
"bom-ref": "pkg:conda/openssl@1.1.1q?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fopenssl-1.1.1q-h7f8727e_0.json",
"bom-ref": "pkg:conda/openssl@1.1.1q",
"type": "library",
"name": "openssl",
"version": "1.1.1q",
Expand All @@ -54,7 +54,7 @@
]
},
{
"bom-ref": "pkg:conda/pip@22.2.2?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fpip-22.2.2-py38h06a4308_0.json",
"bom-ref": "pkg:conda/pip@22.2.2",
"type": "library",
"name": "pip",
"version": "22.2.2",
Expand All @@ -80,18 +80,18 @@
],
"dependencies": [
{
"ref": "3ff14136-e09f-4df9-80ea-000000000002",
"ref": "3ff14136-e09f-4df9-80ea-000000000001",
"dependsOn": [
"pkg:conda/openssl@1.1.1q?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fopenssl-1.1.1q-h7f8727e_0.json",
"pkg:conda/pip@22.2.2?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fpip-22.2.2-py38h06a4308_0.json"
"pkg:conda/openssl@1.1.1q",
"pkg:conda/pip@22.2.2"
]
},
{
"ref": "pkg:conda/openssl@1.1.1q?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fopenssl-1.1.1q-h7f8727e_0.json",
"ref": "pkg:conda/openssl@1.1.1q",
"dependsOn": []
},
{
"ref": "pkg:conda/pip@22.2.2?file_path=miniconda3%2Fenvs%2Ftestenv%2Fconda-meta%2Fpip-22.2.2-py38h06a4308_0.json",
"ref": "pkg:conda/pip@22.2.2",
"dependsOn": []
}
],
Expand Down
12 changes: 1 addition & 11 deletions integration/testdata/fixtures/sbom/minikube-kbom.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,7 @@
{
"bom-ref": "a62abb1f-cb38-4fde-90f3-2bda3b87ddb2",
"type": "application",
"name": "node-core-components",
"properties": [
{
"name": "aquasecurity:trivy:Class",
"value": "lang-pkgs"
},
{
"name": "aquasecurity:trivy:Type",
"value": "golang"
}
]
"name": "node-core-components"
},
{
"bom-ref": "a6350ac3-52f6-4c5f-a3e3-184b9a634bef",
Expand Down
Loading

0 comments on commit 8fcef35

Please sign in to comment.