chore: sync with upstream google/go-containerregistry - #20
Open
ec-automation[bot] wants to merge 62 commits into
Open
ec-automation[bot] wants to merge 62 commits into
ec-automation[bot] wants to merge 62 commits into
Conversation
Move defer r.Close() and defer pw.Close() to the top of the goroutine so they execute regardless of which error path exits the function. Previously, r.Close() was only called inside the io.Copy error path and the happy-path end, leaving it unclosed when gw.Close() or bw.Flush() failed. When r wraps a limitedReadCloser (used by the pullLimiter introduced in google#2271), failing to close r permanently leaks the limiter token slot. Under layout.WriteImage (used by kaniko for build-stage caching), this eventually deadlocks because all slots are occupied. Also add defer gw.Close() after gw creation so the gzip writer is always properly finalized. Fixes google#2342 Signed-off-by: Aaron <aaroniofjm@gmail.com>
google#2337) When an http.Client-level redirect sends a request to a host that differs from bt.registry, the sendRequest() closure skips setting the Authorization header (its matchesHost guard returns false). The previous code called sendRequest() again after bt.refresh(), so the freshly fetched token was never applied to the retried request and the client received a second 401 instead of succeeding. Fix by reading the token directly from bt.bearer after a successful refresh and setting the Authorization header unconditionally before retrying, bypassing the matchesHost guard that is only needed to prevent header forwarding on client-visible redirects. Closes google#2333
…es (google#2348) * build(deps): bump the go-deps group across 3 directories with 4 updates Bumps the go-deps group with 1 update in the / directory: [golang.org/x/tools](https://github.com/golang/tools). Bumps the go-deps group with 2 updates in the /pkg/authn/k8schain directory: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Bumps the go-deps group with 2 updates in the /pkg/authn/kubernetes directory: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `golang.org/x/tools` from 0.45.0 to 0.46.0 - [Release notes](https://github.com/golang/tools/releases) - [Commits](golang/tools@v0.45.0...v0.46.0) Updates `k8s.io/api` from 0.36.1 to 0.36.2 - [Commits](kubernetes/api@v0.36.1...v0.36.2) Updates `k8s.io/client-go` from 0.36.1 to 0.36.2 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.1...v0.36.2) Updates `k8s.io/api` from 0.36.1 to 0.36.2 - [Commits](kubernetes/api@v0.36.1...v0.36.2) Updates `k8s.io/client-go` from 0.36.1 to 0.36.2 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.1...v0.36.2) Updates `k8s.io/apimachinery` from 0.36.1 to 0.36.2 - [Commits](kubernetes/apimachinery@v0.36.1...v0.36.2) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-version: 0.46.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.36.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.36.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.36.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.36.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/apimachinery dependency-version: 0.36.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com>
Some tools generate tarballs with ./ prefix in paths (e.g. ./manifest.json). Use path.Clean on both header name and target path to ensure they match correctly even if they have different formatting. This fixes loading images that have ./ prefixed paths, which was causing errors like "file manifest.json not found in tar".
…oogle#2349) PR google#2337 made bearerTransport.RoundTrip set the Authorization header unconditionally on the post-401 retry, bypassing the matchesHost guard. That guard exists to stop the credential being forwarded across an http.Client-level redirect to a different host. With it bypassed, a malicious or compromised registry can 302 a manifest/blob fetch to an attacker-controlled host, answer the follow-up request with a Bearer challenge, and harvest the operator's registry token: the client refreshes the token from the trusted realm and then sends it to the redirected host. Gate the re-attach on matchesHost so the refreshed token is only applied when the request is still talking to the registry we authenticated against; for a cross-host request fall back to sendRequest(), which omits the credential. This preserves the google#2333 fix for same-host 401 retries (e.g. mid-session token expiry) while closing the credential leak. Add a regression test for the same-host retry and a test asserting the token is not leaked to a cross-host challenger.
…google#2353) Bumps the go-deps group with 3 updates in the / directory: [github.com/docker/cli](https://github.com/docker/cli), [github.com/moby/moby/api](https://github.com/moby/moby) and [github.com/moby/moby/client](https://github.com/moby/moby). Updates `github.com/docker/cli` from 29.5.3+incompatible to 29.6.0+incompatible - [Commits](docker/cli@v29.5.3...v29.6.0) Updates `github.com/moby/moby/api` from 1.54.2 to 1.55.0 - [Release notes](https://github.com/moby/moby/releases) - [Commits](moby/moby@api/v1.54.2...api/v1.55.0) Updates `github.com/moby/moby/client` from 0.4.1 to 0.5.0 - [Release notes](https://github.com/moby/moby/releases) - [Changelog](https://github.com/moby/moby/blob/v0.5.0/CHANGELOG.md) - [Commits](moby/moby@v0.4.1...v0.5.0) --- updated-dependencies: - dependency-name: github.com/docker/cli dependency-version: 29.6.0+incompatible dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/moby/moby/api dependency-version: 1.55.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/moby/moby/client dependency-version: 0.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.45.0 to 0.52.0. - [Commits](golang/crypto@v0.45.0...v0.52.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.52.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…2368) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.50.0 to 0.52.0. - [Commits](golang/crypto@v0.50.0...v0.52.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.52.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…n/kubernetes (google#2363) * build(deps): bump golang.org/x/net in /pkg/authn/kubernetes Bumps [golang.org/x/net](https://github.com/golang/net) from 0.49.0 to 0.55.0. - [Commits](golang/net@v0.49.0...v0.55.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.55.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…es (google#2377) * build(deps): bump the go-deps group across 3 directories with 7 updates Bumps the go-deps group with 4 updates in the / directory: [github.com/docker/cli](https://github.com/docker/cli), [github.com/klauspost/compress](https://github.com/klauspost/compress), [golang.org/x/sync](https://github.com/golang/sync) and [golang.org/x/tools](https://github.com/golang/tools). Bumps the go-deps group with 2 updates in the /pkg/authn/k8schain directory: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Bumps the go-deps group with 2 updates in the /pkg/authn/kubernetes directory: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `github.com/docker/cli` from 29.6.0+incompatible to 29.6.2+incompatible - [Commits](docker/cli@v29.6.0...v29.6.2) Updates `github.com/klauspost/compress` from 1.18.6 to 1.19.1 - [Release notes](https://github.com/klauspost/compress/releases) - [Commits](klauspost/compress@v1.18.6...v1.19.1) Updates `golang.org/x/sync` from 0.21.0 to 0.22.0 - [Commits](golang/sync@v0.21.0...v0.22.0) Updates `golang.org/x/tools` from 0.46.0 to 0.48.0 - [Release notes](https://github.com/golang/tools/releases) - [Commits](golang/tools@v0.46.0...v0.48.0) Updates `k8s.io/api` from 0.36.2 to 0.36.3 - [Commits](kubernetes/api@v0.36.2...v0.36.3) Updates `k8s.io/client-go` from 0.36.2 to 0.36.3 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.2...v0.36.3) Updates `k8s.io/api` from 0.36.2 to 0.36.3 - [Commits](kubernetes/api@v0.36.2...v0.36.3) Updates `k8s.io/client-go` from 0.36.2 to 0.36.3 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.2...v0.36.3) Updates `k8s.io/api` from 0.36.2 to 0.36.3 - [Commits](kubernetes/api@v0.36.2...v0.36.3) Updates `k8s.io/client-go` from 0.36.2 to 0.36.3 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.2...v0.36.3) Updates `k8s.io/api` from 0.36.2 to 0.36.3 - [Commits](kubernetes/api@v0.36.2...v0.36.3) Updates `k8s.io/apimachinery` from 0.36.2 to 0.36.3 - [Commits](kubernetes/apimachinery@v0.36.2...v0.36.3) Updates `k8s.io/client-go` from 0.36.2 to 0.36.3 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.2...v0.36.3) --- updated-dependencies: - dependency-name: github.com/docker/cli dependency-version: 29.6.2+incompatible dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/klauspost/compress dependency-version: 1.19.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: golang.org/x/sync dependency-version: 0.22.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: golang.org/x/tools dependency-version: 0.48.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/apimachinery dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.36.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com>
…google#2375) Bumps the actions group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `6` | `7` | | [actions/setup-go](https://github.com/actions/setup-go) | `6` | `7` | | [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `6.2.0` | `6.2.3` | | [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `7.2.2` | `7.2.3` | | [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) | `9.2.1` | `9.3.0` | Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6...v7) Updates `actions/setup-go` from 6 to 7 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@v6...v7) Updates `aws-actions/configure-aws-credentials` from 6.2.0 to 6.2.3 - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](aws-actions/configure-aws-credentials@v6.2.0...v6.2.3) Updates `goreleaser/goreleaser-action` from 7.2.2 to 7.2.3 - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](goreleaser/goreleaser-action@v7.2.2...v7.2.3) Updates `golangci/golangci-lint-action` from 9.2.1 to 9.3.0 - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v9.2.1...v9.3.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-go dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: aws-actions/configure-aws-credentials dependency-version: 6.2.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: golangci/golangci-lint-action dependency-version: 9.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: goreleaser/goreleaser-action dependency-version: 7.2.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…oogle#2358) Add the loong64 (LoongArch 64-bit) architecture as a build target in .goreleaser.yml for all three binaries to ensure consistent binary counts across platforms. Go has supported linux/loong64 since Go 1.21.
…le#2370) The compressed side got this guard in google#2304. LayerByDiffID walks the config's rootfs.diff_ids and indexes imgDescriptor.Layers with the same index, so a config declaring more diff_ids than manifest.json lists layers panics with an index out of range instead of returning an error. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
…gle#2360) When a registry request is redirected to a different host that issues its own WWW-Authenticate Bearer challenge, perform a fresh token exchange from that host's own realm rather than falling back silently to no credentials. The original registry's token is never forwarded cross-host (the security invariant from google#2349 is preserved). Anonymous auth is used for the redirected host's token exchange; its token is applied only to the retry against that host. Fixes google#2359
…le#2371) createAddendums walks a config's history and advances a separate layer index only for non-empty history entries, then indexes layers[layerIndex] with no bounds check. A config whose history advertises more non-empty entries than the image has layers panics with an index out of range. Rebase feeds both newConfig.History/newBaseLayers and origConfig.History/origLayers straight in, and both configs come from pulled images, so a crafted base image crashes crane rebase and anything else embedding mutate.Rebase. Return an error describing the mismatch instead, which matches how google#2304 handled the same class on the tarball side. Also fix the leftover-layer loop, which appended layers[layerIndex] instead of layers[i]. layerIndex is frozen after the history walk, so a base image with layers but no history had its first leftover layer repeated in place of the rest. Adds a test for each case against the exported Rebase entry point. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
…ig (google#2356) * daemon: ExposedPorts always dropped from config due to ranging over the wrong map in computeImageConfig
Pushing a manifest with a subject to a registry that lacks the Referrers API maintains an index under the fallback tag scheme, and Referrers reads from it. Some callers want to require the Referrers API instead, so add an option to disable the fallback and fail when the API is unavailable. The default keeps the fallback enabled.
…oogle#2372) * mutate: apply opaque-directory whiteouts (.wh..wh..opq) in Extract Extract did not apply OCI opaque-directory whiteouts (.wh..wh..opq) when flattening layers, so files a lower layer placed in a directory opaqued by an upper layer wrongly reappeared in the merged output. The opaque marker shares the .wh. whiteout prefix, so it matched the generic per-file whiteout check and was mis-parsed as a whiteout of a phantom file named ".wh..opq", never marking the directory opaque. Match the marker exactly and handle it before the generic prefix strip; track opaqued directories per layer and promote them only after the layer is processed, so the opaque layer's own entries survive while lower layers are masked. Adds a regression test. Signed-off-by: Sadman Fahmid <sadmanfahmid@gmail.com> Signed-off-by: Sadman Fahmid <sadmanf@meta.com>
Bumps the go-deps group with 1 update in the / directory: [github.com/moby/moby/client](https://github.com/moby/moby). Updates `github.com/moby/moby/client` from 0.5.0 to 0.5.1 - [Release notes](https://github.com/moby/moby/releases) - [Changelog](https://github.com/moby/moby/blob/v0.5.1/CHANGELOG.md) - [Commits](moby/moby@v0.5.0...v0.5.1) --- updated-dependencies: - dependency-name: github.com/moby/moby/client dependency-version: 0.5.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* actions: update actions to be pinned by hash * actions: explicitly outline permissions for tests
…crane, and krane (google#2412)
…#2411) PR google#510 narrowed credential resolution from the registry to the repository level. CheckPushPermission was never updated. Therefore, a config.json holding both a registry-level entry and a more specific repository-level one made the check reject a push that Write then performed successfully.
The distribution spec's grammar for a repository name is [a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*(/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)* so a path component may be a single character. checkRepository required at least two, so a reference a registry serves happily could not be parsed at all: $ crane ls 127.0.0.1:5555/a Error: parsing repo "127.0.0.1:5555/a": repository must be between 2 and 255 characters in length: a while docker push, docker pull and the registry's own API accept the same name. The minimum for a tag is already 1; only the repository carried a 2. The floor was never a guard against degenerate names: --, .., // and example.com/.. all parse today. It only excluded their single-character subset, along with every valid single-character repository.
…google#2405) Bumps the actions group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.37.4` | `4.37.7` | | [github/codeql-action/autobuild](https://github.com/github/codeql-action) | `4.37.4` | `4.37.7` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.37.4` | `4.37.7` | | [chainguard-dev/actions/boilerplate](https://github.com/chainguard-dev/actions) | `1.6.29` | `1.6.31` | | [chainguard-dev/actions/donotsubmit](https://github.com/chainguard-dev/actions) | `1.6.29` | `1.6.31` | | [chainguard-dev/actions/goimports](https://github.com/chainguard-dev/actions) | `1.6.29` | `1.6.31` | | [chainguard-dev/actions/trailing-space](https://github.com/chainguard-dev/actions) | `1.6.29` | `1.6.31` | | [chainguard-dev/actions/eof-newline](https://github.com/chainguard-dev/actions) | `1.6.29` | `1.6.31` | Updates `github/codeql-action/init` from 4.37.4 to 4.37.7 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@f205ea1...ff2f1c6) Updates `github/codeql-action/autobuild` from 4.37.4 to 4.37.7 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@f205ea1...ff2f1c6) Updates `github/codeql-action/analyze` from 4.37.4 to 4.37.7 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@f205ea1...ff2f1c6) Updates `chainguard-dev/actions/boilerplate` from 1.6.29 to 1.6.31 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@b2555de...bed8050) Updates `chainguard-dev/actions/donotsubmit` from 1.6.29 to 1.6.31 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@b2555de...bed8050) Updates `chainguard-dev/actions/goimports` from 1.6.29 to 1.6.31 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@b2555de...bed8050) Updates `chainguard-dev/actions/trailing-space` from 1.6.29 to 1.6.31 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@b2555de...bed8050) Updates `chainguard-dev/actions/eof-newline` from 1.6.29 to 1.6.31 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@b2555de...bed8050) --- updated-dependencies: - dependency-name: chainguard-dev/actions/boilerplate dependency-version: 1.6.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: chainguard-dev/actions/donotsubmit dependency-version: 1.6.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: chainguard-dev/actions/eof-newline dependency-version: 1.6.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: chainguard-dev/actions/goimports dependency-version: 1.6.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: chainguard-dev/actions/trailing-space dependency-version: 1.6.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: github/codeql-action/analyze dependency-version: 4.37.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: github/codeql-action/autobuild dependency-version: 4.37.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: github/codeql-action/init dependency-version: 4.37.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…google#2415) Bumps the go-deps group with 3 updates in the / directory: [github.com/docker/cli](https://github.com/docker/cli), [github.com/klauspost/compress](https://github.com/klauspost/compress) and [golang.org/x/tools](https://github.com/golang/tools). Updates `github.com/docker/cli` from 29.6.2+incompatible to 29.7.2+incompatible - [Commits](docker/cli@v29.6.2...v29.7.2) Updates `github.com/klauspost/compress` from 1.19.1 to 1.19.2 - [Release notes](https://github.com/klauspost/compress/releases) - [Commits](klauspost/compress@v1.19.1...v1.19.2) Updates `golang.org/x/tools` from 0.48.0 to 0.49.0 - [Release notes](https://github.com/golang/tools/releases) - [Commits](golang/tools@v0.48.0...v0.49.0) --- updated-dependencies: - dependency-name: github.com/docker/cli dependency-version: 29.7.2+incompatible dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/klauspost/compress dependency-version: 1.19.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: golang.org/x/tools dependency-version: 0.49.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(build): unify new build flow into cloudbuild_v2.yaml * fix(build): re-add test step to cloudbuild_v2.yaml
* Reject non-canonical IP literals in all SSRF guards net.ParseIP accepts only canonical dotted-quad IPv4 and canonical IPv6, but the Go dialer also connects to legacy inet_aton forms (32-bit decimal, hex, partial and zero-padded dotted quads) and zone-qualified IPv6. Guards keyed on net.ParseIP therefore never fire for those forms while the request is still delivered to the private address. Route all four guards (realm validation, redirect checking, foreign-layer URLs, blob upload Location) through a shared helper that parses every dialer-accepted IP literal form.
…2428) Signed-off-by: BobDu <i@bobdu.cc>
…es (google#2422) Bumps the go-deps group with 3 updates in the /pkg/authn/k8schain directory: [github.com/gaganhr94/docker-credential-acr](https://github.com/gaganhr94/docker-credential-acr), [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Bumps the go-deps group with 2 updates in the /pkg/authn/kubernetes directory: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `github.com/gaganhr94/docker-credential-acr` from 1.0.2 to 1.0.3 - [Release notes](https://github.com/gaganhr94/docker-credential-acr/releases) - [Commits](gaganhr94/docker-credential-acr@v1.0.2...v1.0.3) Updates `k8s.io/api` from 0.36.3 to 0.36.4 - [Commits](kubernetes/api@v0.36.3...v0.36.4) Updates `k8s.io/client-go` from 0.36.3 to 0.36.4 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.3...v0.36.4) Updates `k8s.io/api` from 0.36.3 to 0.36.4 - [Commits](kubernetes/api@v0.36.3...v0.36.4) Updates `k8s.io/client-go` from 0.36.3 to 0.36.4 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.3...v0.36.4) Updates `k8s.io/apimachinery` from 0.36.3 to 0.36.4 - [Commits](kubernetes/apimachinery@v0.36.3...v0.36.4) --- updated-dependencies: - dependency-name: github.com/gaganhr94/docker-credential-acr dependency-version: 1.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.36.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.36.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.36.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.36.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: k8s.io/apimachinery dependency-version: 0.36.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…e empty (google#2420) * authn: do not overwrite AuthConfig.Auth when username and password are empty AuthConfig.MarshalJSON unconditionally recomputes the auth field from Username and Password: shadow.Auth = encodeDockerConfigFieldAuth(shadow.Username, shadow.Password) When neither is set there is nothing to derive it from, so the field is overwritten with the encoding of ":", i.e. "Og==". Two consequences: AuthConfig{Auth: "dXNlcjpwYXNz"} -> {"auth":"Og=="} AuthConfig{RegistryToken: "bearer"} -> {"auth":"Og==","registrytoken":"bearer"} The first silently discards a valid credential. The second invents an auth field for a config that never had one. Only derive the auth field when a username or a password is present. Configs that carry both are unaffected, including the existing case where a stale Auth is deliberately replaced. Fixes google#1864
…google#2423) Bumps the actions group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.37.7` | `4.37.9` | | [github/codeql-action/autobuild](https://github.com/github/codeql-action) | `4.37.7` | `4.37.9` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.37.7` | `4.37.9` | | [chainguard-dev/actions/boilerplate](https://github.com/chainguard-dev/actions) | `1.6.31` | `1.6.33` | | [chainguard-dev/actions/donotsubmit](https://github.com/chainguard-dev/actions) | `1.6.31` | `1.6.33` | | [chainguard-dev/actions/goimports](https://github.com/chainguard-dev/actions) | `1.6.31` | `1.6.33` | | [chainguard-dev/actions/trailing-space](https://github.com/chainguard-dev/actions) | `1.6.31` | `1.6.33` | | [chainguard-dev/actions/eof-newline](https://github.com/chainguard-dev/actions) | `1.6.31` | `1.6.33` | Updates `github/codeql-action/init` from 4.37.7 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@ff2f1c6...cdf488f) Updates `github/codeql-action/autobuild` from 4.37.7 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@ff2f1c6...cdf488f) Updates `github/codeql-action/analyze` from 4.37.7 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@ff2f1c6...cdf488f) Updates `chainguard-dev/actions/boilerplate` from 1.6.31 to 1.6.33 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@bed8050...0ffab11) Updates `chainguard-dev/actions/donotsubmit` from 1.6.31 to 1.6.33 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@bed8050...0ffab11) Updates `chainguard-dev/actions/goimports` from 1.6.31 to 1.6.33 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@bed8050...0ffab11) Updates `chainguard-dev/actions/trailing-space` from 1.6.31 to 1.6.33 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@bed8050...0ffab11) Updates `chainguard-dev/actions/eof-newline` from 1.6.31 to 1.6.33 - [Release notes](https://github.com/chainguard-dev/actions/releases) - [Commits](chainguard-dev/actions@bed8050...0ffab11) --- updated-dependencies: - dependency-name: chainguard-dev/actions/boilerplate dependency-version: 1.6.32 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: chainguard-dev/actions/donotsubmit dependency-version: 1.6.32 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: chainguard-dev/actions/eof-newline dependency-version: 1.6.32 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: chainguard-dev/actions/goimports dependency-version: 1.6.32 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: chainguard-dev/actions/trailing-space dependency-version: 1.6.32 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: github/codeql-action/analyze dependency-version: 4.37.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: github/codeql-action/autobuild dependency-version: 4.37.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: github/codeql-action/init dependency-version: 4.37.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: BobDu <i@bobdu.cc>
Signed-off-by: Amandeep Singh <mr.ad.iitd@gmail.com>
…le#2414) * validate: support index attestation manifests and empty configs Fix validate.Index and validate.Image failures on multi-architecture images carrying BuildKit attestation and artifact manifests. Fixes google#2409
…oogle#2431) Parsing a reference like https://gcr.io/foo/bar either failed with the generic "could not parse reference" error or, with weak validation, silently succeeded by treating "https:" as the registry host. Detect an http:// or https:// prefix in ParseReference and tell the user to strip the scheme (and to use name.Insecure for plain-HTTP registries).
…gle#2432) The fetcher-side client rejects cross-host redirects to private and link-local addresses via checkRedirectSSRF, but the writer-side clients (makeWriter, makeDeleteClient, the scope-refresh client and CheckPushPermission) never got the same protection, so a malicious registry could redirect push-path requests to internal addresses. Wire checkRedirectSSRF into all four.
* fix(mutate): make Time layer updates lazy Defer layer timestamp rewrites until a layer is actually read, matching the lazy pattern used by the cache package and avoiding upfront work for every layer in an image. Fixes google#1168 Signed-off-by: amarkdotdev <devnull@users.noreply.github.com> * fix(mutate): make Time layer updates lazy Defer layer timestamp rewrites until a layer is actually read, matching the lazy pattern used by the cache package and avoiding upfront work for every layer in an image. Rebased on latest main and preserved LayerOption support. Fixes google#1168 Signed-off-by: Aaron <amark@g.jct.ac.il> * fix(mutate): drop redundant error from layerTime layerTime always returned a nil error; return only v1.Layer so golangci-lint unparam passes on CI. Signed-off-by: Aaron <amark@g.jct.ac.il> --------- Signed-off-by: amarkdotdev <devnull@users.noreply.github.com> Signed-off-by: Aaron <amark@g.jct.ac.il>
…es (google#2439) Bumps the go-deps group with 1 update in the /pkg/authn/k8schain directory: [k8s.io/client-go](https://github.com/kubernetes/client-go). Bumps the go-deps group with 1 update in the /pkg/authn/kubernetes directory: [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/client-go` from 0.36.4 to 0.37.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.4...v0.37.0) Updates `k8s.io/api` from 0.36.4 to 0.37.0 - [Commits](kubernetes/api@v0.36.4...v0.37.0) Updates `k8s.io/client-go` from 0.36.4 to 0.37.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.4...v0.37.0) Updates `k8s.io/client-go` from 0.36.4 to 0.37.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.4...v0.37.0) Updates `k8s.io/api` from 0.36.4 to 0.37.0 - [Commits](kubernetes/api@v0.36.4...v0.37.0) Updates `k8s.io/apimachinery` from 0.36.4 to 0.37.0 - [Commits](kubernetes/apimachinery@v0.36.4...v0.37.0) Updates `k8s.io/client-go` from 0.36.4 to 0.37.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.36.4...v0.37.0) --- updated-dependencies: - dependency-name: k8s.io/api dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: k8s.io/api dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: k8s.io/apimachinery dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: k8s.io/client-go dependency-version: 0.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rs (google#2441) The distribution spec requires that "all annotations from the pushed manifest MUST be copied to this descriptor" when a client maintains the referrers fallback tag, but we only carried mediaType, digest, size, and (since google#2269) artifactType. Consumers that filter referrers by annotation (cosign, oras, regctl) can't tell sigstore bundles apart without the dev.sigstore.bundle.* annotations, so they end up pulling every referrer. This is the write-side counterpart of google#2269, which fixed artifactType hoisting in this path and annotations on the read side. Give the fake registry's referrers endpoint the same treatment so both test legs (referrers API and fallback tag) assert identical descriptors. Reported in sigstore/cosign#4641. Signed-off-by: Cody Soyland <cody.soyland@chainguard.dev>
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.
Automated weekly sync from google/go-containerregistry.
Merge completed cleanly — no conflicts detected.