Joel Rudsberg 7b74bd8bd8
Integrate Native Image SBOM with GitHub's Dependency Submission API (#119)
Co-authored-by: Fabio Niephaus <fabio.niephaus@oracle.com>
2025-01-21 09:00:42 +01:00

19 lines
498 B
Bash

#!/bin/bash
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
required_patterns=(
'"pkg:maven/org.json/json@20241224"'
'"main-test-app"'
'"svm"'
'"nativeimage"'
)
for pattern in "${required_patterns[@]}"; do
echo "Checking for $pattern"
if ! grep -q "$pattern" "$script_dir/target/main-test-app.sbom.json"; then
echo "Pattern not found: $pattern"
exit 1
fi
done
echo "SBOM was successfully generated and contained the expected components"