Skip to content

policy: add builtin default source policy#3807

Open
tonistiigi wants to merge 2 commits intodocker:masterfrom
tonistiigi:buildx-default-policy
Open

policy: add builtin default source policy#3807
tonistiigi wants to merge 2 commits intodocker:masterfrom
tonistiigi:buildx-default-policy

Conversation

@tonistiigi
Copy link
Copy Markdown
Member

@tonistiigi tonistiigi commented Apr 20, 2026

Embed an opt-in default source policy for Docker-managed frontend images. Gated by BUILDX_DEFAULT_POLICY env.

  • docker/dockerfile docker/dockerfile-upstream
  • docker/buildkit-syft-scanner

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 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

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 crazy-max added this to the v0.34.0 milestone Apr 21, 2026
@tonistiigi tonistiigi marked this pull request as ready for review April 21, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants