This repo contains a series of examples exploring different versions of the future 'self' keyword in Rego.
Three scenarios are explored:
- Metadata is not inherited, and a rule can only access annotations directly attached to it:
no_inheritance
- The
self.metadata
field returns a complete flattened tree of all metadata in the compiled module(s):self_flat_tree
- The
self.metadata
field returns an array, listing all annotations from the active rule to the root package:self_chain