Skip to content

Comments

policy: add artifact attestation and github attestation builtin support #3657

Merged
tonistiigi merged 3 commits intodocker:masterfrom
tonistiigi:policy-artifact-verification
Feb 23, 2026
Merged

policy: add artifact attestation and github attestation builtin support #3657
tonistiigi merged 3 commits intodocker:masterfrom
tonistiigi:policy-artifact-verification

Conversation

@tonistiigi
Copy link
Member

@tonistiigi tonistiigi commented Feb 20, 2026

fixes #3640
depends on #3656

return nil, nil, err
}

rtUnk := runtimeUnknownInputRefs(st)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this could be bug previously if image signatures were the only requirement with no other unknown fields. Similar code is bit above, but it currently only ran in case of the Partial() code path.

continue
}
if shouldDecodeSnappyBundleURL(bu) {
decoded, err := snappy.Decode(nil, bundleRaw)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw I didn't find any documentation for this. When I wrote similar code couple of months ago in https://github.com/moby/policy-helpers/blob/main/githubapi/pull.go there was no bundle_url or snappy compression.

Copy link
Member

@crazy-max crazy-max Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes seems gh cli is doing the same: https://github.com/cli/cli/blob/6c3e39ffc481d5b9675451a201ae904b6d42c7cd/pkg/cmd/attestation/api/client.go#L222-L265

Looks like they also have some backoff logic, not sure if we should do the same.

Add artifact_attestation(http, filename) and wire verifier support for
artifact bundle checks. Add docker_github_builder_bundle helper rule.

Handle runtime unknown http.checksum after eval so metadata resolve is
requested when checksum is missing.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Add github_attestation and github_release_attestation policy support.
Fetch GitHub attestation bundles (including bundle_url .json.sn decode)
and verify against input.http.checksum.

Wire source metadata resolver progress through resolver options and add
ResolveState support for policy HTTP attestation fetches.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Prevent concurrent ResolveSourceMetadata calls from hanging while
waiting for resolver initialization.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi force-pushed the policy-artifact-verification branch from 675ceb5 to 10c5f00 Compare February 20, 2026 16:56
@tonistiigi tonistiigi marked this pull request as ready for review February 20, 2026 16:56
@tonistiigi
Copy link
Member Author

Rebased after #3656 merge.

@tonistiigi tonistiigi merged commit 5830f90 into docker:master Feb 23, 2026
159 checks passed
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.

Policy: add artifact attestation verification and github_attestation helper

2 participants