chore(main): release 1.1.7 #346
This file contains hidden or 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
| # SPDX-FileCopyrightText: 2024 DB Systel GmbH | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Selftest | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Generate SBOM using syft | |
| sbom-gen-syft: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - 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/uvbuild | |
| - name: Generate SBOM with syft | |
| run: uv run compliance-assistant sbom generate -v -g syft -d . -o ${{ runner.temp }}/sbom-syft.json | |
| env: | |
| SYFT_EXCLUDE: "./.venv,./.git" | |
| - name: Store raw SBOM as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: sbom-syft | |
| path: ${{ runner.temp }}/sbom-syft.json | |
| # Generate SBOM using cdxgen (npm package) | |
| sbom-gen-cdxgen: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install cdxgen | |
| run: npm install -g @cyclonedx/cdxgen | |
| - name: Install compliance-assistant | |
| uses: ./.github/actions/uvbuild | |
| - name: Generate SBOM with cdxgen | |
| run: uv run compliance-assistant sbom generate -v -g cdxgen -d . -o ${{ runner.temp }}/sbom-cdxgen.json | |
| - name: Store raw SBOM as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: sbom-cdxgen | |
| path: ${{ runner.temp }}/sbom-cdxgen.json | |
| # Enrich the generated Syft SBOM | |
| sbom-enrich-syft: | |
| runs-on: ubuntu-24.04 | |
| needs: sbom-gen-syft | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/uvbuild | |
| - name: Download Syft SBOM artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: sbom-syft | |
| path: ${{ runner.temp }} | |
| - name: Enrich Syft SBOM | |
| run: uv run compliance-assistant sbom enrich -v -f ${{ runner.temp }}/sbom-syft.json -o ${{ runner.temp }}/sbom-syft-enriched.json | |
| - name: Print enriched Syft SBOM content | |
| run: cat ${{ runner.temp }}/sbom-syft-enriched.json | |
| - name: Print licenses as found in Syft SBOM | |
| run: uv run compliance-assistant licensing list -f ${{ runner.temp }}/sbom-syft-enriched.json | |
| - name: Store enriched Syft SBOM as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: sbom-syft-enriched | |
| path: ${{ runner.temp }}/sbom-syft-enriched.json | |
| # Enrich the generated cdxgen SBOM | |
| sbom-enrich-cdxgen: | |
| runs-on: ubuntu-24.04 | |
| needs: sbom-gen-cdxgen | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/uvbuild | |
| - name: Download cdxgen SBOM artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: sbom-cdxgen | |
| path: ${{ runner.temp }} | |
| - name: Enrich cdxgen SBOM | |
| run: uv run compliance-assistant sbom enrich -v -f ${{ runner.temp }}/sbom-cdxgen.json -o ${{ runner.temp }}/sbom-cdxgen-enriched.json | |
| - name: Print enriched cdxgen SBOM content | |
| run: cat ${{ runner.temp }}/sbom-cdxgen-enriched.json | |
| - name: Print licenses as found in cdxgen SBOM | |
| run: uv run compliance-assistant licensing list -f ${{ runner.temp }}/sbom-cdxgen-enriched.json | |
| - name: Store enriched cdxgen SBOM as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: sbom-cdxgen-enriched | |
| path: ${{ runner.temp }}/sbom-cdxgen-enriched.json |