Skip to content

Commit

Permalink
examples: add amazonlinux
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Feb 14, 2024
1 parent e6bac58 commit b244e37
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/amazonlinux/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build/
24 changes: 24 additions & 0 deletions examples/amazonlinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1

# Copyright 2024 buildkit-syft-scanner authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM amazonlinux:2 AS base
ARG BUILDKIT_SBOM_SCAN_STAGE=true
RUN yum install -y findutils
COPY <<EOF /empty
EOF

FROM scratch
COPY --from=0 /empty /
35 changes: 35 additions & 0 deletions examples/amazonlinux/checks/sbom-base.spdx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"_type": "https://in-toto.io/Statement/v0.1",
"predicateType": "https://spdx.dev/Document",
"subject": [
{
"name": "empty",
"digest": {
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
}
],
"predicate": {
"SPDXID": "SPDXRef-DOCUMENT",
"name": "sbom-base",
"packages": [
{
"SPDXID": "=package",
"name": "findutils"
}
],
"files": [
{
"SPDXID": "=filename",
"fileName": "/usr/bin/xargs"
}
],
"relationships": [
{
"spdxElementId": "==package",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "==filename"
}
]
}
}
8 changes: 8 additions & 0 deletions examples/amazonlinux/checks/sbom.spdx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"_type": "https://in-toto.io/Statement/v0.1",
"predicateType": "https://spdx.dev/Document",
"predicate": {
"SPDXID": "SPDXRef-DOCUMENT",
"name": "sbom"
}
}

0 comments on commit b244e37

Please sign in to comment.