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 25, 2023
1 parent 11d55b4 commit a6f53f5
Show file tree
Hide file tree
Showing 3 changed files with 52 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
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"name": "webapp-schulverwaltung",
"version": "0.0.0",
"homepage": "https://github.com/bkd-mba-fbi/webapp-schulverwaltung/blob/main/README.md",
"bugs": {
"url": "https://github.com/bkd-mba-fbi/webapp-schulverwaltung/issues"
},
"repository": {
"type": "git",
"url": "[email protected]:bkd-mba-fbi/webapp-schulverwaltung.git"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down

0 comments on commit a6f53f5

Please sign in to comment.