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

[DPE-2137] Add SBOM generation #31

Merged
merged 3 commits into from
Jul 26, 2023
Merged

[DPE-2137] Add SBOM generation #31

merged 3 commits into from
Jul 26, 2023

Conversation

dragomirp
Copy link
Contributor

Issue

Need to generate SBOM manifest for future security auditing

Solution

Add a workflow to generate the manifest

@dragomirp
Copy link
Contributor Author

An example of the expected end result can be seen here. There's a charmed-mysql_8.0.33-22.04_edge_amd64.rock.spdx.json artefact in the summary.

@dragomirp dragomirp marked this pull request as ready for review June 26, 2023 12:27
@dragomirp dragomirp requested review from a team, paulomach and shayancanonical June 26, 2023 12:27
@dragomirp dragomirp changed the title Add SBOM generation [DPE-2137] Add SBOM generation Jun 26, 2023
Copy link
Contributor

@carlcsaposs-canonical carlcsaposs-canonical left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@paulomach paulomach left a comment

Choose a reason for hiding this comment

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

great. Should this be on data-platform-workflows though?

Copy link
Contributor

@shayancanonical shayancanonical left a comment

Choose a reason for hiding this comment

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

lgtm! i defer to alex on security concers

uses: actions/checkout@v3
- name: Install Syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
Copy link
Contributor

Choose a reason for hiding this comment

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

@dragomirp after some internal discussions, please replace here "main" with "v0.85.0", it should be safe enough to merge it AS IS, until we have a final SBOM Canonical vision. Tnx!

Suggested change
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
curl -sSfL https://raw.githubusercontent.com/anchore/syft/v0.85.0/install.sh | sh -s -- -b /usr/local/bin

Copy link
Contributor

Choose a reason for hiding this comment

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

@taurus-forever That doesn't address security concerns—the tag can be moved. Suggest pinning to a commit hash instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@carlcsaposs-canonical I intend to move this to check the image from the registry, so it wouldn't matter if the artefact is potentially changed, but I can't promise it would be this pulse.

Copy link
Contributor

Choose a reason for hiding this comment

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

My point is that main and v0.85.0 are essentially the same from a security perspective—in the short term, I think we should either stay with main or move to a commit hash

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Running syft at the end against the registry instead of the artefact would address this, since at that point the artefact is already published.

Copy link
Contributor

Choose a reason for hiding this comment

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

but I can't promise it would be this pulse

For the commit hash, I'm only referring to short-term (i.e. this PR)

@dragomirp dragomirp merged commit 875848b into 8.0-22.04 Jul 26, 2023
7 of 10 checks passed
@dragomirp dragomirp deleted the dpe-2137-sbom branch July 26, 2023 13:17
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.

5 participants