chore: replace Syft with Trivy for SBOM generation in build and release workflows
This commit is contained in:
@@ -36,9 +36,9 @@ jobs:
|
||||
|
||||
zypper --non-interactive in nodejs libxml2-tools git curl
|
||||
|
||||
- name: Install Syft
|
||||
- name: Install Trivy
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
|
||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v7
|
||||
@@ -68,8 +68,8 @@ jobs:
|
||||
|
||||
- name: Generate SBOM
|
||||
run: |
|
||||
syft dir:/tmp/build/build/image-root -o spdx-json@2.2 > ./dist/openSUSE-Leap-16.0-Minimal-gitea-build-${{ steps.vars.outputs.sha_short }}.spdx.json
|
||||
syft dir:/tmp/build/build/image-root -o cyclonedx-json@1.6 > ./dist/openSUSE-Leap-16.0-Minimal-gitea-build-${{ steps.vars.outputs.sha_short }}.cdx.json
|
||||
trivy fs --format spdx-json --output ./dist/openSUSE-Leap-16.0-Minimal-gitea-build-${{ steps.vars.outputs.sha_short }}.spdx.json /tmp/build/build/image-root
|
||||
trivy fs --format cyclonedx --output ./dist/openSUSE-Leap-16.0-Minimal-gitea-build-${{ steps.vars.outputs.sha_short }}.cdx.json /tmp/build/build/image-root
|
||||
|
||||
- name: Upload Disk Image
|
||||
uses: actions/upload-artifact@v7
|
||||
|
||||
@@ -17,9 +17,9 @@ jobs:
|
||||
run: |
|
||||
zypper --non-interactive in nodejs libxml2-tools git curl jq
|
||||
|
||||
- name: Install Syft
|
||||
- name: Install Trivy
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
|
||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v7
|
||||
@@ -35,8 +35,8 @@ jobs:
|
||||
|
||||
- name: Generate SBOM
|
||||
run: |
|
||||
syft dir:/tmp/build/build/image-root -o spdx-json@2.2 > ./dist/openSUSE-Leap-16.0-Minimal-${{ github.ref_name }}.spdx.json
|
||||
syft dir:/tmp/build/build/image-root -o cyclonedx-json@1.6 > ./dist/openSUSE-Leap-16.0-Minimal-${{ github.ref_name }}.cdx.json
|
||||
trivy fs --format spdx-json --output ./dist/openSUSE-Leap-16.0-Minimal-${{ github.ref_name }}.spdx.json /tmp/build/build/image-root
|
||||
trivy fs --format cyclonedx --output ./dist/openSUSE-Leap-16.0-Minimal-${{ github.ref_name }}.cdx.json /tmp/build/build/image-root
|
||||
|
||||
# 1. Gitea Release erstellen und Image-Datei als Asset anhängen
|
||||
- name: Create Gitea Release
|
||||
|
||||
Reference in New Issue
Block a user