From ae8a7c014b9f8347e07c54b209a9aaee0425d25d Mon Sep 17 00:00:00 2001 From: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 10:25:06 +0000 Subject: [PATCH] docs(#239): replace broken policy source with local path in tutorial The "Validating arbitrary inputs" tutorial referenced a non-existent GitHub repository (github.com/acme/policy), causing users to get a "Repository not found" error when following the tutorial. Replace the git-based policy source with a local directory path to make the example self-contained and functional. --- modules/ROOT/pages/cli.adoc | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/modules/ROOT/pages/cli.adoc b/modules/ROOT/pages/cli.adoc index 0688d30..82acb50 100644 --- a/modules/ROOT/pages/cli.adoc +++ b/modules/ROOT/pages/cli.adoc @@ -151,7 +151,8 @@ provided via `--policy` parameter. For example let's consider a YAML file containing a set of sign-offs for a release, and a policy mandating that a release must be signed-off by at least -two persons from each relevant department. +two persons from each relevant department. Create the following files in a +working directory. .data.yaml - the data for validation [source,yaml] @@ -168,17 +169,7 @@ engineering: # engineering sign-offs - Zayn Simmons ---- -.policy.yaml - the policy configuration -[source,yaml] ----- -description: ACME & co sign-off policy -sources: - - name: default-sign-off - policy: - - "git::https://github.com/acme/policy.git//policy?ref=prod" ----- - -.signoff.rego - the policy rules in the `github.com/acme/policy.git` repository at `policy/signoff.rego` +.policy/signoff.rego - the policy rules [source,rego] ---- # @@ -205,6 +196,20 @@ deny contains result if { } ---- +.policy.yaml - the policy configuration +[source,yaml] +---- +description: ACME & co sign-off policy +sources: + - name: default-sign-off + policy: + - policy +---- + +NOTE: The `policy` entry above is a local directory path pointing to the +`policy/` directory containing `signoff.rego`. You could also use a remote git +URL here, but a local path makes this example self-contained. + With this, running the CLI shows that there is a policy violation, one sign-off from the engineering department is missing: @@ -226,7 +231,7 @@ policy: sources: - name: default-sign-off policy: - - git::https://github.com/acme/policy.git//policy?ref=prod + - policy success: false Error: success criteria not met ----