From f31c09d8c5d84812f7eb8858e2c4cddee90315ed Mon Sep 17 00:00:00 2001 From: Prabhnoor Singh <159748206+sprabhnoor@users.noreply.github.com> Date: Mon, 19 Oct 2026 15:42:41 -0500 Subject: [PATCH 1/3] Add SBOM generation, artifact upload, and attestation to CI --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f653f7..a5e44b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,11 @@ jobs: name: Build runs-on: ubuntu-latest needs: test + permissions: + contents: read + id-token: write + attestations: write + artifact-metadata: write defaults: run: working-directory: frontend @@ -71,6 +76,36 @@ jobs: - run: npm ci - run: npm run build + - name: Generate frontend SBOM + uses: anchore/sbom-action@v0 + with: + path: frontend/dist + format: spdx-json + output-file: TheHealthApp-frontend-sbom.spdx.json + upload-artifact: false + + - name: Upload frontend SBOM + uses: actions/upload-artifact@v4 + with: + name: TheHealthApp-frontend-sbom + path: TheHealthApp-frontend-sbom.spdx.json + if-no-files-found: error + + - name: Attest frontend SBOM provenance + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/attest@v4 + with: + subject-path: TheHealthApp-frontend-sbom.spdx.json + + - name: Verify frontend SBOM attestation + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + working-directory: ${{ github.workspace }} + env: + GH_TOKEN: ${{ github.token }} + run: | + gh attestation verify TheHealthApp-frontend-sbom.spdx.json \ + --repo ${{ github.repository }} + - uses: actions/upload-artifact@v4 with: name: build-output From 2d3bc9fd35c2e617c77778cd6950a27474cf81af Mon Sep 17 00:00:00 2001 From: Prabhnoor Singh <159748206+sprabhnoor@users.noreply.github.com> Date: Mon, 19 Oct 2026 15:45:14 -0500 Subject: [PATCH 2/3] Trigger CI From 50f7a5375b189960258255380135b7ad5c074f51 Mon Sep 17 00:00:00 2001 From: Prabhnoor Singh <159748206+sprabhnoor@users.noreply.github.com> Date: Tue, 20 Oct 2026 18:21:35 -0500 Subject: [PATCH 3/3] Add lockfile-based SBOM for frontend dependencies --- .github/workflows/ci.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5e44b4..ba6c1c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,28 +84,40 @@ jobs: output-file: TheHealthApp-frontend-sbom.spdx.json upload-artifact: false - - name: Upload frontend SBOM + - name: Generate frontend dependencies SBOM + uses: anchore/sbom-action@v0 + with: + file: frontend/package-lock.json + format: spdx-json + output-file: TheHealthApp-frontend-deps-sbom.spdx.json + upload-artifact: false + + - name: Upload frontend SBOMs uses: actions/upload-artifact@v4 with: - name: TheHealthApp-frontend-sbom - path: TheHealthApp-frontend-sbom.spdx.json + name: TheHealthApp-frontend-sboms + path: | + TheHealthApp-frontend-sbom.spdx.json + TheHealthApp-frontend-deps-sbom.spdx.json if-no-files-found: error - name: Attest frontend SBOM provenance if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: actions/attest@v4 with: - subject-path: TheHealthApp-frontend-sbom.spdx.json - - - name: Verify frontend SBOM attestation + subject-path: | + TheHealthApp-frontend-sbom.spdx.json + TheHealthApp-frontend-deps-sbom.spdx.json + + - name: Verify frontend SBOM attestations if: github.event_name == 'push' && github.ref == 'refs/heads/main' working-directory: ${{ github.workspace }} env: GH_TOKEN: ${{ github.token }} run: | - gh attestation verify TheHealthApp-frontend-sbom.spdx.json \ - --repo ${{ github.repository }} - + gh attestation verify TheHealthApp-frontend-sbom.spdx.json --repo ${{ github.repository }} + gh attestation verify TheHealthApp-frontend-deps-sbom.spdx.json --repo ${{ github.repository }} + - uses: actions/upload-artifact@v4 with: name: build-output