Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SBOM generation and scanning workflow #153

Merged
merged 5 commits into from
Feb 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ci: Add a workflow that can perform an SBOM generation and scan.
  • Loading branch information
nfelt14 committed Feb 28, 2024
commit 1501f5095e2cabd719460c2014a2af2fbc902372
32 changes: 32 additions & 0 deletions .github/workflows/sbom-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Create & Scan SBOM
on:
push:
branches: [main]
tags: ['*']
pull_request:
branches: [main]
release:
types: [published]
jobs:
create-and-scan-sbom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create SBOM
uses: anchore/sbom-action@v0
with:
format: spdx-json
output-file: ${{ github.event.repository.name }}-sbom.spdx.json
- name: Scan SBOM
uses: anchore/scan-action@v3
id: scan
with:
sbom: ${{ github.event.repository.name }}-sbom.spdx.json
fail-build: true
severity-cutoff: low
- name: Upload SBOM scan SARIF report
if: github.event_name != "pull_request"
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.scan.outputs.sarif }}