Skip to content

yaml_syntax

A policy diagnostic from deedglass policy lint and the policy routes.

Severity: error

The file is not valid YAML, or it is not valid UTF-8. The most common cause is a when with : in it, which YAML reads as a new key.

deedglass: policy/v1
name: refunds
defaults:
decision: deny
reason: No rule allows this action.
rules:
- id: small-refunds
match: { tool: stripe.create_refund }
when: has(args.amount) ? args.amount <= 5000 : false
decision: allow
✕ policy.yaml:9:50 · yaml_syntax
The YAML could not be read: mapping values are not allowed.
hint: Quote the expression or write it as a block (when: >-), because YAML reads a colon followed by a space as a new key.

Fix: quote the expression.

when: 'has(args.amount) ? args.amount <= 5000 : false'