Skip to content

sign github actions cache blobs - #60

Merged
crazy-max merged 4 commits into
mainfrom
gha-cache-sign
Jan 7, 2026
Merged

sign github actions cache blobs#60
crazy-max merged 4 commits into
mainfrom
gha-cache-sign

Conversation

@crazy-max

@crazy-maxcrazy-max commented Dec 15, 2025

Copy link
Copy Markdown
Member

follow-up moby/buildkit#6397
fixes#56

Enabling signing for cache blobs in GHA cache backend protects against tampering of remote cache. The approach used here keeps the implementation isolated, transparent, and cost-effective. Local testing shows that the additional overhead introduced by copying the cosign binary into the builder container is negligible.

@crazy-max
crazy-maxforce-pushed the gha-cache-sign branch 8 times, most recently from 9591c5c to 84847abCompareDecember 15, 2025 12:13
@crazy-maxcrazy-max changed the title bake: sign github actions cache blobssign github actions cache blobsDec 15, 2025
Comment thread.github/workflows/build.yml Outdated
env:
BUILDX_VERSION: "v0.30.1"
BUILDKIT_IMAGE: "moby/buildkit:v0.26.2"
BUILDKIT_IMAGE: "crazymax/buildkit:6397"

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Keep in draft until moby/buildkit#6397 is released

@crazy-maxcrazy-max mentioned this pull request Dec 16, 2025
timestampTreshold = 1
tlogThreshold = ${{ matrix.tlogUpload && '1' || '0' }}
subjectAlternativeName = "https://github.com/docker/github-builder-experimental/.github/workflows/bake.yml*"
issuer = "https://token.actions.githubusercontent.com"

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.

Needs to verify source repo, build repo (same as san) and I think also ref (master branch/tag should not verify PR cache)

@crazy-maxcrazy-maxDec 18, 2025

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Added, see aeba44b

@crazy-max
crazy-maxforce-pushed the gha-cache-sign branch 5 times, most recently from cd6b852 to 6d3e37fCompareDecember 18, 2025 15:24
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
env:
BUILDX_VERSION: "v0.30.1"
BUILDKIT_IMAGE: "moby/buildkit:v0.26.2"
BUILDKIT_IMAGE: "moby/buildkit:master@sha256:bdefeba47634c596286beabe68219708ed364c4f1a5e4e9a2e160274712a0e89" # TODO: pin to a specific version when signed gha cache feature is available

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@tonistiigi As discussed pin buildkit image to master

@crazy-max
crazy-max marked this pull request as ready for review January 7, 2026 17:23
@crazy-max
crazy-max merged commit 6a1cfbc into mainJan 7, 2026
285 of 286 checks passed
@crazy-max
crazy-max deleted the gha-cache-sign branch January 7, 2026 17:33
@crazy-maxcrazy-max mentioned this pull request Jan 8, 2026
27 tasks
Sign up for freeto 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.

Cache exporters and SLSA isolation requirements

2 participants

@crazy-max@tonistiigi