Skip to content
Open
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
16 changes: 15 additions & 1 deletion .github/workflows/build-and-publish.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/check-release-tag.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions .github/workflows/checks.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/dependency-update.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/fast-tests.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/matrix.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/report.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions exasol/toolbox/templates/github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ jobs:
id: build-artifacts
run: poetry build

- name: Generate SBOM
id: generate-sbom
run: |
pip install cyclonedx-bom
cyclonedx-py environment -o bom.cdx.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run SBOM generation in the Poetry environment

Generated projects install their dependencies through the shared action with plain poetry install, which leaves them in Poetry's virtualenv and is only entered via poetry run later in the action. This command is executed after a plain pip install cyclonedx-bom, so cyclonedx-py environment scans the runner Python environment containing the SBOM tool instead of the project environment that was just built; releases will upload an SPDX file that omits the package/dependencies it is supposed to describe. Generate the SBOM from the Poetry environment or from the lock file instead.

Useful? React with 👍 / 👎.

curl -L https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.32.0/cyclonedx-linux-x64 -o cyclonedx
chmod +x cyclonedx
./cyclonedx convert \
--input-file bom.cdx.json \
--input-format json \
--output-file bom.spdx.json \
--output-format spdxjson

- name: Publish Release to PyPi
id: publish-release-to-pypi
env:
Expand All @@ -47,3 +60,4 @@ jobs:
--title ${GITHUB_REF_NAME}
--notes-file ./doc/changes/changes_${GITHUB_REF_NAME}.md
dist/*
bom.spdx.json