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

Generate and upload SBOM #12

Merged
merged 2 commits into from Jun 26, 2023
Merged

Generate and upload SBOM #12

merged 2 commits into from Jun 26, 2023

Conversation

dragomirp
Copy link
Contributor

@dragomirp dragomirp commented Jun 16, 2023

Issue

Generate SBOM manifests for future use by security auditing

Solution

Generate SBOM and upload as artefact in publish workflows

Comment on lines 43 to 49
- name: Create SBOM
run: syft charmed-postgresql_${{env.tag}}_amd64.rock -o spdx-json=charmed-postgresql_${{env.tag}}_amd64.rock.spdx.json
- name: Upload SBOM
uses: actions/upload-artifact@v3
with:
path: "charmed-postgresql_${{env.tag}}_amd64.rock.spdx.json"
name: charmed-postgresql_${{env.tag}}_amd64.rock.spdx.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is an action that can do this, but there is a bug preventing usage with files anchore/sbom-action#389

@dragomirp
Copy link
Contributor Author

Tested with a personal repo. The end result should look like this.

@dragomirp dragomirp marked this pull request as ready for review June 16, 2023 13:27
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Unfortunately, we cannot merge it AS IS, as the workflow has access to GitHub secrets which will leak if https://raw.githubusercontent.com/anchore/syft/main/install.sh is compromised.

We have to extract it into the separate workflow without secrets and exchange SBOM via artifacts. Security... Security... Security...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we should merge this in the build workflow?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say, we will have to merge it as shared data-platform-workflow one day.
Meanwhile, I would prefer to keep it as separate workflow to indicate PoC availability here.

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

LGTM, @carlcsaposs-canonical can you please comment it from your side. Tnx!

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say, we will have to merge it as shared data-platform-workflow one day.
Meanwhile, I would prefer to keep it as separate workflow to indicate PoC availability here.

@dragomirp dragomirp merged commit 77cb443 into 14-22.04 Jun 26, 2023
2 checks passed
@dragomirp dragomirp deleted the dpe-2136-sbom branch June 26, 2023 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants