-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add interactive policy builder to docs #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+869
−0
Merged
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 5f1491b
fix: address policy builder PR review comments
dangrondahl b73c172
style: put attestation type and name on separate lines with bold labels
dangrondahl fac49bf
style: widen policy preview to 2/3 of builder width
dangrondahl 2dfc332
style: remove custom attestation type placeholder
dangrondahl ec9af0d
style: add bold Term label and keep flow.name value inline
dangrondahl ce26c90
style: keep flow tag, artifact, and custom term inputs inline
dangrondahl ecee11d
style: 2-space YAML indent, shorter condition label, narrower preview
dangrondahl e36e49d
style: move checkbox labels to the left of the checkbox
dangrondahl 34ed0db
style: keep term kind, not, and remove controls on one line
dangrondahl 7072e08
style: shorten provenance and trail-compliance checkbox labels to Req…
dangrondahl b71fcd0
style: add bold label to custom attestation type input
dangrondahl 7536009
style: tighten spacing between attestation type, custom type, and nam…
dangrondahl fcbe541
style: sort attestation type options alphabetically, keeping * last
dangrondahl 741b6e5
style: move wildcard type option to the end of the dropdown
dangrondahl 3580f92
docs: drop CLI mention from policy builder intro
dangrondahl 42b1cc1
docs: rename to Environment Policy Builder and drop sidebar icon
dangrondahl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
|
||
| 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. | ||
|
|
||
|
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). | ||
|
dangrondahl marked this conversation as resolved.
|
||
| - Attach it to an environment with [`kosli attach-policy`](/client_reference/kosli_attach-policy). | ||
|
dangrondahl marked this conversation as resolved.
dangrondahl marked this conversation as resolved.
dangrondahl marked this conversation as resolved.
dangrondahl marked this conversation as resolved.
dangrondahl marked this conversation as resolved.
dangrondahl marked this conversation as resolved.
dangrondahl marked this conversation as resolved.
dangrondahl marked this conversation as resolved.
dangrondahl marked this conversation as resolved.
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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.