CLI — Policies
The rivano policies subcommands let you manage governance rules from the terminal. The fastest path to meaningful governance is apply-template foundational.
List policies
rivano policies list
Output:
ID NAME PHASE ACTION ENABLED
policy_abc123 block-injection request block yes
policy_def456 redact-pii-response response redact yes
policy_ghi789 warn-large-prompt request warn yes
policy_jkl012 block-ssn request block no
Use --json for structured output:
rivano policies list --json
Apply a template pack
Template packs apply multiple curated policies at once. The foundational pack is the recommended starting point:
rivano policies apply-template foundational
Output:
Applying foundational policy pack...
✔ Created: block-injection
Phase: request | Condition: injection_score >= 0.7 | Action: block
✔ Created: redact-pii-response
Phase: response | Condition: pii_detected | Action: redact
✔ Created: warn-large-prompt
Phase: request | Condition: token_count > 4000 | Action: warn
✔ Created: block-ssn
Phase: request | Condition: pii_detected (ssn) | Action: block
4 policies applied.
Foundational pack policies
| Policy name | Phase | Condition | Action |
|---|---|---|---|
block-injection | request | Injection score ≥ 0.7 | Block |
redact-pii-response | response | PII detected in response | Redact |
warn-large-prompt | request | Token count > 4,000 | Warn |
block-ssn | request | SSN pattern detected | Block |
💡
Apply the foundational pack to a new tenant in your CI pipeline on first deploy. All four policies are enabled immediately and require no further configuration.
Enable a policy
rivano policies enable policy_jkl012
# ✔ Policy block-ssn enabled
Disable a policy
rivano policies disable policy_abc123
# ✔ Policy block-injection disabled
⚠
Disabling the block-injection policy removes prompt injection protection immediately. Requests with high injection scores pass through to the LLM without being blocked.
Scripting with —json
# Get all enabled policies
rivano policies list --json | jq '[.data[] | select(.enabled == true)]'
# Get the ID of the injection policy
rivano policies list --json | jq -r '.data[] | select(.name == "block-injection") | .id'
Related
- SDK Policies — Create and configure policies programmatically
- Gateway Middleware — How policies run in the request pipeline
- Core Concepts — Policies — Policy phases and actions