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

ci: Replace Syft with sbomify #1536

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 12 additions & 8 deletions .github/workflows/multibuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,21 @@ jobs:
with:
sparse-checkout: packages/dart/sshnoports/pubspec.lock
sparse-checkout-cone-mode: false
- name: Install Syft
uses: anchore/sbom-action/download-syft@fc46e51fd3cb168ffb36c6d1915723c47db58abb # v0.17.7
- name: Download all the tarballs
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: tarballs/
- name: Generate SBOMs
run: |
syft scan file:./packages/dart/sshnoports/pubspec.lock \
-o 'spdx-json=tarballs/dart_sshnoports_sbom.spdx.json' \
-o 'cyclonedx-json=tarballs/dart_sshnoports_sbom.cyclonedx.json'
- name: Generate SBOM
uses: sbomify/github-action@a04e82ca42a0d9e6bdb57a2cb1a8978e96b4f45c # v0.3.0
env:
TOKEN: ${{ secrets.SBOMIFY_TOKEN }}
COMPONENT_ID: '-93khk8pUi'
LOCK_FILE: './packages/dart/sshnoports/pubspec.lock'
SBOM_VERSION: ${{github.ref_name}}
OUTPUT_FILE: 'tarballs/noports_dart-${{github.ref_name}}-sbom.cdx.json'
AUGMENT: true
ENRICH: true
UPLOAD: true
- name: Move packages for signing
run: |
cd tarballs
Expand All @@ -302,7 +306,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `tarballs/` contains the built packages, and the
# Syft produced SBOMs
# sbomify produced SBOMs
run: >-
gh release upload '${{ github.ref_name }}' tarballs/** --repo '${{
github.repository }}'
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/python-sshnpd-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,17 @@ jobs:
with:
name: sshnpd-python-package
path: dist/
- name: Install Syft
uses: anchore/sbom-action/download-syft@fc46e51fd3cb168ffb36c6d1915723c47db58abb # v0.17.7
- name: Generate SBOMs
run: |
syft scan file:./packages/python/sshnpd/requirements.txt \
-o 'spdx-json=dist/python_sshnpd_sbom.spdx.json' \
-o 'cyclonedx-json=dist/python_sshnpd_sbom.cyclonedx.json'
- name: Generate SBOM
uses: sbomify/github-action@a04e82ca42a0d9e6bdb57a2cb1a8978e96b4f45c # v0.3.0
env:
TOKEN: ${{ secrets.SBOMIFY_TOKEN }}
COMPONENT_ID: 'jqh6pn8rti'
LOCK_FILE: './packages/python/sshnpd/requirements.txt'
SBOM_VERSION: ${{github.ref_name}}
OUTPUT_FILE: 'dist/noports_python-${{github.ref_name}}-sbom.cdx.json'
AUGMENT: true
ENRICH: true
UPLOAD: true
- name: Generate SHA256 checksums
working-directory: dist
run: sha256sum * > checksums.txt
Expand Down