Skip to content
check

GitHub Action

Validate Cedar Policies

v1.0.0 Latest version

Validate Cedar Policies

check

Validate Cedar Policies

A GitHub Action to validate Cedar policies against a Cedar schema

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Validate Cedar Policies

uses: common-fate/cedar-validate-action@v1.0.0

Learn more about this action in common-fate/cedar-validate-action

Choose a version

cedar-validate-action

GitHub Super-Linter CI Check dist/ CodeQL Coverage

A GitHub Action to validate Cedar authorization policies.

This action creates annotations showing the location of any issues in your policy source code.

A screenshot showing annotations on a pull request file

You can see an example implementation of this Action here: https://github.com/common-fate/cedar-github-actions-testing-example.

Usage

name: 'Test'

on: [push]

jobs:
  cedar:
    name: Cedar
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Validate Policies
        uses: common-fate/cedar-validate-action@v1
        with:
          schema-file: ./example.cedarschema.json
          policy-files: '**/*.cedar'

Limitations

This action currently supports Cedar v3 and supports the JSON schema format.

Let us know if you'd like to see support for Cedar v2 or the human-readable schema format.