Skip to content

docs: align rego policy reference with safe policy design recommendat…#231

Merged
JonJagger merged 1 commit into
mainfrom
docs/rego-policy-safe-design-rules
May 19, 2026
Merged

docs: align rego policy reference with safe policy design recommendat…#231
JonJagger merged 1 commit into
mainfrom
docs/rego-policy-safe-design-rules

Conversation

@JonJagger
Copy link
Copy Markdown
Contributor

…ions

The previous page promoted count(violations) == 0 as the idiomatic allow pattern, which is the false-positive anti-pattern the tutorial and blog explicitly warn against. Rewrite to match the recommendations:

  • Fix allow contract: show positive assertion pattern, not absence of violations
  • Add Safe policy design section: three rules with unsafe/safe code examples
  • Add Params section: --params flag, data.params aliasing pattern
  • Add Local testing section: kosli evaluate input workflow
  • Rewrite both examples to use positive assertions and data.params
  • Simplify Rule 3 to an overview with links to the tutorial
  • Parameterise hard-wired snyk-container-scan attestation name
  • Add descriptive sentences to both examples
  • Replace em-dashes and arrows with ASCII equivalents

…ions

The previous page promoted count(violations) == 0 as the idiomatic allow
pattern, which is the false-positive anti-pattern the tutorial and blog
explicitly warn against. Rewrite to match the recommendations:

- Fix allow contract: show positive assertion pattern, not absence of violations
- Add Safe policy design section: three rules with unsafe/safe code examples
- Add Params section: --params flag, data.params aliasing pattern
- Add Local testing section: kosli evaluate input workflow
- Rewrite both examples to use positive assertions and data.params
- Simplify Rule 3 to an overview with links to the tutorial
- Parameterise hard-wired snyk-container-scan attestation name
- Add descriptive sentences to both examples
- Replace em-dashes and arrows with ASCII equivalents

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JonJagger JonJagger requested a review from a team as a code owner May 19, 2026 09:56
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 19, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
kosli 🟢 Ready View Preview May 19, 2026, 9:57 AM

@JonJagger JonJagger merged commit 8f868cb into main May 19, 2026
5 checks passed
@JonJagger JonJagger deleted the docs/rego-policy-safe-design-rules branch May 19, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants