ci: add matrix test workflow for debian slim images in .gitea #15

Merged
Philipp merged 9 commits from feat-test-matrix-workflow into main 2026-09-15 00:26:58 +02:00
Showing only changes of commit 3b9043a746 - Show all commits
+36 -2
View File
@@ -321,8 +321,25 @@ runs:
err_log="cve-reports/head/cve-${arch}.err" err_log="cve-reports/head/cve-${arch}.err"
echo "Scanning head SBOM for architecture: $arch" echo "Scanning head SBOM for architecture: $arch"
distro_arg=""
if [ "$use_inbuild" = "true" ]; then
detected_distro=$(node -e '
const fs = require("fs");
const content = fs.readFileSync(process.argv[1], "utf8");
const nameMatch = content.match(/[?&]os_name=([^&"\s]+)/);
const verMatch = content.match(/[?&]os_version=([^&"\s]+)/);
if (nameMatch && verMatch) {
console.log(`${nameMatch[1]}/${verMatch[1]}`);
}
' "$f" 2>/dev/null || true)
if [ -n "$detected_distro" ]; then
echo "Detected distribution '${detected_distro}' from in-build SBOM PURLs. Scanning with --distro."
distro_arg="--distro ${detected_distro}"
fi
fi
scan_success=false scan_success=false
if trivy sbom --skip-version-check --format json --output "$out_json" "$f" 2>"$err_log"; then if trivy sbom $distro_arg --skip-version-check --format json --output "$out_json" "$f" 2>"$err_log"; then
scan_success=true scan_success=true
fi fi
@@ -386,8 +403,25 @@ runs:
err_log="cve-reports/target/cve-${arch}.err" err_log="cve-reports/target/cve-${arch}.err"
echo "Scanning target SBOM for architecture: $arch" echo "Scanning target SBOM for architecture: $arch"
distro_arg=""
if [ "$use_inbuild" = "true" ]; then
detected_distro=$(node -e '
const fs = require("fs");
const content = fs.readFileSync(process.argv[1], "utf8");
const nameMatch = content.match(/[?&]os_name=([^&"\s]+)/);
const verMatch = content.match(/[?&]os_version=([^&"\s]+)/);
if (nameMatch && verMatch) {
console.log(`${nameMatch[1]}/${verMatch[1]}`);
}
' "$f" 2>/dev/null || true)
if [ -n "$detected_distro" ]; then
echo "Detected distribution '${detected_distro}' from in-build SBOM PURLs. Scanning with --distro."
distro_arg="--distro ${detected_distro}"
fi
fi
scan_success=false scan_success=false
if trivy sbom --skip-version-check --format json --output "$out_json" "$f" 2>"$err_log"; then if trivy sbom $distro_arg --skip-version-check --format json --output "$out_json" "$f" 2>"$err_log"; then
scan_success=true scan_success=true
fi fi