Skip to content

zenitysec/sphinx-rego

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
July 9, 2021 09:57
November 3, 2021 11:32
April 19, 2021 16:08
September 27, 2021 13:20
November 3, 2021 11:39
March 18, 2023 12:14

sphinx-rego

A sphinx extension that automatically documents Open Policy Agent Rego policies using the rego_metadoc property.

Maintained by Zenity.

Example

See example/ dir for a documented usage example.

Sphinx Docs

Prerequisites

Installation:

Install with PIP

pip3 install sphinx-rego

Add to Sphinx conf.py

extensions += ["sphinxrego.ext"]

Usage Example:

.. rego::
   :policy: policies/**/*.rego
   :norecursive:
   :nocustom:

Arguments:

policy: glob pathname to search for .rego policies with rego_metadoc property

norecursive: whether to use glob recursive option

norecursive: whether to include custom properties