Repository navigation
feat(evaluate): refuse a decision from a local policy - #1302
Merged
Merged
Conversation
Kosli now refuses to record a decision from an inline policy (kosli-dev/server#7583): publishing is org-admin only and validates the policy, so an inline bundle let whoever records a decision also write the Rego behind it. `kosli evaluate policy --control` with `--path` or `--policy` now fails before any request, naming `kosli publish rego-policy` and `--identifier`, rather than sending an evaluation the server rejects. `--path` without `--control` still evaluates. The decision tests now name a published policy with --identifier. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
ToreMerkely
enabled auto-merge (squash)
October 26, 2026 08:49
Contributor
|
Claude finished @ToreMerkely's task in 51s —— View job Follow-up review of new commits (d45befc → 116574a)Scope: Previous finding status:
New commits review: No new issues found. The added test ( 0 new inline comments posted. |
Only the long help said a decision needs a published policy, so someone reading the flag list met the constraint only as an error. A test also locks in that KOSLI_CONTROL from the environment is refused with --path, as a typed --control is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
On the review's other suggestions:
|
pbeckham
approved these changes
Oct 26, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refuse
kosli evaluate policy --controlwith--pathor--policybefore any request, namingkosli publish rego-policyand--identifier. Kosli now records a decision only from a published policy, so the server would reject the request anyway. Step 3 of refusing decisions from inline policies.Part of kosli-dev/server#7583
🤖 Generated with Claude Code