Skip to content

build: rego source policies - #23782

Merged
dvdksn merged 2 commits into
docker:mainfrom
dvdksn:build-input-policy
Jan 28, 2026
Merged

build: rego source policies#23782
dvdksn merged 2 commits into
docker:mainfrom
dvdksn:build-input-policy

Conversation

@dvdksn

@dvdksndvdksn commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

@dvdksndvdksn added the status/do-not-merge Pull requests that are awaiting some event or decision before they can be merged. label Nov 27, 2025
@github-actionsgithub-actionsBot added area/build Relates to Dockerfiles or docker build command area/tests labels Nov 27, 2025
@netlify

netlifyBot commented Nov 27, 2025

Copy link
Copy Markdown

Deploy Preview for docsdocker ready!

NameLink
🔨 Latest commit2c7b95a
🔍 Latest deploy loghttps://app.netlify.com/projects/docsdocker/deploys/6979d993f0c31300083b6746
😎 Deploy Previewhttps://deploy-preview-23782--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actionsgithub-actionsBot added the area/cli Relates to the CLI client label Jan 16, 2026
@dvdksn
dvdksnforce-pushed the build-input-policy branch 2 times, most recently from 1dcccf6 to 7741d9bCompareJanuary 20, 2026 14:57
@dvdksn
dvdksn marked this pull request as ready for review January 20, 2026 14:59
@dvdksn
dvdksnforce-pushed the build-input-policy branch 2 times, most recently from 9ef9e13 to 04835cdCompareJanuary 20, 2026 15:22
@dvdksndvdksn changed the title [WIP] build: rego source policiesbuild: rego source policiesJan 20, 2026
Comment threadcontent/manuals/build/policies/_index.md Outdated
Comment threadcontent/manuals/build/policies/_index.md Outdated
Comment threadcontent/manuals/build/policies/_index.md
Comment threadcontent/manuals/build/policies/_index.md Outdated
Comment threadcontent/manuals/build/policies/intro.md Outdated
```

When using Sigstore signatures, additional fields are available under
`input.image.signature` (singular) with details about the signing workflow.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Uuh I reckon this was a result of me starting to preemptively doc some fields before I was able to test. Then Claude went and mangled things.

}
```

#### `input.git.commitChecksum`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is also checksumisAnnotatedTag.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Adding these and a couple other fields I noticed were missing. Not adding fullUrl and isSha256 just yet - I noticed they exist but I'm not really able to test those.

Comment threadcontent/manuals/build/policies/inputs.md Outdated
Comment threadcontent/manuals/build/policies/inputs.md Outdated
Comment threadcontent/manuals/build/policies/debugging.md Outdated
@github-actionsgithub-actionsBot added dependencies Vendoring, packaging updates area/config labels Jan 26, 2026
@dvdksndvdksn removed status/do-not-merge Pull requests that are awaiting some event or decision before they can be merged. dependencies Vendoring, packaging updates area/config labels Jan 26, 2026
@dvdksn
dvdksn requested a review from a teamJanuary 26, 2026 13:14
@dvdksndvdksn added the status/review Pull requests that are ready for review label Jan 26, 2026
@dvdksndvdksn mentioned this pull request Jan 27, 2026
3 tasks
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Comment threadcontent/manuals/build/policies/_index.md Outdated
Comment threadcontent/manuals/build/policies/_index.md Outdated
Comment threadcontent/manuals/build/policies/_index.md
Comment threadcontent/manuals/build/policies/_index.md
Comment threadcontent/manuals/build/policies/usage.md
Comment threadcontent/manuals/build/policies/intro.md
Comment threadcontent/manuals/build/policies/intro.md
Comment threadcontent/manuals/build/policies/intro.md
Comment threadcontent/manuals/build/policies/usage.md Outdated
Comment threadcontent/manuals/build/policies/usage.md
Comment threadcontent/manuals/build/policies/examples.md Outdated
Comment threadcontent/manuals/build/policies/testing.md
Comment threadcontent/manuals/build/policies/testing.md Outdated
Comment threadcontent/manuals/build/policies/testing.md
Comment threadcontent/manuals/build/policies/_index.md Outdated
$ docker buildx policy test --filename app.Dockerfile .
```

This loads `app.Dockerfile.rego` and runs `*_test.rego` files against it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above. What is the expected outcome? A short sentence might help wrap up what to expect

@usha-mandya

Copy link
Copy Markdown
Member

Left some minor comments @dvdksn. Looks great overall!

Comment threadcontent/manuals/build/policies/debugging.md
Comment threadcontent/manuals/build/policies/debugging.md Outdated
> like `allow if { input.image; print(...) }` only prints for image inputs,
> not for Git repos, HTTP downloads, or local files.

## Common issues

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do we think about separating debugging reference from troubleshooting? It doesn't have to be for teh release, but maybe for future work. I think while the two types of info are similar, debugging reads as things a user can do to find an unknown issue whereas troubleshooting are topics that we know are common missteps.

I also might include specific error codes of some kind, or specific error message a user might encounter related to these topics if we have that info readily available. Not a blocker just an idea!

akristen
akristen previously requested changes Jan 27, 2026

@akristenakristen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These are really informative docs w/ a lot of good details. Some copy level things beyond the general suggestions i left in the PR:

  • Our style guide suggests we use - construction sparingly. I might get a list of all the times you use a - and rework those sentences to use :s, semicolons, commons, whatever you want.
  • Do we always capitalize git? I didn't see anything in our style guide on guidance and I could be wrong... might be handy for me to know, lol.

Overall the one thing I might add to the introduction is more frontloaded context about WHO WHAT WHEN re: creating build policies. Is it something we recommend for larger enterprise orgs? Individual devs? What is the purpose of including these in production or dev: is it better security and compliance, or are there other benefits?

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>

@usha-mandyausha-mandya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@dvdksn
dvdksn merged commit d7d5069 into docker:mainJan 28, 2026
15 checks passed
@dvdksn
dvdksn deleted the build-input-policy branch January 28, 2026 09:48
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/buildRelates to Dockerfiles or docker build commandarea/cliRelates to the CLI clientarea/testsstatus/reviewPull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dvdksn@usha-mandya@tonistiigi@akristen