Skip to content

ci: default-deny the workflow token (permissions: contents: read) #54

ci: default-deny the workflow token (permissions: contents: read)

ci: default-deny the workflow token (permissions: contents: read) #54

Workflow file for this run

# SPDX-License-Identifier: AGPL-3.0-or-later
# CycloneDX SBOM generation via anchore/syft
# Gap T-2: US Executive Order 14028, EU Cyber Resilience Act (CRA) compliance
name: SBOM
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
permissions:
contents: write
jobs:
sbom:
name: Generate CycloneDX SBOM
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Generate SBOM (CycloneDX JSON)
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
with:
path: .
format: cyclonedx-json
output-file: signet-forge-sbom.cdx.json
artifact-name: signet-forge-sbom
- name: Generate SBOM (SPDX JSON)
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
with:
path: .
format: spdx-json
output-file: signet-forge-sbom.spdx.json
artifact-name: signet-forge-sbom-spdx
- name: Upload SBOMs as release assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
with:
files: |
signet-forge-sbom.cdx.json
signet-forge-sbom.spdx.json
- name: Upload SBOM artifacts (non-release)
if: "!startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: sbom
path: |
signet-forge-sbom.cdx.json
signet-forge-sbom.spdx.json
retention-days: 90