-
Notifications
You must be signed in to change notification settings - Fork 55
Automate SBOM generation for container images #805
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>
jameslamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this started! Doing it in a multi-stage build is a really cool idea, nice way to make it work with the third-party actions we use to build and publish images (no need to manually invoke docker build ourselves).
I see it's been a few weeks since the last activity here... do you need help with anything? Or is this effort just paused right now?
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>
Signed-off-by: Jaya Venkatesh <jjayabaskar@nvidia.com>
|
Hey @jameslamb! This effort has been on pause as I was focusing on creating the notebook for my talk for PyData Boston. I also have PRs open on ci-imgs and devcontainers up for a while. It'd be great if you could glance over them and leave your review for these! I've also looked at the SBOMs generated and there's a lot of fields pertaining to individual files in the Docker images. I am not sure if we need to include every file in the image or if a list of libraries included with the image would do. The current |
|
Ok thanks for the update, sorry for the very long delayed response! Doing this in a multi-stage docker build is a nice approach, I support it.
The more we can include and confidently attribute to a source + a set of licenses, the better. Will just have to see how scanning tools handle the SBOMs we're generating. |
jameslamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few suggestions, things I noticed after reviewing similar changes in rapidsai/ci-imgs#309
|
|
||
| RUN --mount=type=bind,from=notebooks-build,source=/,target=/rootfs,ro \ | ||
| mkdir -p /out && \ | ||
| syft scan \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to rapidsai/ci-imgs#309 (comment), I think this should be moved to a mounted-in script so we only have to set the syft configuration in 1 place.
| ARG LINUX_VER=${LINUX_DISTRO}${LINUX_DISTRO_VER} | ||
|
|
||
| ARG RAPIDS_VER=26.02 | ||
| ARG SYFT_VER=1.32.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to rapidsai/ci-imgs#309 (comment), could you please move the syft version and Alpine tag into versions.yaml?
To be fair, there wasn't a versions.yaml when you started this PR, it was only very recently added: #834
Towards https://github.com/rapidsai/build-infra/issues/280
Adds SBOM to
baseandnotebookimagessyft-basewith the Syft binary installed on a minimal alpine 3.20 image.base-buildandnotebooks-buildto differentiate it from the final image.base-sbom/notebooks-sbomwhere the built stage is mounted to a specified location on thesyft-basestagesyft-scanis done on the mounted location, and an SBOM is generated.