Skip to content

Commit

Permalink
add syft to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmehl committed Sep 20, 2024
1 parent bb3cdfb commit 22c5c6e
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/selftest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,21 @@ on:
pull_request:

jobs:
# Generate SBOM using cdxgen, but with NPMJS package, not Docker container
sbom-gen:
# Generate SBOM using syft
sbom-gen-syft:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: mkdir -p ~/.local/bin
- name: Install syft
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b ~/.local/bin
- name: Install compliance-assistant
uses: ./.github/actions/poetrybuild
- name: Generate SBOM with syft
run: poetry run compliance-assistant sbom generate -v -g syft -d . -o ${{ runner.temp }}/sbom-raw.json

# Generate SBOM using cdxgen (npm package)
sbom-gen-cdxgen:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand All @@ -29,7 +42,7 @@ jobs:
# Enrich the generated SBOM
sbom-enrich:
runs-on: ubuntu-22.04
needs: sbom-gen
needs: sbom-gen-cdxgen
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/poetrybuild
Expand Down

0 comments on commit 22c5c6e

Please sign in to comment.