Skip to content
Snippets Groups Projects
Verified Commit ded9f171 authored by Konstantin Tsabolov's avatar Konstantin Tsabolov
Browse files

chore: add SBOM files for services and script for generating them

parent 2987d7ee
No related branches found
No related tags found
1 merge request!54Add SBOM files for services and script for generating them
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