policy: add builtin default source policy#3807
Open
tonistiigi wants to merge 2 commits intodocker:masterfrom
Open
policy: add builtin default source policy#3807tonistiigi wants to merge 2 commits intodocker:masterfrom
tonistiigi wants to merge 2 commits intodocker:masterfrom
Conversation
Embed an opt-in default source policy for Docker-managed frontend images. Load it ahead of user policies when enabled, and cover behavior with table- driven policy tests for signed, unsigned, floating, and labs tags. Makes sure if there is any attack against the docker/dockerfile releases, or they accidentally point to worng images, these are automatically detected. In a future release these should become opt-out. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Extends the builtin default policy to verify docker-github-builder signatures on docker/buildkit-syft-scanner images. Tags `latest` and 1.10+ require a signature from the docker/buildkit-syft-scanner source repository; older tags pass through unchanged. Factors the shared ref matching logic into sig_ref_matches for dockerfile and introduces a syft-scanner variant that uses the plain refs/tags/ prefix. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
crazy-max
approved these changes
Apr 21, 2026
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.
Embed an opt-in default source policy for Docker-managed frontend images. Gated by
BUILDX_DEFAULT_POLICYenv.docker/dockerfiledocker/dockerfile-upstreamdocker/buildkit-syft-scannerLoad it ahead of user policies when enabled, and cover behavior with table-
driven policy tests for signed, unsigned, floating, and labs tags.
Makes sure if there is any attack against the docker/dockerfile or syft scanner releases
releases, or they accidentally point to worng images, these are automatically detected.
In a future release these should become opt-out.
related moby/buildkit#658