From c917f48173b9ec090a99ea3d3406277c21d060c3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 14:09:46 +0000 Subject: [PATCH] docs: update CLI and helm reference for v2.15.2 --- client_reference/kosli_assert_artifact.md | 20 ++++++++++++-------- client_reference/kosli_evaluate_input.md | 22 ++++++++++++++++++++++ client_reference/kosli_evaluate_trail.md | 17 +++++++++++++++++ client_reference/kosli_evaluate_trails.md | 9 +++++++++ client_reference/overview.md | 2 +- 5 files changed, 61 insertions(+), 9 deletions(-) diff --git a/client_reference/kosli_assert_artifact.md b/client_reference/kosli_assert_artifact.md index f76b7fd..4d73ce7 100644 --- a/client_reference/kosli_assert_artifact.md +++ b/client_reference/kosli_assert_artifact.md @@ -3,10 +3,10 @@ title: "kosli assert artifact" beta: false deprecated: false description: "Assert the compliance status of an artifact in Kosli. -There are four (mutually exclusive) ways to use `kosli assert artifact`: +There are three ways to choose what to assert against: 1. Against an environment. When `--environment` is specified, -assert..." +asserts against all poli..." --- ## Synopsis @@ -16,17 +16,21 @@ kosli assert artifact [IMAGE-NAME | FILE-PATH | DIR-PATH] [flags] ``` Assert the compliance status of an artifact in Kosli. -There are four (mutually exclusive) ways to use `kosli assert artifact`: +There are three ways to choose what to assert against: 1. Against an environment. When `--environment` is specified, asserts against all policies currently attached to the given environment. 2. Against one or more policies. When `--policy` is specified, asserts against all the given policies. -3. Against a flow. When `--flow` is specified, asserts against the -current template file of the given flow. -4. Against many flows. When none of `--environment`, `--policy`, or `--flow` -are specified, asserts against the template files of *all* flows the artifact -is found in (by fingerprint). +3. Against flow templates. When neither `--environment` nor `--policy` +is specified, asserts against the template files of the flows the artifact +is found in. + +`--environment` and `--policy` are mutually exclusive. + +`--flow` can be combined with any of the above to narrow the lookup +to a specific flow. Without `--flow`, all flows containing the artifact +(by fingerprint) are considered. Exits with zero code if the artifact has compliant status, non-zero code if non-compliant status. diff --git a/client_reference/kosli_evaluate_input.md b/client_reference/kosli_evaluate_input.md index 8c29224..e2817d5 100644 --- a/client_reference/kosli_evaluate_input.md +++ b/client_reference/kosli_evaluate_input.md @@ -23,12 +23,16 @@ The command exits with code 0 when allowed and code 1 when denied. When `--input-file` is omitted, JSON is read from stdin. +Use `--params` to pass configuration data to the policy as `data.params`. +This accepts inline JSON or a file reference (`@file.json`). + ## Flags | Flag | Description | | :--- | :--- | | -h, --help | help for input | | -i, --input-file string | [optional] Path to a JSON input file. Reads from stdin if omitted. | | -o, --output string | [defaulted] The format of the output. Valid formats are: [table, json]. (default "table") | +| --params string | [optional] Policy parameters as inline JSON or @file.json. Available in policies as data.params. | | -p, --policy string | Path to a Rego policy file to evaluate against the input. | | --show-input | [optional] Include the policy input data in the output. | @@ -80,6 +84,24 @@ kosli evaluate input ```shell cat trail-data.json | kosli evaluate input --policy policy.rego + +``` + + +```shell +kosli evaluate input + --input-file trail-data.json + --policy policy.rego + --params '{"threshold": 3}' + +``` + + +```shell +kosli evaluate input + --input-file trail-data.json + --policy policy.rego + --params @params.json ``` diff --git a/client_reference/kosli_evaluate_trail.md b/client_reference/kosli_evaluate_trail.md index f70b6f2..79de7a4 100644 --- a/client_reference/kosli_evaluate_trail.md +++ b/client_reference/kosli_evaluate_trail.md @@ -26,6 +26,7 @@ full data structure available to the policy. Use `--output json` for structured | -f, --flow string | The Kosli flow name. | | -h, --help | help for trail | | -o, --output string | [defaulted] The format of the output. Valid formats are: [table, json]. (default "table") | +| --params string | [optional] Policy parameters as inline JSON or @file.json. Available in policies as data.params. | | -p, --policy string | Path to a Rego policy file to evaluate against the trail. | | --show-input | [optional] Include the policy input data in the output. | @@ -68,6 +69,22 @@ kosli evaluate trail yourTrailName --policy yourPolicyFile.rego --show-input --output json + +``` + + +```shell +kosli evaluate trail yourTrailName + --policy yourPolicyFile.rego + --params '{"min_approvers": 2}' + +``` + + +```shell +kosli evaluate trail yourTrailName + --policy yourPolicyFile.rego + --params @params.json ``` diff --git a/client_reference/kosli_evaluate_trails.md b/client_reference/kosli_evaluate_trails.md index 7d7a6fb..6e38a6f 100644 --- a/client_reference/kosli_evaluate_trails.md +++ b/client_reference/kosli_evaluate_trails.md @@ -27,6 +27,7 @@ full data structure available to the policy. Use `--output json` for structured | -f, --flow string | The Kosli flow name. | | -h, --help | help for trails | | -o, --output string | [defaulted] The format of the output. Valid formats are: [table, json]. (default "table") | +| --params string | [optional] Policy parameters as inline JSON or @file.json. Available in policies as data.params. | | -p, --policy string | Path to a Rego policy file to evaluate against the trails. | | --show-input | [optional] Include the policy input data in the output. | @@ -69,6 +70,14 @@ kosli evaluate trails yourTrailName1 yourTrailName2 --policy yourPolicyFile.rego --show-input --output json + +``` + + +```shell +kosli evaluate trails yourTrailName1 yourTrailName2 + --policy yourPolicyFile.rego + --params '{"min_approvers": 2}' ``` diff --git a/client_reference/overview.md b/client_reference/overview.md index 85c9f16..5dcb3a9 100644 --- a/client_reference/overview.md +++ b/client_reference/overview.md @@ -4,7 +4,7 @@ description: "Reference documentation for the Kosli CLI." --- - This reference was generated from Kosli CLI **v2.15.1**. + This reference was generated from Kosli CLI **v2.15.2**. The Kosli CLI allows you to interact with Kosli from your terminal and CI/CD pipelines.