Skip to content

Commit

Permalink
Add SBOM to GitHub dependency graph
Browse files Browse the repository at this point in the history
  • Loading branch information
prodrigestivill committed Aug 14, 2024
1 parent 74f4d8e commit 4f9b24a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/sbom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish SBOM
on:
workflow_dispatch: # can be manually dispatched under GitHub's "Actions" tab

jobs:
sbom:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Install Syft
uses: anchore/sbom-action/download-syft@v0

- name: Generate SBOM with Syft from latest AMD64 image
run: syft scan registry:${{ vars.DOCKERHUB_REPO }}@latest --platform linux/amd64 --select-catalogers "+sbom-cataloger" --output spdx-json=sbom.spdx.json

- name: Upload SBOM artifact
uses: actions/upload-artifact@v4
with:
name: docker-sbom
path: sbom.spdx.json

- name: Upload SBOM to GitHub dependency submission API
uses: advanced-security/[email protected]
with:
filePath: sbom.spdx.json

0 comments on commit 4f9b24a

Please sign in to comment.