Fixes pipeline dependency #57
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Phase 1 - Keycloak | |
on: [push] | |
env: | |
TRIVY_VERSION: 0.54.1 | |
KEYCLOAK_TAG: 25.0.4 | |
SBOMQS_VERSION: 0.1.9 | |
jobs: | |
Generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Trivy | |
run: | | |
curl -L -o /tmp/trivy.tgz \ | |
"https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" | |
tar xvf /tmp/trivy.tgz -C /tmp | |
chmod +x /tmp/trivy | |
- name: Checkout Keycloak | |
run: | | |
curl -L -o /tmp/keycloak.tgz \ | |
"https://github.com/keycloak/keycloak/archive/refs/tags/${KEYCLOAK_TAG}.tar.gz" | |
tar xvf /tmp/keycloak.tgz -C . | |
- name: Generate SBOM with Trivy | |
run: | | |
/tmp/trivy fs \ | |
--timeout 20m0s \ | |
--parallel 0 \ | |
--format cyclonedx \ | |
--output /tmp/keycloak-sbom.cdx.json \ | |
keycloak-${KEYCLOAK_TAG} | |
/tmp/trivy fs \ | |
--timeout 20m0s \ | |
--parallel 0 \ | |
--format spdx-json \ | |
--output /tmp/keycloak-sbom.spdx.json \ | |
keycloak-${KEYCLOAK_TAG} | |
- name: Upload CycloneDX SBOM | |
uses: actions/upload-artifact@v4 | |
with: | |
name: keycloak-sbom-cyclonedx | |
path: "/tmp/keycloak-sbom.cdx.json" | |
- name: Upload SPDX SBOM | |
uses: actions/upload-artifact@v4 | |
with: | |
name: keycloak-sbom-spdx | |
path: "/tmp/keycloak-sbom.spdx.json" | |
Augment: | |
runs-on: ubuntu-latest | |
needs: Generate | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v4 | |
- name: Augment Keycloak CycloneDX | |
run: | | |
echo "Augment of CycloneDX not supported." | |
- name: Augment Keycloak SPDX | |
run: | | |
echo "Augment of SPDX not supported." | |
Enrich: | |
runs-on: ubuntu-latest | |
needs: Generate | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v4 | |
- name: Enrich Keycloak CycloneDX | |
run: | | |
echo "Enrichment of CycloneDX not supported." | |
- name: Enrich Keycloak SPDX | |
run: | | |
echo "Enrichment of SPDX not supported." | |
Consolidate: | |
runs-on: ubuntu-latest | |
needs: Enrich | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v4 | |
Validate: | |
needs: Consolidate | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download SBOMs | |
uses: actions/download-artifact@v4 | |
- name: Install sbomqs | |
run: | | |
curl -L -o /tmp/sbomqs \ | |
"https://github.com/interlynk-io/sbomqs/releases/download/v${SBOMQS_VERSION}/sbomqs-linux-amd64" | |
chmod +x /tmp/sbomqs | |
- name: "Display SBOM quality score through sbomqs" | |
run: | | |
echo \`\`\` >> ${GITHUB_STEP_SUMMARY} | |
for SBOM in $(find . -iname *.json); do | |
/tmp/sbomqs score "$SBOM" >> ${GITHUB_STEP_SUMMARY} | |
done | |
echo \`\`\` >> ${GITHUB_STEP_SUMMARY} |