Commit Graph
505 Commits
Author SHA1 Message Date
Sebastien Tardif f318c93133 Add size validation for long-to-int casts in buildpack module
Add explicit size checks before casting long values to int in
Content.of(File) and LogUpdateEvent.read() to prevent silent data
corruption or NegativeArraySizeException when processing large files
or malformed Docker stream data.

See gh-50382

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-05-12 11:46:09 -07:00
Phillip Webb 2c2ffe51c4 Fix Windows test failure
See gh-50141
2026-04-22 18:43:33 -07:00
Phillip Webb 0046a442f9 Protect against corrupt buildpack archives
Update zip and tar handling in buildpack code to ensure that archive
entries cannot be written outside of the expected destination.

Although we consider buildpacks to be trusted, this update will help
protect against corrupt archives.

Closes gh-50141
2026-04-22 17:39:41 -07:00
Yanming Zhou 9520eb9622 Do not use String#replaceAll() with a non-regex pattern
See gh-49816

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2026-03-27 11:40:28 +01:00
Andy Wilkinson 57e768a654 Trim trailing slashes from tcp:// Docker hosts
Fixes gh-49055
2026-03-13 16:04:41 +00:00
Dmytro Nosan a4ed09e5d2 Ensure Windows Docker credential helper resolves correctly
Before this commit, "cmd /c" was never added to the final command,
which meant the Docker credential helper was not executed correctly.

See gh-48965

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2026-01-27 08:17:47 +01:00
Stéphane Nicoll c5a50cb7f6 Polish "Fix zero-length byte buffer in InspectedContent"
See gh-48649
2025-12-31 10:45:17 +01:00
高春晖 ba94cc48f2 Fix zero-length byte buffer in InspectedContent
See gh-48649

Signed-off-by: 高春晖 <18220699480@163.com>
2025-12-31 10:39:38 +01:00
高春晖 2075a2cfdb Fix method naming to follow Java conventions
See gh-48640

Signed-off-by: 高春晖 <18220699480@163.com>
2025-12-30 10:40:27 +01:00
Johnny Lim 9e7988131f Polish
See gh-48620

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-12-26 08:52:47 +01:00
Phillip Webb c90f61ce66 Merge branch '3.4.x' into 3.5.x
Closes gh-48127
2025-11-13 15:25:08 -08:00
Phillip Webb 53bda71c3e Use platform when exporting buildpack images
Update `DockerApi` and `Builder` to support export of images with a
specified platform. This prevents 'NotFound: content digest sha256:'
errors when building an amd64 image on an arm64 machine.

Fixes gh-46665
2025-11-13 15:19:26 -08:00
Stéphane Nicoll b543ab81f1 Merge branch '3.4.x' into 3.5.x
Closes gh-48108
2025-11-13 10:54:05 +01:00
Stéphane Nicoll fc826218b4 Merge pull request #48100 from nosan
* pr/48100:
  Use ObjectNode for building ImagePlatform JSON

Closes gh-48100
2025-11-13 10:53:55 +01:00
Dmytro Nosan d251b99615 Use ObjectNode for building ImagePlatform JSON
See gh-48100

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>

Closes gh-48100
2025-11-13 10:53:41 +01:00
Stéphane Nicoll 1ce1b7ee35 Merge branch '3.4.x' into 3.5.x
Closes gh-48105
2025-11-13 10:27:51 +01:00
Stéphane NicollandCatiaCorreia catia.correia97@gmail.com 9e656c1554 Remove unnecessary field initialization
Closes gh-45168

Co-authored-by: CatiaCorreia catia.correia97@gmail.com
2025-11-13 10:21:05 +01:00
Phillip Webb d1dc9579eb Merge branch '3.4.x' into 3.5.x
Closes gh-48102
2025-11-12 20:05:58 -08:00
Phillip Webb 9b387cbe77 Support recent Docker installs by raising the API version when possible
Update `DockerApi` so that the URL uses version `v1.50` whenever
possible. Prior to this commit, `v1.24` was often used which breaks
recent Docker installs due to the dropping of API version v1.43 and
below.

If the actual API version running is less than `v1.50`, but greater
than the minimum required for the API call, it will be used instead.
This hopefully means that older versions of Docker will continue to
work as they did previously.

Fixes gh-48050
2025-11-12 19:57:36 -08:00
Phillip Webb 25a5d4343e Merge branch '3.4.x' into 3.5.x
Closes gh-48098
2025-11-12 13:44:02 -08:00
Phillip Webb 39f3d1c72c Polish 'Correctly handle platform specific buildpack builds'
See gh-47292
2025-11-12 11:07:29 -08:00
hojooo 913c434b90 Correctly handle platform specific buildpack builds
Prior to this commit, performing a build on a ARM Mac with the default
configuration and then building it again with the image platform set to
`linux/amd64` results in an "Image platform mismatch detected" failure.

This is due to the fact that `docker inspect` returns JSON for the
default platform, regardless of the fact that another architecture
has been pulled.

To solve the issue, the `inspect` API call on Docker 1.49+ can now
accept a platform query parameter which when specified returns platform
specific JSON.

At the time of this commit, the Docker API documentation hasn't been
updated, despite PR https://github.com/moby/moby/pull/49586 being
merged.

In addition to using the correct inspect JSON, we also need to pin
the run image we use to a specific digest. Without doing this,
buildpacks revert back to the default platform image and
"content digest not found" errors are thrown (similar to
https://github.com/buildpacks/docs/issues/818).

See gh-47292

Signed-off-by: hojooo <ghwn5833@gmail.com>
2025-11-12 10:33:22 -08:00
Phillip Webb 4309ab071b Merge branch '3.4.x' into 3.5.x
Closes gh-47900
2025-10-31 11:54:25 -07:00
Phillip Webb abce914a76 Polish 'Handle HTTP 407 with clear error message'
See gh-47180
2025-10-31 11:50:39 -07:00
SSUday 5aa841dd53 Handle HTTP 407 with clear error message
Refine error handling logic so that HTTP 407 (Proxy Authentication
Required) responses from the Docker daemon are treated as plain
text rather than JSON.

See gh-47180

Signed-off-by: Siva Sai Udayagiri <udayagirishivasai@gmail.com>
2025-10-31 11:49:14 -07:00
Stéphane Nicoll c8a990f40a Merge branch '3.4.x' into 3.5.x
Closes gh-47703
2025-10-19 16:48:03 +02:00
Vincent Potucek 168fa858c5 Remove unnused parameter
See gh-47694

Signed-off-by: Vincent Potucek <vpotucek@me.com>
2025-10-19 16:45:59 +02:00
Phillip Webb a37c84b7c5 Merge branch '3.4.x' into 3.5.x
See gh-46066
2025-06-20 17:14:59 -07:00
Phillip Webb d66b28fcba Update end copyright year to 'present'
See gh-46065
2025-06-20 17:12:38 -07:00
Andy Wilkinson c6748144fb Upgrade to Commons Compress 1.27.1
Closes gh-45898
2025-06-12 14:05:11 +01:00
Andy Wilkinson 5141620615 Merge branch '3.4.x'
Closes gh-45913
2025-06-12 10:07:30 +01:00
Andy Wilkinson ec3eeb7185 Merge branch '3.3.x' into 3.4.x
Closes gh-45912
2025-06-12 10:06:22 +01:00
Andy Wilkinson ca21600fae Use Framework's StreamUtils instead of Commons Compress's IOUtils
Closes gh-45911
2025-06-12 10:00:30 +01:00
Andy Wilkinson d1673ad664 Merge branch '3.4.x'
Closes gh-45611
2025-05-20 11:38:36 +01:00
Andy Wilkinson aa9e75ed3c Merge branch '3.3.x' into 3.4.x
Closes gh-45610
2025-05-20 11:32:26 +01:00
Andy Wilkinson 5ed981df9c Migrate from gcr.io to docker.io for Paketo images
Closes gh-45609
2025-05-20 11:23:28 +01:00
Stéphane Nicoll e1ff4fbaf9 Upgrade to Jackson Bom 2.19.0
Closes gh-45542
2025-05-14 12:38:43 +02:00
Phillip Webb e3cf078fee Merge branch '3.4.x' 2025-05-08 12:25:34 -07:00
Phillip Webb fa5d94fb4d Merge branch '3.3.x' into 3.4.x 2025-05-08 12:25:22 -07:00
Phillip Webb 39a402b5ef Update copyright year of changed files 2025-05-08 12:24:57 -07:00
Andy Wilkinson c8cf91ad6f Polish 2025-05-07 08:29:56 +01:00
Stéphane Nicoll 05e4262a25 Polish 2025-05-02 15:37:47 +02:00
Dmytro Nosan 439dd2299e Use serverUrl from the image as a fallback for the Credentials helper
Before this commit, the credential helper used the serverUrl from
the Map.Entry<String,Auth> as a fallback. However, the helper only uses
the email from the auths.

See gh-45345

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-05-02 15:13:35 +02:00
Dmytro Nosan 3f22d4b308 Align DockerRegistryConfigAuthentication with Docker CLI
See gh-45292

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-04-29 13:40:10 +02:00
Moritz Halbritter 14f9a1e67b Merge branch '3.4.x'
Closes gh-45330
2025-04-29 13:38:27 +02:00
Moritz Halbritter 66b255573d Merge branch '3.3.x' into 3.4.x
Closes gh-45329
2025-04-29 13:37:52 +02:00
Johnny Lim 9a0f7a4013 Add more tests for Image.getOs()
See gh-45305

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-04-29 13:35:22 +02:00
Dmytro Nosan d1ee8bab48 Polish
See gh-45291

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-04-29 12:06:05 +02:00
Andy Wilkinson 21a9732b59 Polish 2025-04-28 14:31:23 +01:00
Dmytro Nosan e69de966b7 Trim "\x00" from a decoded Docker Registry password
See gh-45290

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-04-28 14:19:51 +02:00