kosli evaluate trail|trails --output-rule works locally, but not with --server-side, so the CLI refuses the combination for now.
Why
The server-side path only returns allow and violations:
- opa-lambda filters them:
evaluator/evaluator.go only queries those two rules.
- server passes
result through as-is.
- CLI only reads
allow and violations back (internal/evaluations/client.go).
What it takes
- opa-lambda: query the extra rules too.
- server: accept the rule list in
POST /evaluations and pass it to the lambda.
- CLI: send
--output-rule, read the extra keys, drop the refusal.
Bonus
kosli evaluate policy already stores the whole result in the decision attestation. So once the lambda returns extra rules, a policy's report gets recorded as evidence for free.
To keep in mind
- Match the local behaviour: a missing rule fails, an undefined one gives
null.
- The lambda has a 6 MB payload limit, and big reports add up.
kosli evaluate trail|trails --output-ruleworks locally, but not with--server-side, so the CLI refuses the combination for now.Why
The server-side path only returns
allowandviolations:evaluator/evaluator.goonly queries those two rules.resultthrough as-is.allowandviolationsback (internal/evaluations/client.go).What it takes
POST /evaluationsand pass it to the lambda.--output-rule, read the extra keys, drop the refusal.Bonus
kosli evaluate policyalready stores the wholeresultin the decision attestation. So once the lambda returns extra rules, a policy's report gets recorded as evidence for free.To keep in mind
null.