Skip to content

Commit 1743363

Browse files
authored
Merge pull request #118 from crazy-max/sbom-cataloging
example: sbom cataloger
2 parents 6139613 + 74cbab6 commit 1743363

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build/

examples/sbom-cataloger/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# syntax=docker/dockerfile:1.5
2+
3+
# Copyright 2024 buildkit-syft-scanner authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
FROM alpine:3.15@sha256:19b4bcc4f60e99dd5ebdca0cbce22c503bbcff197549d7e19dab4f22254dc864 AS base
18+
ARG BUILDKIT_SBOM_SCAN_STAGE=true
19+
COPY <<EOF /empty
20+
EOF
21+
22+
FROM scratch
23+
COPY --from=base /empty /
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"_type": "https://in-toto.io/Statement/v0.1",
3+
"predicateType": "https://spdx.dev/Document",
4+
"subject": [
5+
{
6+
"name": "empty",
7+
"digest": {
8+
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
9+
}
10+
}
11+
],
12+
"predicate": {
13+
"SPDXID": "SPDXRef-DOCUMENT",
14+
"name": "sbom-base",
15+
"packages": [
16+
{
17+
"SPDXID": "SPDXRef-Package-apk-alpine-baselayout-5ede89861c73ee0f",
18+
"copyrightText": "NOASSERTION",
19+
"description": "Alpine base dir structure and init scripts",
20+
"downloadLocation": "https://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout",
21+
"externalRefs": [
22+
{
23+
"referenceCategory": "SECURITY",
24+
"referenceLocator": "cpe:2.3:a:alpine-baselayout:alpine-baselayout:3.2.0-r18:*:*:*:*:*:*:*",
25+
"referenceType": "cpe23Type"
26+
},
27+
{
28+
"referenceCategory": "SECURITY",
29+
"referenceLocator": "cpe:2.3:a:alpine-baselayout:alpine_baselayout:3.2.0-r18:*:*:*:*:*:*:*",
30+
"referenceType": "cpe23Type"
31+
},
32+
{
33+
"referenceCategory": "SECURITY",
34+
"referenceLocator": "cpe:2.3:a:alpine_baselayout:alpine-baselayout:3.2.0-r18:*:*:*:*:*:*:*",
35+
"referenceType": "cpe23Type"
36+
},
37+
{
38+
"referenceCategory": "SECURITY",
39+
"referenceLocator": "cpe:2.3:a:alpine_baselayout:alpine_baselayout:3.2.0-r18:*:*:*:*:*:*:*",
40+
"referenceType": "cpe23Type"
41+
},
42+
{
43+
"referenceCategory": "SECURITY",
44+
"referenceLocator": "cpe:2.3:a:alpine:alpine-baselayout:3.2.0-r18:*:*:*:*:*:*:*",
45+
"referenceType": "cpe23Type"
46+
},
47+
{
48+
"referenceCategory": "SECURITY",
49+
"referenceLocator": "cpe:2.3:a:alpine:alpine_baselayout:3.2.0-r18:*:*:*:*:*:*:*",
50+
"referenceType": "cpe23Type"
51+
},
52+
{
53+
"referenceCategory": "PACKAGE-MANAGER",
54+
"referenceLocator": "pkg:apk/alpine/alpine-baselayout@3.2.0-r18?arch=x86_64\u0026distro=alpine-3.15.11",
55+
"referenceType": "purl"
56+
}
57+
],
58+
"filesAnalyzed": true,
59+
"licenseConcluded": "NOASSERTION",
60+
"licenseDeclared": "GPL-2.0-only",
61+
"name": "alpine-baselayout",
62+
"originator": "Person: Natanael Copa (ncopa@alpinelinux.org)",
63+
"packageVerificationCode": {
64+
"packageVerificationCodeValue": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
65+
},
66+
"sourceInfo": "acquired package info from APK DB: /lib/apk/db/installed",
67+
"supplier": "Person: Natanael Copa (ncopa@alpinelinux.org)",
68+
"versionInfo": "3.2.0-r18"
69+
}
70+
]
71+
}
72+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"_type": "https://in-toto.io/Statement/v0.1",
3+
"predicateType": "https://spdx.dev/Document",
4+
"predicate": {
5+
"SPDXID": "SPDXRef-DOCUMENT",
6+
"name": "sbom",
7+
"packages": [
8+
{
9+
"SPDXID": "SPDXRef-DocumentRoot-Directory-sbom",
10+
"downloadLocation": "NOASSERTION",
11+
"filesAnalyzed": false,
12+
"licenseConcluded": "NOASSERTION",
13+
"licenseDeclared": "NOASSERTION",
14+
"name": "sbom",
15+
"primaryPackagePurpose": "FILE",
16+
"supplier": "NOASSERTION"
17+
}
18+
]
19+
}
20+
}

0 commit comments

Comments
 (0)