Skip to content
Snippets Groups Projects
Commit 18322d7c authored by Steffen Schulze's avatar Steffen Schulze
Browse files

Merge branch 'chore/sbom' into 'main'

Add SBOM files for services and script for generating them

See merge request !54
parents 2987d7ee ded9f171
No related branches found
No related tags found
1 merge request!54Add SBOM files for services and script for generating them
Pipeline #41537 passed
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
#!/usr/bin/env bash
set -e
# Build the images
docker compose -p ocm build
# Get images names
images=$(docker compose -p ocm config --images | grep '^ocm-')
# Generate SBOM for each image
for image in $images; do
# Extract the service name by removing 'ocm-' prefix
service_name=${image#ocm-}
# Execute syft command for each image
echo "Generating SBOM for ${service_name}. Image name: ${image} Output file: apps/${service_name}/sbom.spdx.json"
syft $image -o spdx-json=apps/${service_name}/sbom.spdx.json
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment