Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4eaadff
feat: add interactive policy builder to docs
dangrondahl Jun 16, 2026
5f1491b
fix: address policy builder PR review comments
dangrondahl Jun 16, 2026
b73c172
style: put attestation type and name on separate lines with bold labels
dangrondahl Jun 16, 2026
fac49bf
style: widen policy preview to 2/3 of builder width
dangrondahl Jun 16, 2026
2dfc332
style: remove custom attestation type placeholder
dangrondahl Jun 16, 2026
ec9af0d
style: add bold Term label and keep flow.name value inline
dangrondahl Jun 16, 2026
ce26c90
style: keep flow tag, artifact, and custom term inputs inline
dangrondahl Jun 16, 2026
ecee11d
style: 2-space YAML indent, shorter condition label, narrower preview
dangrondahl Jun 16, 2026
e36e49d
style: move checkbox labels to the left of the checkbox
dangrondahl Jun 16, 2026
34ed0db
style: keep term kind, not, and remove controls on one line
dangrondahl Jun 16, 2026
7072e08
style: shorten provenance and trail-compliance checkbox labels to Req…
dangrondahl Jun 16, 2026
b71fcd0
style: add bold label to custom attestation type input
dangrondahl Jun 16, 2026
7536009
style: tighten spacing between attestation type, custom type, and nam…
dangrondahl Jun 16, 2026
fcbe541
style: sort attestation type options alphabetically, keeping * last
dangrondahl Jun 16, 2026
741b6e5
style: move wildcard type option to the end of the dropdown
dangrondahl Jun 16, 2026
3580f92
docs: drop CLI mention from policy builder intro
dangrondahl Jun 16, 2026
42b1cc1
docs: rename to Environment Policy Builder and drop sidebar icon
dangrondahl Jun 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@
"group": "Policies",
"pages": [
"policy-reference/environment_policy",
"policy-reference/policy_builder",
"policy-reference/rego_policy"
]
}
Expand Down
5 changes: 5 additions & 0 deletions policy-reference/environment_policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ description: "Reference for the YAML policy files used to define compliance requ

An environment policy is a YAML file that declares compliance requirements for artifacts running in a Kosli environment. You pass the file to [`kosli create policy`](/client_reference/kosli_create_policy) to create or update a policy. For concepts, workflow, and enforcement, see [Environment Policies](/getting_started/policies).

<Tip>
Prefer to build a policy interactively? Use the [Policy builder](/policy-reference/policy_builder) to assemble a valid policy file in your browser and copy the YAML.
</Tip>

## Specification

<ParamField path="_schema" type="string" required>
Expand Down Expand Up @@ -190,6 +194,7 @@ _schema: https://docs.kosli.com/schemas/policy/v1

## See also

- [Policy builder](/policy-reference/policy_builder) — build a policy file interactively in the browser
- [Environment Policies](/getting_started/policies) — concepts, workflow, and enforcement
- [`kosli create policy`](/client_reference/kosli_create_policy) — create or update a policy
- [`kosli attach-policy`](/client_reference/kosli_attach-policy) — attach a policy to an environment
Expand Down
24 changes: 24 additions & 0 deletions policy-reference/policy_builder.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "Environment Policy Builder"
description: "Build a Kosli environment policy YAML interactively in the browser and copy the result into your repo."
mode: "wide"
---

import { PolicyBuilder } from "/snippets/policy-builder.jsx";

Use this builder to assemble an [environment policy](/policy-reference/environment_policy). Toggle the requirements you need, add attestation rules and exceptions, then copy the generated YAML into a file in your repo.
Comment thread
dangrondahl marked this conversation as resolved.

The output conforms to the [v1 policy schema](https://docs.kosli.com/schemas/policy/v1.json) and runs entirely in your browser — nothing is sent to Kosli.

Comment thread
dangrondahl marked this conversation as resolved.
<PolicyBuilder />

## Next steps

- Save the YAML as a file (e.g. `policy.yaml`) in your repo.
- Create or update the policy with [`kosli create policy`](/client_reference/kosli_create_policy).
Comment thread
dangrondahl marked this conversation as resolved.
- Attach it to an environment with [`kosli attach-policy`](/client_reference/kosli_attach-policy).
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.
Comment thread
dangrondahl marked this conversation as resolved.

## See also

- [Environment Policy](/policy-reference/environment_policy) — full schema reference and field descriptions
- [Environment Policies](/getting_started/policies) — concepts, workflow, and enforcement
Loading