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

airbyte-ci: generate SBOM on publish #44377

Merged

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Aug 19, 2024

What

Closes https://github.com/airbytehq/airbyte-internal-issues/issues/8989
Closes https://github.com/airbytehq/airbyte-internal-issues/issues/8990

We want to expose an url to our connector SBOM in our connector registry.
But we first have to generate them, and the publish is the right place as this can be considered as a connector release artifact.

How

Update our publish pipeline to:

  • Generate an SBOM from the published docker image, in SPDX JSON format using syft
  • Upload the generated SBOM file to our metadata-service bucket

NB: If the connector was already published we still perform the SBOM generation/upload, this will allow a simple backfill for already published connector version.

Example

I pre-released source-faker from this branch, it uploaded the following SBOM to our metadata service bucket (which has the connectors.airbyte.com CDN):

https://connectors.airbyte.com/files/sbom/airbyte/source-faker/6.2.9-dev.e955ad82c7.spdx.json

User Impact

None, this should be transparent to developers.

Copy link

vercel bot commented Aug 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2024 9:54am

@alafanechere alafanechere force-pushed the augustin/08-18-airbyte-ci_generate_SBOM_on_publish branch from e955ad8 to fdece45 Compare August 19, 2024 09:54
@alafanechere alafanechere marked this pull request as ready for review August 19, 2024 10:20
@alafanechere alafanechere requested a review from a team as a code owner August 19, 2024 10:20
Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

Looks good!

context: PublishConnectorContext
title = "Upload SBOM to metadata service bucket"
SBOM_KEY_PREFIX = "sbom"
SYFT_DOCKER_IMAGE = "anchore/syft:v1.6.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is fine, but I would love us to have good discipline about updating image verisons that are referred to in this manner as a const in Python code in airbyte-ci.

How do we make ourselves a reminder to update these at least quarterly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could centralize all images in a single module with constants. I'm not sure if it's important to update this kind of image which is just a tool and does not takes part in our build process though.

@alafanechere alafanechere merged commit c67c5ba into master Aug 19, 2024
38 checks passed
@alafanechere alafanechere deleted the augustin/08-18-airbyte-ci_generate_SBOM_on_publish branch August 19, 2024 19:00
Copy link

sentry-io bot commented Aug 20, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎

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.

2 participants