fix(release): copy vendor tarball into kodata instead of symlink#10418
Merged
tekton-robot merged 1 commit intoJul 14, 2026
Conversation
ko v0.19.0 enforces that kodata symlinks must not resolve outside the kodata root (ko-build/ko#1619). The run-ko step symlinked cmd/*/kodata/source.tar.gz to a file in an external tmpdir, which ko now rejects, breaking release image publishing. Copy the tarball into each kodata/ directory instead. ko already dereferences symlinks when tarring kodata, so this has no effect on final image size. Signed-off-by: Jawed khelil <jkhelil@redhat.com> Assisted-by: Claude Sonnet 5 (via Cursor) Co-authored-by: Cursor <cursoragent@cursor.com>
Member
|
/kind misc |
vdemeester
approved these changes
Jul 10, 2026
Collaborator
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
kov0.19.0 enforces thatkodata/symlinks must not resolve outside thekodata root (ko-build/ko#1619), a deliberate security hardening. The
run-kostep intekton/publish.yamlsymlinkscmd/*/kodata/source.tar.gzto a tarball written to an external
mktemp -ddirectory:Once
koresolves against an image built withko>= v0.19.0, thissymlink gets rejected:
We hit this exact error in
tektoncd/chains' release pipeline afterbumping the pinned
ghcr.io/tektoncd/plumbing/koimage digest, whichpulled in
kov0.19.1 (fixed there intektoncd/chains#1791).
I checked and
tekton/publish.yaml's currently pinnedkoimage digestalso resolves to
kov0.19.1, sopipeline's release pipeline is exposedto the same failure the next time it publishes images.
This is the same class of issue already fixed for the
kodata/LICENSEsymlinks in #10358 — this PR applies the same style of fix to the
remaining
source.tar.gzsymlink.Fix
Copy the tarball into each
cmd/*/kodata/directory instead ofsymlinking to it from a shared tmpdir.
koalready dereferences symlinksand embeds the resolved file's bytes into the image layer when tarring
kodata (that's the reason the check exists — to stop arbitrary host file
content from leaking into images), so this has no effect on the final
image size for any
cmd/*binary; only the symlink itself was rejected,not the underlying content. It does mean the vendor tarball is now
written to disk once per
cmd/*/kodata/directory during the buildinstead of shared via symlink, which is a small, bounded amount of extra
temporary disk usage during
ko resolve(not in the final image).Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind bugRelease Notes
Made with Cursor