Skip to content

1.5.0 - JSON Schema refinements & richer CLI

Choose a tag to compare

@Cheater121 Cheater121 released this 02 Oct 11:00
· 98 commits to main since this release

Highlights

  • New CLI commands

    • rbacx validate — schema-checks a policy (or each item in a policy set).
    • rbacx check — runs validate → lint in one pass; skips lint if schema errors are found.
  • Lint improvements

    • --require-attrs "subject:id,org;resource:type" to ensure key attributes appear in conditions.
    • Consistent output formats: --format json|text; reads from files or STDIN.
    • Works with policy sets via --policyset (top-level policies).
  • Exit codes (stable for CI):
    0 OK, 2 Usage, 3 Lint issues (with --strict), 4 I/O, 5 Missing optional dependency, 6 Schema errors.

  • DX & docs

    • --version flag, clearer text output, updated Diagnostics docs and examples.

Breaking changes

None. Previous lint behavior is preserved; new functionality is additive.

Upgrade

pip install -U rbacx

Quick try

# Validate then lint (text, CI-friendly)
rbacx check --policy examples/policies/ok_policy.json --format text --strict

# Policy set (JSON)
jq -s '{policies: .}' examples/policies/ok_policy.json examples/policies/bad_policy.json \
  > /tmp/policyset_mixed.json
rbacx check --policy /tmp/policyset_mixed.json --policyset --format json