policy: verify BuildKit builder images
Extend the built-in policy to validate signed moby/buildkit release and floating tags before docker-container builders are created. Pull the image first, inspect it through Docker, and bind verification to the descriptor digest. Resolve signature attestations through the BuildKit API embedded in the Docker daemon. If pulling fails, use a local image while applying the same verification when the containerd image store exposes an immutable descriptor. Keep the classic image-store behavior unchanged because no descriptor is available. Allow unmanaged repositories and digest-only references unchanged. Add the allow-untrusted-image driver option as an explicit verification bypass. Document the behavior and add policy, digest-pinning, and local fallback coverage. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
package bkimage
|
||||
|
||||
const (
|
||||
DefaultImage = "moby/buildkit:buildx-stable-1" // TODO: make this verified
|
||||
QemuImage = "tonistiigi/binfmt:latest" // TODO: make this verified
|
||||
DefaultImage = "moby/buildkit:buildx-stable-1"
|
||||
QemuImage = "tonistiigi/binfmt:latest" // TODO: make this verified
|
||||
DefaultRootlessImage = DefaultImage + "-rootless"
|
||||
|
||||
// TrustedRepo is the fully-qualified repository whose tags are verified
|
||||
// against the builtin default policy before a builder is created from
|
||||
// them. Images from other repositories pass through unverified; the
|
||||
// allow-untrusted-image driver-opt is only needed when a TrustedRepo tag
|
||||
// that the policy covers does not verify correctly.
|
||||
TrustedRepo = "docker.io/moby/buildkit"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user