SBOM Vulnerability Scanning #6
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
| name: SBOM Check | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: "Apply SBOM check" | |
| required: true | |
| type: choice | |
| options: | |
| - apply | |
| - skip | |
| default: apply | |
| jobs: | |
| sbom-check: | |
| if: ${{ github.event.inputs.environment == 'apply' }} | |
| name: Software Bill of Materials | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Generate SBOM | |
| uses: anchore/sbom-action@v0.9.0 | |
| with: | |
| path: ./ | |
| format: cyclonedx-json | |
| artifact-name: sbom-repo.cdx.json | |
| - name: Upload SBOM artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sbom-${{ github.run_id }} | |
| path: sbom-repo.cdx.json | |
| - name: Clean up SBOM file | |
| run: rm sbom-repo.cdx.json |