Skip to content

Add SBOM attestations to Docker images - #18252

Merged
zanieb merged 2 commits into
mainfrom
zb/docker-sbom
Mar 3, 2026
Merged

zanieb merged 2 commits into
mainfrom
zb/docker-sbom

Conversation

@zanieb

@zanieb zanieb commented Mar 2, 2026 •

Copy link
Copy Markdown
Member

Adds SBOM attestations https://docs.docker.com/build/metadata/attestations/sbom/

Requires rust-secure-code/cargo-auditable#236 for our uv binaries and their dependencies to be included in the SBOM

You can inspect the SBOM with, e.g.:

docker buildx imagetools inspect ghcr.io/astral-sh/uv-dev:sha-ece6427 --format '{{json .SBOM}}' | jq
docker buildx imagetools inspect ghcr.io/astral-sh/uv-dev:sha-ece6427-python3.9-trixie --format '{{json .SBOM}}' | jq

Also explicitly sets https://docs.docker.com/build/metadata/attestations/slsa-provenance/#max but there appears to be no change as all of the max SLSA data is already present.

@zanieb zanieb changed the title Enable provenance and sboms during Docker builds Enable maximum provenance and SBOM attestations during Docker builds Mar 2, 2026
zanieb added a commit that referenced this pull request Mar 3, 2026
I need to test features that require push to a registry, e.g., #18252,
and want to do so without releasing. This adds publish to a `uv-dev`
namespace and uses the sha instead of the version. It requires the
`release-test` environment, which is allowed from non-main but requires
approval from me to run. It is trigged by the `build:push-docker` label.

See https://github.com/astral-sh/uv/pkgs/container/uv-dev
@zanieb zanieb added the build:push-docker Enable a test push of Docker images with a SHA tag label Mar 3, 2026
@zanieb
zanieb requested review from samypr100 and woodruffw March 3, 2026 16:39
@zanieb
zanieb marked this pull request as ready for review March 3, 2026 16:39
Comment thread Dockerfile
# Install patched cargo-auditable with Zig linker support
RUN cargo install \
--git https://github.com/rust-secure-code/cargo-auditable.git \
--rev caa964b714d8da6b1139b8e7a0a2ba5979235f22 \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just noting for future reference that this is from rust-secure-code/cargo-auditable#236 🙂

@woodruffw woodruffw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@samypr100 samypr100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does depot support provenance and sbom?

@zanieb

zanieb commented Mar 3, 2026

Copy link
Copy Markdown
Member Author

Does depot support provenance and sbom?

It seems like it, I tested it end-to-end.

@zanieb
zanieb merged commit b9abe15 into main Mar 3, 2026
81 checks passed

This branch was previously deployed

1 inactive deployment
release-test — dfa6c546 Deployed Mar 3, 2026 by zanieb via build-docker / annotate uv #36316
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:push-docker Enable a test push of Docker images with a SHA tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants