Skip to content

Commit

Permalink
Add workflow to generate SBOM (software bill of materials) #561
Browse files Browse the repository at this point in the history
  • Loading branch information
hupf committed Oct 24, 2023
1 parent 2e9fc8d commit a6ab7d0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/bom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: SBOM

on:
push:
branches: [main]

workflow_dispatch:

jobs:
bom:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18]

steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
cache: "npm"

- name: Install @cyclonedx/cyclonedx-npm
run: npm install @cyclonedx/cyclonedx-npm --no-save

- name: Generate BOM
run: npm exec -- cyclonedx-npm --output-format XML --output-file bom.xml

- name: Push BOM to Dependency Track
env:
PROJECT_NAME: bkd-webapp-schulverwaltung
run: |
curl --verbose -s --location --request POST ${{vars.DEPENDENCY_TRACK_URL}}/api/v1/bom \
--header "X-Api-Key: ${{secrets.DEPENDENCY_TRACK_API_KEY}}" \
--header "Content-Type: multipart/form-data" \
--form "autoCreate=true" \
--form "projectName=$PROJECT_NAME" \
--form "projectVersion=latest" \
--form "[email protected]"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![lint test ✨](https://github.com/bkd-mba-fbi/webapp-schulverwaltung/actions/workflows/lintAndTest.yml/badge.svg?branch=main)](https://github.com/bkd-mba-fbi/webapp-schulverwaltung/actions/workflows/lintAndTest.yml)
[![build 🏭 deploy 🚀](https://github.com/bkd-mba-fbi/webapp-schulverwaltung/actions/workflows/buildDeploy.yml/badge.svg)](https://github.com/bkd-mba-fbi/webapp-schulverwaltung/actions/workflows/buildDeploy.yml)
[![SBOM](https://github.com/bkd-mba-fbi/webapp-schulverwaltung/actions/workflows/bom.yml/badge.svg?branch=main)](https://github.com/bkd-mba-fbi/webapp-schulverwaltung/actions/workflows/bom.yml)

JavaScript web module to implement processes for school administration using the SLH.Evento backend (REST API).

Expand Down

0 comments on commit a6ab7d0

Please sign in to comment.