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

SBOM composite action workflow #226

Merged
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
13 changes: 13 additions & 0 deletions .github/actions/sbom-convert/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Action for converting CycloneDX SBOM files to SPDX format
runs:
using: "composite"
steps:
- name: Install CycloneDX
run: |
wget https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.24.2/cyclonedx-linux-x64
chmod a+x cyclonedx-linux-x64
shell: bash
- name: Convert SBOM
run: |
./cyclonedx-linux-x64 convert --input-format json --output-format spdxjson --input-file cyclonedx-sbom.json --output-file spdx.json
shell: bash
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Generate SBOM
run: |
pip install cyclonedx-bom
cyclonedx-py --e --format json -o cyclonedx-sbom.json
- name: Convert SBOM
uses: duosecurity/duo_client_python/.github/actions/sbom-convert@master
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ include README.md
include duo_client/ca_certs.pem
include requirements.txt
include requirements-dev.txt
include spdx.json