Commit Graph
8 Commits
Author SHA1 Message Date
Sebastiaan van Stijn 8b1d06a0ec policy: remove uses of deprecated WithBuiltins
The WithBuiltins method was deprecated in opa v0.23.0 ([opa@afc8c5e]) in
favor of WithCapabilities, but the deprecation didn't use the standard
format, causing it not being detected as deprecated. OPA v1.1.0 corrected
the deprecation in [opa@622434d].

This patch replaces uses of the deprecated functions.

[opa@afc8c5e]: https://github.com/open-policy-agent/opa/commit/afc8c5e2a22878086067821f24e15d060594227a
[opa@622434d]: https://github.com/open-policy-agent/opa/commit/622434d11386c7b12aee703d7c1eedea34a27c7b

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-06-16 15:11:37 +02:00
Tonis TiigiandCrazyMax 4da04e3bf4 policy: enable proxy network from source policy caps
Evaluate source policy caps before solve requests so policies can enable
BuildKit proxy networking. Policy can return caps {"exec.proxy": true}
during the caps request to enable proxy network
support for the solve.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-06-10 15:04:23 +02:00
Tonis Tiigi 4880756a0f policy: simplify recursive material resolution
Unify root/material unknown resolution with recursive Input traversal.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-26 09:14:25 -08:00
Tonis Tiigi dce5289722 policy: separate sourcemetaresolver utility to reusable pkg
Turn the current utility used by policy helper commands that
allows getting gateway.Client lazily into reusable package.

This is preparation for using this utility also in the policy
verification, outside of commands.

Only expose SourceMetaResolver as other methods of gateway client
are not needed atm by any callers.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-13 13:59:33 -08:00
Tonis Tiigi 4e16277937 policy: update unknown keys normalization
Make the code more unified between validation and
test command. Normalize to key without the input prefix.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-09 18:27:35 -08:00
Tonis Tiigi db9c0c2532 policy: update unknown collection
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-16 11:48:56 -08:00
Tonis Tiigi 1d19f3e2dd policy: add docker_github_builder builtin helper
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-16 11:48:55 -08:00
Tonis Tiigi c6ecdc08cf commands: implement policy test command
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 10:31:12 -08:00